Opened 15 months ago

Closed 6 months ago

Last modified 6 months ago

#5402 closed defect (needsinfo)

crash (SIGSEGV) after alt-tab during single-player map generation

Reported by: Paul Wise Owned by:
Priority: If Time Permits Milestone:
Component: Core engine Keywords:
Cc: Patch:


I started 0ad, had clicked on the button to create a random single-player map and then alt-tabbed to another program and while in the background (or possibly when I clicked back onto 0ad, not sure), 0ad crashed with a SIGSEGV.

I'm using Debian buster's packages 0ad, 0ad-data, mesa 18.3.2-1, Linux 4.19.20-1 with an nvidia GPU using the nouveau drivers.

Please close the ticket if the backtrace below and the attached full backtrace is not useful.

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055ce227ed688 in CMatrix3D::GetIn (this=0x70005b00730072) at ../../../source/maths/Matrix3D.cpp:269
269	../../../source/maths/Matrix3D.cpp: No such file or directory.
[Current thread is 1 (Thread 0x7fb878f65e80 (LWP 26875))]
#0  0x000055ce227ed688 in CMatrix3D::GetIn (this=0x70005b00730072) at ../../../source/maths/Matrix3D.cpp:269
#1  0x000055ce22b3a0ad in CMiniMap::GetAngle (this=0x55ce3244e500) at ../../../source/gui/MiniMap.cpp:233
#2  CMiniMap::GetMouseWorldCoordinates (this=this@entry=0x55ce3244e500, x=@0x7ffdc722a91c: 0, z=@0x7ffdc722a924: 0) at ../../../source/gui/MiniMap.cpp:214
#3  0x000055ce22b3ca4f in CMiniMap::SetCameraPos (this=0x55ce3244e500) at ../../../source/gui/MiniMap.cpp:226
#4  CMiniMap::HandleMessage (this=0x55ce3244e500, Message=...) at ../../../source/gui/MiniMap.cpp:149
#5  0x000055ce22b32a6b in IGUIObject::SendEvent (this=this@entry=0x55ce3244e500, type=type@entry=GUIM_MOUSE_PRESS_LEFT, EventName=...) at ../../../source/gui/IGUIObject.cpp:444
#6  0x000055ce22ad36d2 in CGUI::HandleEvent (this=0x55ce323e3510, ev=ev@entry=0x7ffdc722acb0) at /usr/include/c++/8/bits/allocator.h:139
#7  0x000055ce22b08aeb in CGUIManager::HandleEvent (this=0x55ce24dfe8c0, ev=0x7ffdc722acb0) at /usr/include/c++/8/ext/atomicity.h:96
#8  0x000055ce22b096da in gui_handler (ev=0x7ffdc722acb0) at ../../../source/gui/GUIManager.cpp:49
#9  0x000055ce22b9a36a in in_dispatch_event (ev=0x7ffdc722acb0) at ../../../source/lib/input.cpp:62
#10 0x000055ce22650044 in PumpEvents () at ../../../source/main.cpp:226
#11 Frame () at ../../../source/main.cpp:366
#12 0x000055ce226546a5 in RunGameOrAtlas (argc=<optimized out>, argv=<optimized out>) at ../../../source/main.cpp:634
#13 0x000055ce226400b7 in main (argc=1, argv=0x7ffdc722b6c8) at ../../../source/main.cpp:680

Attachments (1)

0ad-crash-backtrace.txt (57.7 KB) - added by Paul Wise 15 months ago.
gdb backtrace of the crash

Download all attachments as: .zip

Change History (10)

Changed 15 months ago by Paul Wise

Attachment: 0ad-crash-backtrace.txt added

gdb backtrace of the crash

comment:1 Changed 15 months ago by Angen

Hi, sorry for late reply. I would have some questions if you are willing to answer them.

Does it happen only when you use alt-tab on random maps? Does random map creates without crash when you stay in window ( no alt-tab ) ? Does game crash on alt-tab with e.g. scenario loading?

If this is only case ( alt-tab with combination of random map generation ) or you cannot start any match, would you try to download game again, because there may something missing as it says: "No such file or directory".

Thank you for your time.

comment:2 Changed 15 months ago by Paul Wise

I have only had the crash happen once, alt-tab and random maps usually both work fine without crashes, so I'm not sure what the answers to your questions are.

The reason for the "No such file or directory" message is that the 0ad source code was not present on my system at the time when I generated the backtrace because I was working from the binaries only, from the Debian 0ad package.

The core dump file has since been automatically deleted, so if the information in the backtrace isn't useful, I suggest closing this bug report.

comment:3 Changed 15 months ago by Angen

Disabling glsl and postprocesing in graphic options should solve the problem with alt-tab during loading maps.There is patch prepared which should fix it in next version. After map is loaded, alt-tab with postprocessing and glsl on should not be problem.

It was not encountered in debian or with nvidia graphics so i did not think about it first time.

Sorry foe bug still there.

comment:4 Changed 15 months ago by Paul Wise

Great, thanks for your work on 0ad!

comment:5 Changed 15 months ago by Angen

I have one more question for you.

As looks like you are only one who managed to reproduce this alt-tab error on linux system and with nvidia, would you be willing to test the patch which should fix it (saying should as this scenario with linux/nvidia was not found before therefor it is not known if it fixes this case) ?

(This steps are optional but do not require applying patches or downloanding anything else) First I would ask you to reproduce this error to make sure it is really it. Have postprocessing on in game graphic options. (alt-tab during loading and go back to game when it reaches 100% and is going to start, so alt-tab at about 90% and wait some time to come back to game.) Then try to do it with postprocessing off. If the problem is not solved by postprocessing off, set also glsl off and try again. In case game is still crashing, problem is something else. If it was solved by postprocessing and/or glsl off, the patch should fix it but it need to be tested.

If you say yes, you would need to get source files and packages to be able to build changed version (suggest use SVN). After you manage to get source files and needed packages, you would need to apply the mentioned patch If you install arcanist you need to use this command "arc patch D1495" (without "") in command line in root of 0ad folder. I think you can apply patch also manually by downloanding it from given link and using svn option apply patch.

Then build release version and try to reproduce crash (enable in game graphic options glsl postprocessing and then alt-tab during loading. You can try alt-tab and go back into game in different times during loading screen to be sure patch works but you really need to alt-tab before 100% and come back into game after 100%)

In case you think building game is too much for you, or you do not have so much space on disk to get source files, developers might be able to build that version for you to test.

If you have more questions or any troubles with it, for quicker response (well, depends on timeline) you can consider to use this channel

I wish you nice day and thank you for your time.

Last edited 15 months ago by Angen (previous) (diff)

comment:6 Changed 15 months ago by Paul Wise

I've tried to reproduce the crash without the patch a bunch of times and with the alt-tab at various percentage loading from 19% up to 96% but I didn't get any more crashes no matter when I do the alt-tab. The postprocessing and GLSL options are turned on.

I think probably the bug should be closed?

comment:7 Changed 15 months ago by Angen

Thank you for testing. If you ever encounter this crash, please locate log files and post them with ticket without starting game again as they get overwritten.

comment:8 Changed 6 months ago by Angen

Resolution: needsinfo
Status: newclosed

comment:9 Changed 6 months ago by stanislas69

Keywords: crash removed
Milestone: Backlog
Note: See TracTickets for help on using tickets.