Description
Description
Details
Details
- Auditors
Langbart - Committed
Freagarach Apr 12 2021, 2:41 PM - Differential Revision
- D3840: Fix entities able to attack allied structures.
- Parents
- rP25241: Crops minimap view bounds to map size.
- Branches
- Unknown
- Tags
- Reverted By
- rP25246: Revert rP25242 - infinite loop in UnitAI when slaughtering.
- Build Status
Buildable 16721 Build 38046: Post-Commit Build Jenkins Build 38045: Post-Commit Build (macOS) Jenkins
Event Timeline
Comment Actions
Beginning with this changeset I get a segmentation fault, when starting a match.
Process 13459 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7ffeef3ffe98) frame #0: 0x000000010015c804 pyrogenesis`void ScriptInterface::ToJSVal<IComponent*>(rq=0x00007ffeef4001a0, ret=JS::MutableHandleValue @ r15, val=0x00007ffeef400198) at EngineScriptConversions.cpp:46:39 [opt] 43 } 44 45 // If this is a scripted component, just return the JS object directly -> 46 JS::RootedValue instance(rq.cx, val->GetJSInstance()); 47 if (!instance.isNull()) 48 { 49 ret.set(instance); Target 0: (pyrogenesis) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7ffeef3ffe98) * frame #0: 0x000000010015c804 pyrogenesis`void ScriptInterface::ToJSVal<IComponent*>(rq=0x00007ffeef4001a0, ret=JS::MutableHandleValue @ r15, val=0x00007ffeef400198) at EngineScriptConversions.cpp:46:39 [opt] frame #1: 0x000000010018e0a4 pyrogenesis`bool ScriptFunction::ToJSNative<&(CComponentManager::QueryInterface(unsigned int, int) const), &(CComponentManager* ScriptFunction::ObjectFromCBData<CComponentManager>(ScriptRequest const&, JS::CallArgs&))>(cx=<unavailable>, argc=<unavailable>, vp=0x00007ffeef400238) at FunctionWrapper.h:277:4 [opt] frame #2: 0x00000cef028ddcfc frame #3: 0x0000000100ea66b0 pyrogenesis`js::jit::MaybeEnterJit(JSContext*, js::RunState&) at Jit.cpp:105:5 [opt] frame #4: 0x0000000100ea6446 pyrogenesis`js::jit::MaybeEnterJit(cx=0x000000010583d600, state=0x0000000000002043) at Jit.cpp:196 [opt] frame #5: 0x0000000100767479 pyrogenesis`js::RunScript(cx=0x000000010583d600, state=0x00007ffeef400550) at Interpreter.cpp:450:32 [opt] frame #6: 0x00000001007771f4 pyrogenesis`js::InternalCallOrConstruct(cx=0x000000010583d600, args=<unavailable>, construct=<unavailable>, reason=<unavailable>) at Interpreter.cpp:620:13 [opt] frame #7: 0x00000001007775f6 pyrogenesis`InternalCall(cx=<unavailable>, args=<unavailable>, reason=<unavailable>) at Interpreter.cpp:648:10 [opt] [artificial] frame #8: 0x0000000100777629 pyrogenesis`js::Call(cx=0x000000010583d600, fval=<unavailable>, thisv=JS::HandleValue @ scalar, args=0x00007ffeef4005f8, rval=JS::MutableHandleValue @ r14, reason=<unavailable>) at Interpreter.cpp:665:8 [opt] frame #9: 0x0000000100880e04 pyrogenesis`js::fun_call(cx=0x000000010583d600, argc=1, vp=0x00007ffeef400c08) at JSFunction.cpp:1132:10 [opt] frame #10: 0x00000001008811fc pyrogenesis`js::fun_apply(cx=0x000000010583d600, argc=1, vp=0x00007ffeef400c08) at JSFunction.cpp:1152:12 [opt] (lldb)
Comment Actions
To reproduce: start Acropolis Bay skirmish map with an AI.
This stack trace looks identical to infinite loop stack traces that we've had recently.
Comment Actions
Reverted in rP25246.
A quick investigation leads me to conclude that the "wantedType" being "Slaughter" caused an infinite loop in UnitAI's gather/hunting logic (as usual). I am not very familiar with the wanted type code, so I'll let Freagarach handle it