OpenTTD

Tasklist

FS#20 - Saving files when run from gdb

Attached to Project: OpenTTD
Opened by Matthijs Kooijman (matthijs) - Tuesday, 06 December 2005, 02:40 GMT
Last edited by Matthijs Kooijman (matthijs) - Tuesday, 20 December 2005, 01:02 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System Linux
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

I've been experiencing crashes when saving with latest SVN (r3260). When run normally, everything is fine, but when run inside gdb, it crashes when saving:

Steps to reproduce: Clean compilation (though DEBUG or configuration doesn't seem to affect it). Start OpenTTD, new random game, save game. Bang.

===
matthijs@katherina:~/public_html/openttd/openttd-clean2$ gdb ./openttd
GNU gdb 6.3.90_20051119-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) r
Starting program: /home/matthijs/public_html/openttd/openttd-clean2/openttd
[Thread debugging using libthread_db enabled]
[New Thread -1212086592 (LWP 4147)]
[New Thread -1219277904 (LWP 4241)]
[Thread -1219277904 (LWP 4241) exited]
thread_db_get_info: cannot get thread info: generic error
(gdb)
===

Can somebody confirm this?
This task depends upon

Closed by  Darkvater (Darkvater)
Thursday, 02 November 2006, 16:26 GMT
Reason for closing:  Not a bug
Additional comments about closing:  I'll close this one as the bug is in GDB not OpenTTD.
Comment by Darkvater (Darkvater) - Sunday, 18 December 2005, 21:04 GMT
Unconfirmed, works just fine here (r3317). Needed a clean config file, otherwise I get spammed by newgrf messages :P

tfarago@Arrakis:~/openttd> gdb ./openttd
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...Using host libthread_db library " /lib/tls/libthread_db.so.1".

(gdb) r -c blaat
Starting program: /home/tfarago/openttd/openttd -c blaat
[Thread debugging using libthread_db enabled]
[New Thread 1079004320 (LWP 26719)]
MD5 of TRG1R.GRF is ****INCORRECT**** - File Corrupt.
[New Thread 1082190768 (LWP 26723)]
[New Thread 1086938032 (LWP 26749)]
[Thread 1086938032 (LWP 26749) exited]
[Thread 1082190768 (zombie) exited]

Program exited normally.
(gdb)
Comment by Matthijs Kooijman (matthijs) - Monday, 19 December 2005, 11:32 GMT
Weird... I've tried with different settings for DEBUG and PROFILE, all giving the same error. All tries with a default config file (both openttd.cfg and Makefile.config). Seems to be something in my environment then... GDB version is the same, what gcc are you using?
gcc (GCC) 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)

Comment by Darkvater (Darkvater) - Monday, 19 December 2005, 12:04 GMT
Using DEBUG:=3, nothing set for PROFILE. GCC is 4.0.0 release.
Comment by Patric Stout (TrueBrain) - Friday, 06 January 2006, 22:31 GMT
Here it crashes too, GCC 3.4.3. It cannot get the thread info ;) Smart huh? :)

It is claimed that this bug is fixed in GDB 6.2, but I use GDB 6.4, so I guess that didn't work quiet as they wanted ;)

Funny thing to notice: it crashes _after_ the save... when the thread is closed, which he nicely informs us of... weird....

Loading...