Bug 677068 - openttd segfaults
Summary: openttd segfaults
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: openttd
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Felix Kaechele
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 677067 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-13 01:56 UTC by Dhaval Giani
Modified: 2011-04-24 18:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-24 18:05:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
The saved game. (2.63 MB, application/octet-stream)
2011-02-13 01:58 UTC, Dhaval Giani
no flags Details

Description Dhaval Giani 2011-02-13 01:56:23 UTC
Description of problem:
segfault

Version-Release number of selected component (if applicable):


How reproducible:
Everytime

Steps to Reproduce:
1. Load the saved game.
2. Buy out choo choo (company).
3. Wait a few seconds

Additional info:
[dhaval@gondor ~]$ gdb openttd
GNU gdb (GDB) Fedora (7.2-36.fc14)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/openttd...Reading symbols from /usr/lib/debug/usr/bin/openttd.debug...done.
done.
(gdb) r
Starting program: /usr/bin/openttd 
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff3294700 (LWP 1403)]
[Thread 0x7ffff3294700 (LWP 1403) exited]
[New Thread 0x7ffff3294700 (LWP 1405)]
[New Thread 0x7ffff1fde700 (LWP 1406)]
[Thread 0x7ffff1fde700 (LWP 1406) exited]
[New Thread 0x7ffff1fde700 (LWP 1407)]
dbg: [ai] [1] [S] Your script made an error: unknown error
dbg: [ai] [1] [S] 
dbg: [ai] [1] [S] *FUNCTION [Run()] ChooChoo-361.tar/choochoo-361/builder_network.nut line [25]
dbg: [ai] [1] [S] *FUNCTION [Start()] ChooChoo-361.tar/choochoo-361/main.nut line [70]
dbg: [ai] [1] [S] 
dbg: [ai] [1] [S] [count] 50
dbg: [ai] [1] [S] [tile] 2670038
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [1] [S] [task] INSTANCE
dbg: [ai] [1] [S] [minMoney] 0
dbg: [ai] [1] [S] [this] INSTANCE
dbg: [ai] [4] [S] Your script made an error: unknown error
dbg: [ai] [4] [S] 
dbg: [ai] [4] [S] *FUNCTION [Run()] ChooChoo-361.tar/choochoo-361/builder_network.nut line [25]
dbg: [ai] [4] [S] *FUNCTION [Start()] ChooChoo-361.tar/choochoo-361/main.nut line [70]
dbg: [ai] [4] [S] 
dbg: [ai] [4] [S] [count] 50
dbg: [ai] [4] [S] [tile] 1977184
dbg: [ai] [4] [S] [this] INSTANCE
dbg: [ai] [4] [S] [task] INSTANCE
dbg: [ai] [4] [S] [minMoney] 0
dbg: [ai] [4] [S] [this] INSTANCE

Program received signal SIGSEGV, Segmentation fault.
0x0000003d2dc6cbc5 in std::_Rb_tree_rebalance_for_erase (__z=<value optimized out>, __header=...) at ../../../../libstdc++-v3/src/tree.cc:363
363                   if ((__w->_M_left == 0 || 
Missing separate debuginfos, use: debuginfo-install dbus-libs-1.4.0-2.fc14.x86_64 expat-2.0.1-10.fc13.x86_64 flac-1.2.1-6.fc12.x86_64 libICE-1.0.6-2.fc13.x86_64 libSM-1.1.0-7.fc12.x86_64 libX11-1.3.4-3.fc14.x86_64 libXau-1.0.6-1.fc14.x86_64 libXcursor-1.1.10-5.fc14.x86_64 libXext-1.1.2-2.fc14.x86_64 libXfixes-4.0.5-1.fc14.x86_64 libXi-1.3.2-1.fc14.x86_64 libXrandr-1.3.0-5.fc13.x86_64 libXrender-0.9.6-1.fc14.x86_64 libXtst-1.0.99.2-3.fc12.x86_64 libasyncns-0.8-1.fc13.x86_64 libogg-1.2.0-1.fc14.x86_64 libsndfile-1.0.23-1.fc14.x86_64 libuuid-2.18-4.8.fc14.x86_64 libvorbis-1.3.1-2.fc14.x86_64 libxcb-1.7-1.fc14.x86_64 pulseaudio-libs-0.9.21-7.fc14.x86_64 tcp_wrappers-libs-7.6-59.fc14.x86_64
(gdb) bt
#0  0x0000003d2dc6cbc5 in std::_Rb_tree_rebalance_for_erase (__z=<value optimized out>, __header=...) at ../../../../libstdc++-v3/src/tree.cc:363
#1  0x0000000000512a71 in erase (this=0x3b24c48, __first=..., __last=...) at /usr/include/c++/4.5.1/bits/stl_tree.h:1366
#2  std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::erase (this=0x3b24c48, __first=..., __last=...) at /usr/include/c++/4.5.1/bits/stl_tree.h:1449
#3  0x0000000000512afa in std::_Rb_tree<int, std::pair<int const, int>, std::_Select1st<std::pair<int const, int> >, std::less<int>, std::allocator<std::pair<int const, int> > >::erase (this=0x3b24c48, __x=<value optimized out>) at /usr/include/c++/4.5.1/bits/stl_tree.h:1428
#4  0x0000000000510854 in erase (this=0x3b24c20, item=1714579) at /usr/include/c++/4.5.1/bits/stl_map.h:604
#5  AIAbstractList::RemoveItem (this=0x3b24c20, item=1714579) at /usr/src/debug/openttd-1.0.5/src/ai/api/ai_abstractlist.cpp:428
#6  0x000000000051099d in AIAbstractList::KeepValue (this=0x3b24c20, value=1) at /usr/src/debug/openttd-1.0.5/src/ai/api/ai_abstractlist.cpp:691
#7  0x00000000005081ba in SQCall (vm=0x370f350) at /usr/src/debug/openttd-1.0.5/src/script/squirrel_helper.hpp:263
#8  SQConvert::DefSQNonStaticCallback<AIAbstractList, void (AIAbstractList::*)(int)> (vm=0x370f350) at /usr/src/debug/openttd-1.0.5/src/script/squirrel_helper.hpp:782
#9  0x00000000004d401a in SQVM::CallNative (this=0x370f350, nclosure=0x3719cd0, nargs=<value optimized out>, stackbase=41, retval=..., suspend=@0x7fffffffc90c) at /usr/src/debug/openttd-1.0.5/src/3rdparty/squirrel/squirrel/sqvm.cpp:1171
#10 0x00000000004d5155 in SQVM::Execute (this=0x370f350, closure=<value optimized out>, target=<value optimized out>, nargs=<value optimized out>, stackbase=<value optimized out>, outres=..., raiseerror=1, et=SQVM::ET_RESUME_OPENTTD)
    at /usr/src/debug/openttd-1.0.5/src/3rdparty/squirrel/squirrel/sqvm.cpp:782
#11 0x00000000004a6d96 in sq_resumecatch (v=<value optimized out>, suspend=<value optimized out>) at /usr/src/debug/openttd-1.0.5/src/3rdparty/squirrel/squirrel/sqapi.cpp:1017
#12 0x000000000065975c in Squirrel::Resume (this=0x36c63c0, suspend=<value optimized out>) at /usr/src/debug/openttd-1.0.5/src/script/squirrel.cpp:193
#13 0x00000000004f111f in AIInstance::GameLoop (this=0x36a42f0) at /usr/src/debug/openttd-1.0.5/src/ai/ai_instance.cpp:381
#14 0x00000000004df173 in AI::GameLoop () at /usr/src/debug/openttd-1.0.5/src/ai/ai_core.cpp:75
#15 0x00000000005f1cab in StateGameLoop () at /usr/src/debug/openttd-1.0.5/src/openttd.cpp:1267
#16 0x00000000005f2230 in GameLoop () at /usr/src/debug/openttd-1.0.5/src/openttd.cpp:1343
#17 0x00000000006c7931 in VideoDriver_SDL::MainLoop (this=<value optimized out>) at /usr/src/debug/openttd-1.0.5/src/video/sdl_v.cpp:578
#18 0x00000000005f107e in ttd_main (argc=<value optimized out>, argv=0x7fffffffdf98) at /usr/src/debug/openttd-1.0.5/src/openttd.cpp:760
#19 0x0000003d29c1ee5d in __libc_start_main (main=0x5fc690 <main(int, char**)>, argc=1, ubp_av=0x7fffffffdf98, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fffffffdf88) at libc-start.c:226
#20 0x00000000004a1599 in _start ()
(gdb)

Comment 1 Dhaval Giani 2011-02-13 01:58:17 UTC
Created attachment 478421 [details]
The saved game.

Comment 2 Felix Kaechele 2011-02-13 10:14:50 UTC
Thanks for your bug report.
I have reproduced it and forwarded it to the OpenTTD devs.
To me it looks like an issue with the ChooChoo AI, as it does not appear when using the AdmiralAI.

Could you also provide the crash.log, crash.png and crash.sav that OpenTTD generates in ~/.openttd/ when crashing?

Comment 3 Felix Kaechele 2011-02-13 11:21:08 UTC
Could you please also try one of these nightly builds to see if it fixes it for you?

http://heffer.fedorapeople.org/openttd/

Comment 4 Dhaval Giani 2011-02-13 16:05:15 UTC
http://bugs.openttd.org/task/4506

OK they seem to have it fixed, wonder if this is going to be backported to v1.0.5 or not?

Do you want to close this?

Comment 5 Felix Kaechele 2011-02-16 09:43:40 UTC
*** Bug 677067 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.