Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed May 22, 2019 1:55 am

All times are UTC




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Crash on game startup
PostPosted: Sun Aug 19, 2012 9:11 pm 
Offline
President
President
User avatar

Joined: Sun Jun 03, 2007 10:22 pm
Posts: 950
Hi, can someone a hint what is causing this:
Code:
./openttd 
Crash encountered, generating crash log...
*** OpenTTD Crash Report ***

Crash at: Sun Aug 19 21:04:42 2012
In game date: 0-01-01 (0)

Crash reason:
 Signal:  Segmentation fault (11)
 Message: <none>

OpenTTD version:
 Version:    r24484 (0)
 NewGRF ver: 13005fa4
 Bits:       32
 Endian:     little
 Dedicated:  no
 Build date: Aug 19 2012 23:01:55

Stacktrace:
 [00] ./openttd(_ZNK12CrashLogUnix13LogStacktraceEPcPKc+0x43) [0x8313633]
 [01] ./openttd(_ZNK8CrashLog12FillCrashLogEPcPKc+0x102) [0x81d3332]
 [02] ./openttd(_ZNK8CrashLog12MakeCrashLogEv+0xa0) [0x81d3600]
 [03] ./openttd() [0x831356c]
 [04] linux-gate.so.1(__kernel_sigreturn+0) [0xffffe400]
 [05] ./openttd(_Z21GetCustomSignalSpritePK12RailtypeInfoj10SignalType13SignalVariant11SignalStateb+0xc8) [0x82e88e8]
 [06] ./openttd(_Z25ResolveRailTypeGUISpritesP12RailtypeInfo+0x134) [0x834b214]
 [07] ./openttd(_Z13InitRailTypesv+0x1e) [0x834b29e]
 [08] ./openttd(_Z10LoadNewGRFjj+0x1226) [0x82cc146]
 [09] ./openttd(_Z14GfxLoadSpritesv+0x274) [0x822e174]
 [10] ./openttd(_Z13GenerateWorld12GenWorldModejjb+0xab) [0x82200ab]
 [11] ./openttd(_Z8ttd_mainiPPc+0x149c) [0x82ff09c]
 [12] ./openttd(main+0x48) [0x8313a68]
 [13] /lib/libc.so.6(__libc_start_main+0xe6) [0xb5f905e6]
 [14] ./openttd() [0x81193d1]

Operating system:
 Name:     Linux
 Release:  2.6.38-gentoo-r6
 Version:  #3 Sun Oct 30 13:19:24 CET 2011
 Machine:  i686
 Compiler: GCC 4.5.3 "4.5.3"

Configuration:
 Blitter:      8bpp-optimized



I svn upped, and rebuild and got this. On every blitter. Rebuild the extra grf. Updated grfcodec and nfo renum. Svnned down like 80 revisions. Removed openttd.cfg completely. Renamed ~/.openttd

Nothing seemed to help. I see the game starting up, the window is shown, and then it crashes immediately.


Top
   
PostPosted: Mon Aug 20, 2012 6:09 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9265
Location: Sol d
Somewhat random guess into the dark: Do you have any fancy NewGRF configuration? If so, try without.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Mon Aug 20, 2012 3:35 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Wed Dec 20, 2006 1:31 pm
Posts: 979
Location: Aschaffenburg
This is an optimiser bug in gcc version 4.5 ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680 ), which I boldly assume you use. (edit: well, the crashlog even says so :) )

To fix it, either disable optmisations, or extent the SignalVariant enum in signal_type.h with a dummy value at the end.

Edit: Though I can actually not recommend you to work around that GCC bug. Esp. don't run a server with it. It might cause all kinds of critical problems, like arbitrary code injection.

_________________
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁


Last edited by frosch on Mon Aug 20, 2012 4:10 pm, edited 1 time in total.

Top
   
PostPosted: Mon Aug 20, 2012 3:56 pm 
Offline
President
President
User avatar

Joined: Sun Jun 03, 2007 10:22 pm
Posts: 950
Frosch, you're the best:
Code:
enum SignalVariant {
   SIG_ELECTRIC  = 0, ///< Light signal
   SIG_SEMAPHORE = 1, ///< Old-fashioned semaphore signal
   SIG_DUM       = 2, ///< workaround gcc 4.5.3 bug 
};


works like a charm! Back in business again, never would have guessed this one.

---
Edit: I saw your edit later.

I don't use this install as server. I also don't like switching off the optimize flags. And Gentoo does not consider newer versions of gcc stable: http://packages.gentoo.org/package/sys-devel/gcc
And since on Gentoo *everything* on the system is compiled by gcc, as you may know, I like to stick to a stable version of at least gcc.
So I leave it this way for now, thanks again.


Top
   
PostPosted: Thu Mar 14, 2019 8:26 pm 
Offline
Engineer
Engineer

Joined: Thu Mar 14, 2019 8:21 pm
Posts: 1
GeekToo wrote:
Frosch, you're the best:
Code:
enum SignalVariant {
   SIG_ELECTRIC  = 0, ///< Light signal
   SIG_SEMAPHORE = 1, ///< Old-fashioned semaphore signal
   SIG_DUM       = 2, ///< workaround gcc 4.5.3 bug 
};


works like a charm! Back in business again, never would have guessed this one.

---
Edit: I saw your edit later.

I don't use this install as server. I also don't like switching off the optimize flags. And Gentoo does not consider newer versions of gcc stable: http://packages.gentoo.org/package/sys-devel/gcc
And since on Gentoo *everything* on the system is compiled by gcc, as you may know, I like to stick to a stable version of at least gcc.
So I leave it this way for now, thanks again.

where do you put this code i think i have the same problem


Top
   
PostPosted: Thu Mar 14, 2019 10:25 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7349
unless you're using 7 year outdated compilers, i doubt this.

what problem do you have and what makes you think you have "the same problem"?

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.