Skip to content

Conversation

@Architector4
Copy link
Contributor

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
#1  0x00007ffff6a447c8 in raise () from /usr/lib/libc.so.6
#2  0x00007ffff6a2560d in abort () from /usr/lib/libc.so.6
#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
#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
#5  0x0000555555890712 in RTE::Actor::GetMovePathEnd (this=0x555583891900) at ../Source/Entities/Actor.h:450
#6  0x000055555588470c in RTE::Scene::SaveSceneObject (this=0x7ffe82e4bb90, writer=..., sceneObjectToSave=0x555583891900, isChildAttachable=false, saveFullData=true) at ../Source/Entities/Scene.cpp:1369
#7  0x0000555555880abc in RTE::Scene::Save (this=0x7ffe82e4bb90, writer=...) at ../Source/Entities/Scene.cpp:1097
#8  0x0000555555d9afca in RTE::operator<< (writer=..., operand=0x7ffe82e4bb90) at ../Source/System/Serializable.cpp:53
#9  0x0000555555ad13ab in RTE::Writer::NewPropertyWithValue<RTE::Scene const*> (this=0x7fffffffcab0, propName="AddScene", propValue=@0x7fffffffc810: 0x7ffe82e4bb90) at ../Source/System/Writer.h:103
#10 0x0000555555acc865 in RTE::MetaMan::Save (this=0x555557448710, writer=...) at ../Source/Managers/MetaMan.cpp:287
#11 0x0000555555beb237 in RTE::MetagameGUI::SaveGame (this=0x55555ba82b20, saveName="AutoSave", savePath="Userdata/UserSavesConquest.rte/AutoSave.ini", resaveSceneData=false) at ../Source/Menus/MetagameGUI.cpp:1109
#12 0x0000555555c02cbb in RTE::MetagameGUI::FinalizeOffensive (this=0x55555ba82b20) at ../Source/Menus/MetagameGUI.cpp:4458
#13 0x0000555555c018d5 in RTE::MetagameGUI::UpdateOffensives (this=0x55555ba82b20) at ../Source/Menus/MetagameGUI.cpp:4321
#14 0x0000555555bee37e in RTE::MetagameGUI::Update (this=0x55555ba82b20) at ../Source/Menus/MetagameGUI.cpp:1492
#15 0x0000555555acf7a0 in RTE::MetaMan::Update (this=0x555557448710) at ../Source/Managers/MetaMan.cpp:892
#16 0x0000555555ac2e84 in RTE::MenuMan::UpdateMetaGameMenu (this=0x55555740f4e0) at ../Source/Managers/MenuMan.cpp:221
#17 0x0000555555ac2ab8 in RTE::MenuMan::Update (this=0x55555740f4e0) at ../Source/Managers/MenuMan.cpp:146
#18 0x0000555555674e81 in RunMenuLoop () at ../Source/Main.cpp:272
#19 0x0000555555675a55 in RunGameLoop () at ../Source/Main.cpp:374
#20 0x000055555567658a in main (argc=1, argv=0x7fffffffdc88) at ../Source/Main.cpp:468

Doesn't crash with this applied.

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 Causeless enabled auto-merge October 28, 2025 21:44
Copy link
Contributor

@Causeless Causeless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Clean solution

@Causeless
Copy link
Contributor

All these PRs are failing to build but it's something on the root repo, I'll get these in and investigate soon

@Causeless Causeless disabled auto-merge October 28, 2025 21:45
@Causeless Causeless merged commit 9c6aa3c into cortex-command-community:development Oct 28, 2025
0 of 4 checks passed
@Architector4
Copy link
Contributor Author

All these PRs are failing to build but it's something on the root repo, I'll get these in and investigate soon

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 🙀

@Architector4 Architector4 deleted the patch-3 branch October 29, 2025 01:10
Architector4 added a commit to Architector4/Cortex-Command-Community-Project that referenced this pull request Nov 3, 2025
…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
@Architector4
Copy link
Contributor Author

All these PRs are failing to build but it's something on the root repo, I'll get these in and investigate soon

oops :3

Causeless added a commit that referenced this pull request Nov 3, 2025
Actor.h - include PathFinder.h, fix compile fail introduced in PR #224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants