Crash when starting a campaign map with recent libpng (1.5.8)

Bug #931141 reported by Hans Joachim Desserud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Critical
Unassigned

Bug Description

This is likely related to bug 905930, but I'm filing it separetly as they are triggered in widely different ways.

Steps to reproduce:
0. Make sure you are using a recent version of libpng (for instance 1.5.8)
1. Start Widelands -> Single player -> Campaigns -> Ok -> Ok

The game crashes with the following error message:
terminate called after throwing an instance of '_wexception'
  what(): [/opt/widelands/src/logic/replay.cc:241] Failed to save game for replay: [/opt/widelands/src/graphic/graphic.cc:726] Graphic::save_png: could not create png struct

Program received signal SIGABRT, Aborted.
0xb7fdd424 in __kernel_vsyscall ()

Backtrace:
#0 0xb7fdd424 in __kernel_vsyscall ()
#1 0xb79c707f in raise () from /lib/libc.so.6
#2 0xb79c8a05 in abort () from /lib/libc.so.6
#3 0xb7c35fad in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#4 0xb7c33d43 in ?? () from /usr/lib/libstdc++.so.6
#5 0xb7c33d7f in std::terminate() () from /usr/lib/libstdc++.so.6
#6 0xb7c33f24 in __cxa_rethrow () from /usr/lib/libstdc++.so.6
#7 0x0853c74d in WLApplication::campaign_game (this=0x8afe3b8) at /opt/widelands/src/wlapplication.cc:2120
#8 0x0853b4be in WLApplication::mainmenu_singleplayer (this=0x8afe3b8) at /opt/widelands/src/wlapplication.cc:1601
#9 0x0853b094 in WLApplication::mainmenu (this=0x8afe3b8) at /opt/widelands/src/wlapplication.cc:1515
#10 0x08536957 in WLApplication::run (this=0x8afe3b8) at /opt/widelands/src/wlapplication.cc:446
#11 0x08534fdd in main (argc=1, argv=0xbffffc24) at /opt/widelands/src/main.cc:99

Note that this ONLY happens with campaign maps (at least the first barbarian map, haven't tested all), regular maps and the tutorial seem to be unaffected.

Widelands r6208 on Arch

This was originally spotted and reported by AaronP (https://bugs.archlinux.org/task/28383?project=5&string=widelands). I tried to attach a bug watch, but Launchpad didn't seem to like the URL.

Tags: crash
description: updated
Revision history for this message
Jens Beyer (qcumber-some) wrote :

Confirmed, crashing on Trunk, using Gentoo 32bit with libpng-1.5.8

Changed in widelands:
status: New → Confirmed
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Increasing importance since I consider this a serious blocker.

Libpng 1.5.* is currently in Arch, Gentoo and Debian experimental [1]. I consider it likely this will be rolled out before we have the time to release build 18, so this will break build17 for many users.

[1] Repository for experimental packages which are likely to break stuff. I am not familiar with the process, but after the major issues have been fixed, the package is uploaded to unstable as usual and eventually makes its way to testing and stable. See http://packages.qa.debian.org/libp/libpng.html for the state of libpng in Debian.

Changed in widelands:
importance: High → Critical
Revision history for this message
SirVer (sirver) wrote :

What a ride: I set up a virtual machine, installed and learned archlinux just to reproduce this. Then I learned how to build packages for archlinux so that I could get a debug version of libpng. Then I debugged and learned the internals of libpng. Then i removed two lines in widelands and closed this bug and 905930. Net time investment: 8 hours.

Software development is sometimes strange.

Changed in widelands:
status: Confirmed → Fix Committed
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

SirVer: Awesome! Sounds like a productive day. Thanks for sorting this out. :)

Revision history for this message
SirVer (sirver) wrote :

Released in build17-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.