Memory corruption in the gui

Bug #1664052 reported by Notabilis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

In rare cases the game crashes when starting an expedition and the ship window is open.
To (try to) reproduce: Create a ship, open its window. Then:
(X) Start an expedition in the port, wait until the ship has been loaded. Abort the expedition in the ship window. Repeat from (X).
At some point, it should crash while trying to create the buttons for the expedition control window when the ship is loaded.

Noticed in trunk revision 8284. Multiple backtraces are attached.

Tags: crash

Related branches

Revision history for this message
Notabilis (notabilis27) wrote :
Revision history for this message
kaputtnik (franku) wrote :

Just a guess because notifications are involved... Can you test if this happens also with

https://code.launchpad.net/~widelands-dev/widelands/bug-1658489-epedition-tab

Revision history for this message
Notabilis (notabilis27) wrote :

Bad luck: It becomes even worse. ;)
Additionally to the known bug, I also got an exception when aborting an expedition. But of course this doesn't mean that it is related to the branch.

Revision history for this message
GunChleoc (gunchleoc) wrote :

The first crash log happens when the shipwindow created a new goto button and then the box that it's in relayouts itself.

The line is in

Box::update_desired_size()

And it is

  set_desired_size(std::min(totaldepth, max_x_), // + get_lborder() + get_rborder(),
                   std::min(maxbreadth, max_y_)); // + get_tborder() + get_bborder());

for some reason, the breadth is huge.

Both crashes originate when the ship's window processes Widelands::NoteShipWindow, so I guess some state goes wrong there.

tags: added: crash
Changed in widelands:
milestone: none → build20-rc1
importance: Undecided → High
status: New → Confirmed
Revision history for this message
kaputtnik (franku) wrote :

I think there where some changes to the ui in the past and i tried to reproduce this.

Testing with current trunk i got the attached backtrace.

Revision history for this message
kaputtnik (franku) wrote :

Damn, wrong click :-D

Attachment is here...

Revision history for this message
kaputtnik (franku) wrote :

Then i tested with branch: https://code.launchpad.net/~widelands-dev/widelands/bug-1653460-panel-init-width/+merge/318358

With gdb running the game crashed with message:

Thread 1 "widelands" received signal SIGSEGV, Segmentation fault.
0x000000000a0c0140 in ?? ()

Full backtrace attached.

In Order to get this crash one has to try to start expedition, stop the expedition when the ship is ready, start expedition again. This has to be done several times.

Revision history for this message
kaputtnik (franku) wrote :
GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → GunChleoc (gunchleoc)
Revision history for this message
kaputtnik (franku) wrote :
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.