-
Notifications
You must be signed in to change notification settings - Fork 27
Actor - use fallbacks in GetMovePathEnd() #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actor - use fallbacks in GetMovePathEnd() #224
Conversation
Not doing this causes a crash when a full scene save is done and the move path happens to be empty. Happened to me multiple times over in Conquest mode (yes i know it's broken, doesn't *have* to be) when I set my brain robot on a path to dig a tunnel. Here's a gdb backtrace of the crash: ``` [Detaching after fork from child process 73767] /usr/include/c++/15.2.1/bits/stl_list.h:1688: std::__cxx11::list<_Tp, _Allocator>::const_reference std::__cxx11::list<_Tp, _Allocator>::back() const [with _Tp = RTE::Vector; _Alloc = std::allocator<RTE::Vector>; const_reference = const RTE::Vector&]: Assertion '!this->empty()' failed. Thread 1 "CortexCommand" received signal SIGABRT, Aborted. 0x00007ffff6aaa0db in pthread_kill () from /usr/lib/libc.so.6 (gdb) lay src (gdb) bt #0 0x00007ffff6aaa0db in pthread_kill () from /usr/lib/libc.so.6 cortex-command-community#1 0x00007ffff6a447c8 in raise () from /usr/lib/libc.so.6 cortex-command-community#2 0x00007ffff6a2560d in abort () from /usr/lib/libc.so.6 cortex-command-community#3 0x00007ffff6e9870f in std::__glibcxx_assert_fail (file=<optimized out>, line=<optimized out>, function=<optimized out>, condition=<optimized out>) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/assert_fail.cc:41 cortex-command-community#4 0x00005555556b7ff8 in std::__cxx11::list<RTE::Vector, std::allocator<RTE::Vector> >::back (this=0x555583892728) at /usr/include/c++/15.2.1/bits/stl_list.h:1688 cortex-command-community#5 0x0000555555890712 in RTE::Actor::GetMovePathEnd (this=0x555583891900) at ../Source/Entities/Actor.h:450 cortex-command-community#6 0x000055555588470c in RTE::Scene::SaveSceneObject (this=0x7ffe82e4bb90, writer=..., sceneObjectToSave=0x555583891900, isChildAttachable=false, saveFullData=true) at ../Source/Entities/Scene.cpp:1369 cortex-command-community#7 0x0000555555880abc in RTE::Scene::Save (this=0x7ffe82e4bb90, writer=...) at ../Source/Entities/Scene.cpp:1097 cortex-command-community#8 0x0000555555d9afca in RTE::operator<< (writer=..., operand=0x7ffe82e4bb90) at ../Source/System/Serializable.cpp:53 cortex-command-community#9 0x0000555555ad13ab in RTE::Writer::NewPropertyWithValue<RTE::Scene const*> (this=0x7fffffffcab0, propName="AddScene", propValue=@0x7fffffffc810: 0x7ffe82e4bb90) at ../Source/System/Writer.h:103 cortex-command-community#10 0x0000555555acc865 in RTE::MetaMan::Save (this=0x555557448710, writer=...) at ../Source/Managers/MetaMan.cpp:287 cortex-command-community#11 0x0000555555beb237 in RTE::MetagameGUI::SaveGame (this=0x55555ba82b20, saveName="AutoSave", savePath="Userdata/UserSavesConquest.rte/AutoSave.ini", resaveSceneData=false) at ../Source/Menus/MetagameGUI.cpp:1109 cortex-command-community#12 0x0000555555c02cbb in RTE::MetagameGUI::FinalizeOffensive (this=0x55555ba82b20) at ../Source/Menus/MetagameGUI.cpp:4458 cortex-command-community#13 0x0000555555c018d5 in RTE::MetagameGUI::UpdateOffensives (this=0x55555ba82b20) at ../Source/Menus/MetagameGUI.cpp:4321 cortex-command-community#14 0x0000555555bee37e in RTE::MetagameGUI::Update (this=0x55555ba82b20) at ../Source/Menus/MetagameGUI.cpp:1492 cortex-command-community#15 0x0000555555acf7a0 in RTE::MetaMan::Update (this=0x555557448710) at ../Source/Managers/MetaMan.cpp:892 cortex-command-community#16 0x0000555555ac2e84 in RTE::MenuMan::UpdateMetaGameMenu (this=0x55555740f4e0) at ../Source/Managers/MenuMan.cpp:221 cortex-command-community#17 0x0000555555ac2ab8 in RTE::MenuMan::Update (this=0x55555740f4e0) at ../Source/Managers/MenuMan.cpp:146 cortex-command-community#18 0x0000555555674e81 in RunMenuLoop () at ../Source/Main.cpp:272 cortex-command-community#19 0x0000555555675a55 in RunGameLoop () at ../Source/Main.cpp:374 cortex-command-community#20 0x000055555567658a in main (argc=1, argv=0x7fffffffdc88) at ../Source/Main.cpp:468 ``` Doesn't crash with this applied.
Causeless
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Clean solution
|
All these PRs are failing to build but it's something on the root repo, I'll get these in and investigate soon |
9c6aa3c
into
cortex-command-community:development
Personally I have no clue what's up, I'm on Linux and all I want is for my current autistic obsession game of the season to not crash all the time 🙀 |
…tex-command-community#224 My bad! I forgot to put the include in the commit. Should compile fine with it not forgotten lmao cortex-command-community#224
oops :3 |
Actor.h - include PathFinder.h, fix compile fail introduced in PR #224
Not doing this causes a crash when a full scene save is done and the move path happens to be empty. Happened to me multiple times over in Conquest mode (yes i know it's broken, doesn't have to be) when I set my brain robot on a path to dig a tunnel.
Here's a gdb backtrace of the crash:
Doesn't crash with this applied.