Page MenuHomeWildfire Games

Fix formation infinite loop.
ClosedPublic

Authored by wraitii on Jan 18 2021, 11:29 AM.

Details

Summary

#5932 reported a segfault. After replaying, it is an infinite loop in Order.Repair in a formation controller.
The trouble is that the controller is out of the world, & empty. The former would work because we have explicit checks, though it's unsafe (see another diff). The latter is buggy.

The bug is that the formation controller has already been destroyed, but by bad luck it had a timer firing on that turn, and that can still go through since the component hasn't been deleted yet. See D2923 for a similar issue.

This fixes that by resetting to idle, which resets timers and prevents this from happening.

Test Plan

Replay the ticket's commands.txt

Event Timeline

wraitii created this revision.Jan 18 2021, 11:29 AM

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for

See https://jenkins.wildfiregames.com/job/macos-differential/2936/display/redirect for more details.

wraitii requested review of this revision.Jan 18 2021, 11:39 AM
wraitii updated this revision to Diff 15457.Jan 18 2021, 12:04 PM

Don't comment the fix :p

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file f

See https://jenkins.wildfiregames.com/job/macos-differential/2938/display/redirect for more details.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 18 2021, 7:29 PM
This revision was automatically updated to reflect the committed changes.