Closed wingnut-2019 closed 4 years ago
I cannot reproduce the crash, either with your steps or your savegame. (I can, however, quite happily crash my ship into that sun :smile:)
My environment:
Thread 1 "pioneer" received signal SIGSEGV, Segmentation fault.
#0 Graphics::VertexArray::Clear (this=0x0) at ../src/graphics/VertexArray.cpp:34
#1 0x00005555557aa366 in HyperspaceCloud::Render (this=0x5555642f6bc0, renderer=0x555555e2a720, viewCoords=..., viewTransform=..., camera=<optimized out>)
at /usr/include/c++/9/bits/unique_ptr.h:352
#2 0x00005555557706b7 in Camera::Draw (this=0x5555569f8c70, excludeBody=0x0, cockpit=0x0) at ../src/Camera.cpp:260
#3 0x0000555555698a21 in WorldView::Draw3D (this=0x55555659e640) at /usr/include/c++/9/bits/unique_ptr.h:352
#4 0x0000555555607802 in Pi::MainLoop () at ../src/WorldView.h:78
#5 0x0000555555607dc8 in Pi::Start (startPath=...) at ../src/Pi.cpp:1300
#6 0x00005555555e7848 in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.cpp:181
@pcercuei great with backtrace! :+1: Is this current master / which commit is your pioneer on?
That's commit f508f0047 (I believe it's the latest master), running on Linux.
Maybe it's not the star that crashes the game, but the hypercloud, if I'm guessing on the backtrace? (I haven't looked at the code, just riffing). @wingnut-2019 :point_up:
Maybe it's a different bug too :) The only thing I did was to load the savestate, and press twice on F1.
Maybe it's a different bug too :)
...got the same: if it's not a copy-paste problem, in attached file "output.txt" the last printed line is
num =
which is called in Background.cpp
:
(it has changed due to PR's)
In same file there's also a (strange?) text:
Loading saved game 'save3' failed: wrong save file version.
Game::LoadGame('Kruger 60 A')
which can or cannot be related to the crash.
Thanks for your investigations.
The line
Loading saved game 'save3' failed: wrong save file version.
relates to a savegame from the previous pioneer release I used (pioneer-20180203-win32). The issue also was occuring in that version by the way. I removed all savegames from previous releases, then loaded the savegame from the first post and the game crashes again when I reorient the ship towards the star.
I can't really tell from my end whether the game crashes due to the star or some hperclouds in it's vicinity.
Find attached output.txt and opengl.txt from after this crash: opengl.txt output.txt
I've tracked down the hypercloud bug; the InitGraphics
method is not being called when it's loaded from a savefile, triggering a segfault here: https://github.com/pioneerspacesim/pioneer/blob/f508f0047a2ead557898aad6220afb31b490099c/src/HyperspaceCloud.cpp#L173
This doesn't appear to be the root cause of the problem, but adding InitGraphics()
to the end of the JSON constructor should fix this specific crash.
@Web-eWorks will you PR that?
@impaktor Sure, can do. I'll get that tested and PR'd in a few minutes.
@wingnut-2019 I've created a PR (#4672) to resolve the hyperspace cloud crash bug; if you could pull that and test to see if the game still crashes for you? I cannot reproduce the bug you're describing, which makes me think it's related to your specific graphics configuration.
For reference, this is what Kruger 60 A looks like for me:
Hypercloud fix now merged, thanks @Web-eWorks!
Could those who replicated the bug try to do so again, with a fresh backtrace? ping: @pcercuei or @wingnut-2019
@wingnut-2019 if you're still interested in helping to reproduce this bug, please run the game via GDB (Gnu De-Bugger) and give us a callstack from the crash - at the moment, none of us are able to reproduce this specific crash, and it appears your crash is an unrelated threading issue given how the output log cuts off halfway through a syscall function.
Closing this as stale; we've fixed the only bug we could reproduce.
Observed behaviour
Game crashes when certain types of stars become visible. As of now I observed it for Type 'M' red stars and sometimes Brown dwarfs
Expected behaviour
Game should not crash
Steps to reproduce
I have included a savegame just after arriving in the Kruger 60 system. The issue might not be reproducible (easily) on other machines as I could not find a similar issue loged already.
My pioneer version (and OS): pioneer-20190203 on Windows 10
Attachments
Kruger 60 A.zip (Savegame) opengl.txt output.txt (output.txt after provoking the game crash with above savegame)