Scorched3d SIGSEGV on startup

Bug #35375 reported by Peter Grundström
96
This bug affects 1 person
Affects Status Importance Assigned to Milestone
scorched3d (Ubuntu)
Fix Released
Medium
Emmet Hikory
wxwidgets2.6 (Debian)
Fix Released
Unknown
wxwidgets2.6 (Ubuntu)
Fix Released
Low
Emmet Hikory
wxwidgets2.8 (Ubuntu)
Fix Released
Undecided
Michael Bienia

Bug Description

Scorched3d crashes with a segmentation fault directly at startup.

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1229686560 (LWP 6633)]

0xb74f90f0 in wcsncpy () from /lib/tls/i686/cmov/libc.so.6

#0 0xb74f90f0 in wcsncpy () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7808ed5 in wxGetUserName () from /usr/lib/libwx_baseu-2.6.so.0
#2 0xb78065d6 in wxGetUserName () from /usr/lib/libwx_baseu-2.6.so.0
#3 0x081c5cb3 in ?? ()

Revision history for this message
Chuck Short (zulcss) wrote :

Im unable to reproduce this in dapper. Can you try the most recent in dapper?

Thanks

Revision history for this message
Peter Grundström (petgru) wrote :

it is still here for me. I found one more thing out that might be useful. When I run the program as root I get this error message:

Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.6 (no debug,Unicode,compiler with C++ ABI 102,wx containers,compatible with 2.4),
and your program used 2.6 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.4).
Aborted

seams like c++ abi is missmatching.

Revision history for this message
Gauvain Pocentek (gpocentek) wrote :

A new package has been uploaded in dapper. Peter, could you test it?

Changed in scorched3d:
status: Unconfirmed → Needs Info
Revision history for this message
Peter Grundström (petgru) wrote :

now, after installing the new scorched3d package and reinstalling the libwxgtk2.6-0 package i'm able to run scorched3d as root. Running it as my normal user still makes it crash, with the same backtrace.

Revision history for this message
Emmet Hikory (persia) wrote :

Could you please confirm that the entire backtrace is in the bug description? The function with an error does not appear to be in scorched3d, and I'm not sure which call is causing the difficulty. If possible, please attach a transcript of the complete gdb session during a crash to the bug.

Revision history for this message
Sven Broeckling (sven-broeckling) wrote :

Doesn't work for me as well with the updated package. The wxWidgets Interface runs as root, but not as User.

What information should i provide? A complete strace?

Revision history for this message
Emmet Hikory (persia) wrote :

Actually, a backtrace would be more useful for me than an strace. Could you please follow the instructions on https://wiki.ubuntu.com/DebuggingProgramCrash and generate a full backtrace. Also, could you please include your architecture and the output of `dpkg -l | grep libc6` in the attachment comment?

Revision history for this message
Sven Broeckling (sven-broeckling) wrote :

Well.. the nostrip, noopt Version don't crash. I rebuilt the .deb without nostrip and noopt, and the game keeps running. There's one warning from the game, but nothing more.. :

Scorched3D : Warning: Your display settings file (/home/me//.scorched3d/display.xml) cannot be
written to. Your settings will not be saved from one game to the next.
To fix this problem correct the permissions for this file.

Architecture is x86 32 bit, dapper drake with fglrx. dpkg -l |grep libc6 shows :

sbroeckling@deepblue:~$ dpkg -l|grep libc6
ii libc6 2.3.6-0ubuntu18 GNU C Library: Shared libraries and Timezone
ii libc6-dev 2.3.6-0ubuntu18 GNU C Library: Development Libraries and Hea
ii libc6-i686 2.3.6-0ubuntu18 GNU C Library: Shared libraries [i686 optimi

Anything useful?

Revision history for this message
Emmet Hikory (persia) wrote :

Thanks for testing this. I'm not sure why the repository version crashes, and a local compile succeeds: this shouldn't happen. I was hoping for a repeatable crash pointing to either an issue with scorched3d or libc6-i686.

Revision history for this message
Emmet Hikory (persia) wrote :

Looking at this a bit further, I believe it may be an issue with the optimizations for i686 (it works fine on AMD64). Could you try a build with just the noopt parameter (or alter debian/rules so that both CFLAGS lines at the beginning read -O0)?

Revision history for this message
Sven Broeckling (sven-broeckling) wrote :

Ok. After writing several lines on how the game keeps crashing even with noopt now, it started right now. I think i did the following - i built the game using noopt, started the game once as root (and the wxwidgets menu shows up), closed the game. After that it runs as user too.

Then i removed the 3 .debs and installed the dapper repos version, and it runs too?! This thing seems to work everytime i try to backtrace it...

May that be a permission issue? After starting it with root privilleges, it'll run as normal user too..

Revision history for this message
Emmet Hikory (persia) wrote :

Hurrah! A reproduction on amd64. This I may be able to track.

Changed in scorched3d:
status: Needs Info → Confirmed
Revision history for this message
urbantechs (trent-urban-techs) wrote :

Is someone working on this??

Revision history for this message
Berge Schwebs Bjørlo (berge) wrote :

scorched3d on Edgy segfaults on me every time I try to run it, on a (32 bit) Pentium M CPU. Attached is a gdb-backtrace of the crash.

0 berge@bakkemannskapet:~> dpkg -l | grep libc6
ii libc6 2.4-1ubuntu12 GNU C Library: Shared libraries
ii libc6-dev 2.4-1ubuntu12 GNU C Library: Development Libraries and Hea
ii libc6-i686 2.4-1ubuntu12 GNU C Library: Shared libraries [i686 optimi

Revision history for this message
Berge Schwebs Bjørlo (berge) wrote :

..and attached is a valgrind-log of scorched3d crashing, as launchpad won't let me upload two attachments with one comment, it seems.

Revision history for this message
Daniel Werner (demitsu) wrote :

Maybe I can provide a solution for part of the mystery.

Some weeks ago, I was quite amazed to find that on the very same machine, Scorched 3D ran on all user accounts but one. When started as the latter, Scorched segfaulted throwing the very backtrace mentioned in the initial report. wxGetUserName already hinted at the passwd file, and there dwelled the culprit:

The account where Scorched 3D crashed had a German umlaut in its GECOS' full name field. After the offending character's removal, Scorched has stopped crashing ever since.

wxGetUserName calling wcsncpy seems not to work as expected with actual wide characters. Or could it be a coincidence that Scorched 3D fails for Grundström, Bröckling, Bjørlo, and in my case, Müller ... ? ;)

Could this be a bug in libc itself, or in wxGetUserName's handling of wchars?

Revision history for this message
Sven Broeckling (sven-broeckling) wrote :

I can confirm this. My GECOS contains a german umlaut - just as Daniel assumed. If i run scorched3d on the same system with the umlaut in my GECOS it crashes. If i remove the umlaut it runs.

Revision history for this message
Vadim Zeitlin (vadim-wxwidgets) wrote :

This was a bug in wxWidgets and it was fixed as soon as we learnt about it, see thread at http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/84070 for more details. The fix will appear in (soon to be released) 2.8.2 and the future 2.9 series.

Revision history for this message
Emmet Hikory (persia) wrote :

The attached patch is extracted from CVS for wxwidgets2.8. It provides for safe processing of Unicode GECOS entries.

Revision history for this message
Emmet Hikory (persia) wrote :

Oops. I should wait longer before grabbing patches from CVS :). The attached debdiff includes all the necessary files, and compiles, and appears to do the right thing. With a patched wxwidgets, I was unable to duplicate the scorched3d SIGSEGV.

Revision history for this message
Michael Bienia (geser) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Format: 1.7
Date: Mon, 12 Mar 2007 09:53:59 +0900
Source: wxwidgets2.8
Binary: wx2.8-headers python-wxversion wx2.8-headers-msw libwxbase2.8-dbg libwxbase2.8-dev
+libwxgtk2.8-dev libwxmsw2.8-dbg wx2.8-doc libwxbase2.8-0 python-wxaddons libwxgtk2.8-0 python-wxtools
+libwxmsw2.8-dev python-wxgtk2.8-dbg wx2.8-examples libwxgtk2.8-dbg wx-common wx2.8-i18n python-wxgtk2.8
Architecture: source
Version: 2.8.1.1-0ubuntu2
Distribution: feisty
Urgency: low
Maintainer: Ubuntu MOTU developers <email address hidden>
Changed-By: Emmet Hikory <email address hidden>
Description:
 libwxbase2.8-0 - wxBase library (runtime) - non-GUI support classes of wxWidgets t
 libwxbase2.8-dbg - wxBase library (debug) - non-GUI support classes of wxWidgets too
 libwxbase2.8-dev - wxBase library (development) - non-GUI support classes of wxWidge
 libwxgtk2.8-0 - wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
 libwxgtk2.8-dbg - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
 libwxgtk2.8-dev - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
 libwxmsw2.8-dbg - wxMSW mingw32msvc-cross (debug)
 libwxmsw2.8-dev - wxMSW mingw32msvc-cross
 python-wxaddons - wxWidgets Cross-platform C++ GUI toolkit (wxPython add-on package
 python-wxgtk2.8 - wxWidgets Cross-platform C++ GUI toolkit (wxPython binding)
 python-wxgtk2.8-dbg - wxWidgets Cross-platform C++ GUI toolkit (wxPython binding)
 python-wxtools - wxWidgets Cross-platform C++ GUI toolkit (wxPython common files)
 python-wxversion - wxWidgets Cross-platform C++ GUI toolkit (wxPython version select
 wx-common - wxWidgets Cross-platform C++ GUI toolkit (common support files)
 wx2.8-doc - wxWidgets Cross-platform C++ GUI toolkit (documentation)
 wx2.8-examples - wxWidgets Cross-platform C++ GUI toolkit (examples)
 wx2.8-headers - wxWidgets Cross-platform C++ GUI toolkit (header files)
 wx2.8-headers-msw - Extra wxWidgets headers for mingw32msvc-cross
 wx2.8-i18n - wxWidgets Cross-platform C++ GUI toolkit (i18n support)
Launchpad-Bugs-Fixed: 35375
Changes:
 wxwidgets2.8 (2.8.1.1-0ubuntu2) feisty; urgency=low
 .
   * fixed crash in wxGetUserName() in Unicode (from CVS) (LP: #35375)
Files:
 5d57c3686e853bf7e634f975c9835bae 1432 libs optional wxwidgets2.8_2.8.1.1-0ubuntu2.dsc
 4502691f7e49747959c7cd9a68148d62 38741 libs optional wxwidgets2.8_2.8.1.1-0ubuntu2.diff.gz
Original-Maintainer: Ron Lee <email address hidden>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.2 (GNU/Linux)

iQCVAwUBRfXLqaPP1313boLqAQNwWQQAs/jDmRmQfmLzW2NZdkit7q0mqXZbRxZo
WIQRHMq7bN1cXKooB09A8Q9HaiAJcC4H+fGQt9cGDy254KspA+QeRzzQhkYWQTXS
68LNEQW6N2faXKE4quolJtXCQgLpciuIXX9juHBDQ21xpsb0JhS7S7++GxwrOTff
d6NAs8AVJa0=
=Zj9c
-----END PGP SIGNATURE-----

Changed in wxwidgets2.8:
assignee: nobody → geser
status: Unconfirmed → Fix Committed
Revision history for this message
Emmet Hikory (persia) wrote :

wxwidgets sucessfully built on all architectures. I'll retest with scorched3d and wxwidgets from the repositories once the mirrors are updated.

Changed in wxwidgets2.8:
status: Fix Committed → Fix Released
Revision history for this message
Emmet Hikory (persia) wrote :

Hrm. Scorched3d is still crashing when the GECOS field contains ë (or presumably other affected characters), even with wxwidgets2.8 2.8.1.1-0ubuntu2 from the repositories. It appears my previous testing was marred by the presence of ~/.scorched3d/display.xml.

Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :

(unsubscribing u-u-s, as there's no longer a working patch to fix this bug. please resubscribe, when this is not the case)

Revision history for this message
Félix Velasco (felix-velasco) wrote :

Same thing happens with the spanish tilde (Félix in my name). Crashes on startup

Revision history for this message
Emmet Hikory (persia) wrote :

    Looking at this more, I realise that scorched3d links against wxwidgets2.6, rather than wxwidgets2.8, so the previous patch didn't do anything useful for this. I've backported the wxwidgets2.8 fix to wxwidgets2.6 (attached). Unfortunately, I don't seem to be able to compile wxwidgets2.6 from the repositories today (even without changes), so I cannot test to see if it works. Would anyone else be willing to give it a try?

Revision history for this message
Emmet Hikory (persia) wrote :

    Today wxwidgets2.6 compiles for me, and I was able to test the above patch. Scorched3d now starts, although unfortunately the stored username appears to replace multibyte characters with spaces ("të H" became "t H"). I'm not sure why this happens, or how to fix it, but the game can be played (although the name may display incorrectly).

Emmet Hikory (persia)
Changed in scorched3d:
assignee: nobody → persia
Changed in wxwidgets2.6:
status: Unknown → Unconfirmed
Revision history for this message
TomasHnyk (sup) wrote :

I can confirm this for áš (Tomáš) in Feisty Final.
BTW: during the search for this bud, I found at least five different crash reports realted to scorch3d, the game does not seem to be very stable:-/

Revision history for this message
Emmet Hikory (persia) wrote :

Respun wxwidgets2.6 debdiff to account for recent upload.

Revision history for this message
Emmet Hikory (persia) wrote :

As this bug hasn't had much attention, please find below a testcase from the upstream bug report that reproduces the bug (so long as there are multibyte characters in your GECOS field), whcih testcase succeeds with the applied patch:

#include <stdio.h>
#include <wx/utils.h>

int main(void)
{
  wxString userName = ::wxGetUserName();
  printf("wxusername: %s\n", userName.c_str());
  return 0;
}

Revision history for this message
Emmet Hikory (persia) wrote :

My apologies, I failed to update the date in the last debdiff. This should be an improvement.

Emmet Hikory (persia)
Changed in scorched3d:
status: Confirmed → In Progress
Emmet Hikory (persia)
Changed in wxwidgets2.6:
assignee: nobody → persia
importance: Undecided → Low
status: Unconfirmed → Fix Committed
Revision history for this message
Emmet Hikory (persia) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 18 May 2007 21:17:31 +0900
Source: wxwidgets2.6
Binary: wx2.6-headers-msw python-wxversion libwxmsw2.6-dbg python-wxgtk2.6 libwxbase2.6-0 wx2.6-examples libwxgtk2.6-dbg python-wxgtk2.6-dbg wx2.6-doc python-wxtools libwxgtk2.6-dev wx2.6-headers wx2.6-i18n wx-common libwxbase2.6-dev libwxbase2.6-dbg libwxgtk2.6-0 libwxmsw2.6-dev
Architecture: source
Version: 2.6.3.2.1.5ubuntu8
Distribution: gutsy
Urgency: low
Maintainer: Ubuntu MOTU developers <email address hidden>
Changed-By: Emmet Hikory <email address hidden>
Description:
 libwxbase2.6-0 - wxBase library (runtime) - non-GUI support classes of wxWidgets t
 libwxbase2.6-dbg - wxBase library (debug) - non-GUI support classes of wxWidgets too
 libwxbase2.6-dev - wxBase library (development) - non-GUI support classes of wxWidge
 libwxgtk2.6-0 - wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
 libwxgtk2.6-dbg - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
 libwxgtk2.6-dev - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
 libwxmsw2.6-dbg - wxMSW mingw32msvc-cross (debug)
 libwxmsw2.6-dev - wxMSW mingw32msvc-cross
 python-wxgtk2.6 - wxWidgets Cross-platform C++ GUI toolkit (wxPython binding)
 python-wxgtk2.6-dbg - wxWidgets Cross-platform C++ GUI toolkit (wxPython binding)
 python-wxtools - wxWidgets Cross-platform C++ GUI toolkit (wxPython common files)
 python-wxversion - wxWidgets Cross-platform C++ GUI toolkit (wxPython version select
 wx-common - wxWidgets Cross-platform C++ GUI toolkit (common support files)
 wx2.6-doc - wxWidgets Cross-platform C++ GUI toolkit (documentation)
 wx2.6-examples - wxWidgets Cross-platform C++ GUI toolkit (examples)
 wx2.6-headers - wxWidgets Cross-platform C++ GUI toolkit (header files)
 wx2.6-headers-msw - Extra wxWidgets headers for mingw32msvc-cross
 wx2.6-i18n - wxWidgets Cross-platform C++ GUI toolkit (i18n support)
Changes:
 wxwidgets2.6 (2.6.3.2.1.5ubuntu8) gutsy; urgency=low
 .
  * Backported wxSafeConvert patch from wxwidgets2.8 (LP: 35375)
Files:
 733e96b7923f593346bb3fa3d1b2a92e 1150 libs optional wxwidgets2.6_2.6.3.2.1.5ubuntu8.dsc
 b71e3ec5c882202286da6b9cf6363ce8 15417807 libs optional wxwidgets2.6_2.6.3.2.1.5ubuntu8.tar.gz
Original-Maintainer: Ron Lee <email address hidden>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGTZmR58vd3QD9QFcRAmHGAJwO7I1QrMeXPDbfmkrmY9B5Yh5DbgCgyvFj
gT+Dxzi7k0W0AVgmBlZBsuI=
=mLbW
-----END PGP SIGNATURE-----

Revision history for this message
Emmet Hikory (persia) wrote :

Built successfully.

Changed in wxwidgets2.6:
status: Fix Committed → Fix Released
Revision history for this message
Emmet Hikory (persia) wrote :

Retested against new wxwidgets2.6, and was unable to reproduce this crash.

Changed in scorched3d:
status: In Progress → Fix Released
Revision history for this message
Johan Kiviniemi (ion) wrote :

Please consider adding the fix to feisty. A friend of mine has just been bitten by this bug, and I wouldn’t recommend him to upgrade to gutsy before it’s stable.

Changed in wxwidgets2.6:
status: New → Fix Committed
Changed in wxwidgets2.6:
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.