View Issue Details

IDProjectCategoryView StatusLast Update
0002617Dwarf FortressMiscellaneous Crashespublic2010-07-10 23:11
ReporterRusAnon Assigned ToToady One  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86OSGentoo LinuxOS Version2.6.33
Product Version0.31.09 
Fixed in Version0.31.10 
Summary0002617: Segfault on quit
DescriptionAfter I hit quit in game menu, it reports segfault in the console:

./df: line 6: 12105 Segmentation fault ./libs/Dwarf_Fortress $*

Does not happen in 31.08 or earlier versions.
TagsNo tags attached.

Relationships

related to 0003000 confirmedlethosor Mac/OS X segfault when quitting game with graphics enabled 

Activities

oliver

2010-07-10 22:36

reporter   ~0009917

Happens here too. I did some gdb work on this (the initial stacktrace isn't too useful because it crashes by trying to do an indirect call via a null pointer). Here's the culprit, the music/sound dtor:

oliver@flux:~/df_31_09/df_linux$ gdb libs/Dwarf_Fortress
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 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-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/oliver/df_31_09/df_linux/libs/Dwarf_Fortress...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/oliver/df_31_09/df_linux/libs/Dwarf_Fortress
[Thread debugging using libthread_db enabled]
[New Thread 0xf593bb70 (LWP 3967)]
[New Thread 0xf513ab70 (LWP 3968)]
Loading bindings from data/init/interface.txt
Resetting textures

# DF window appears

^C
Program received signal SIGINT, Interrupt.
0xf7fdf430 in __kernel_vsyscall ()
(gdb) break alcMakeContextCurrent
Breakpoint 1 at 0xf7b44c60
(gdb) cont
Continuing.
[Thread 0xf513ab70 (LWP 3968) exited]
[Thread 0xf593bb70 (LWP 3967) exited]

# select Quit from the main menu

Breakpoint 1, 0xf7b44c60 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
Current language: auto
The current source language is "auto; currently asm".
(gdb) bt
#0 0xf7b44c60 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
0000001 0xf7b45981 in musicsoundst::deinitsound() () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
0000002 0xf7b48636 in musicsoundst::~musicsoundst() () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
0000003 0xf78af728 in __cxa_finalize () from /lib32/libc.so.6
0000004 0xf7b1fb14 in __do_global_dtors_aux () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
0000005 0xf7c00b10 in _fini () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
0000006 0xf7fee996 in ?? () from /lib/ld-linux.so.2
0000007 0xf78af35f in ?? () from /lib32/libc.so.6
0000008 0xf78af3cf in exit () from /lib32/libc.so.6
0000009 0xf7896b5e in __libc_start_main () from /lib32/libc.so.6
0000010 0x0804cf31 in ?? ()
(gdb) stepi
0xf7b44c61 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
(gdb)
0xf7b44c64 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
(gdb)
0xf7b1fb97 in __i686.get_pc_thunk.bx () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
(gdb)
0xf7b1fb9a in __i686.get_pc_thunk.bx () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
(gdb)
0xf7b44c69 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
(gdb)
0xf7b44c6f in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
(gdb)
0xf7b44c73 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
(gdb)
0xf7b44c76 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/libgraphics.so
(gdb)
0x00000000 in ?? ()
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb)

oliver

2010-07-10 22:42

reporter   ~0009919

musicsoundst::deinitsound() needs an "if (!functional) return;" guard at the start, in case sound is disabled or failed to link/initialize.

Toady One

2010-07-10 22:51

administrator   ~0009921

Although I'm not familiar with the file, I imagine that's similar to the if(!on)return; in the fmod version, so I'll mark this off. I've put it in there and we can see where this goes for 0.31.10. I'm unsure about the larger problems with the libraries overall.

Issue History

Date Modified Username Field Change
2010-07-10 21:15 RusAnon New Issue
2010-07-10 22:36 oliver Note Added: 0009917
2010-07-10 22:42 oliver Note Added: 0009919
2010-07-10 22:51 Toady One Note Added: 0009921
2010-07-10 22:51 Toady One Status new => resolved
2010-07-10 22:51 Toady One Fixed in Version => 0.31.10
2010-07-10 22:51 Toady One Resolution open => fixed
2010-07-10 22:51 Toady One Assigned To => Toady One
2010-08-10 08:01 user6 Relationship added related to 0003000