Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002617Dwarf FortressMiscellaneous Crashespublic2010-07-10 21:152010-07-10 23:11
Assigned ToToady One 
Platformx86OSGentoo LinuxOS Version2.6.33
Product Version0.31.09 
Target VersionFixed 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.
Attached Files

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

-  Notes
oliver (reporter)
2010-07-10 22:36

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 <> [^]
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:
<>... [^]
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

Program received signal SIGINT, Interrupt.
0xf7fdf430 in __kernel_vsyscall ()
(gdb) break alcMakeContextCurrent
Breakpoint 1 at 0xf7b44c60
(gdb) cont
[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/
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/
0000001 0xf7b45981 in musicsoundst::deinitsound() () from /home/oliver/df_31_09/df_linux/libs/
0000002 0xf7b48636 in musicsoundst::~musicsoundst() () from /home/oliver/df_31_09/df_linux/libs/
0000003 0xf78af728 in __cxa_finalize () from /lib32/
0000004 0xf7b1fb14 in __do_global_dtors_aux () from /home/oliver/df_31_09/df_linux/libs/
0000005 0xf7c00b10 in _fini () from /home/oliver/df_31_09/df_linux/libs/
0000006 0xf7fee996 in ?? () from /lib/
0000007 0xf78af35f in ?? () from /lib32/
0000008 0xf78af3cf in exit () from /lib32/
0000009 0xf7896b5e in __libc_start_main () from /lib32/
0000010 0x0804cf31 in ?? ()
(gdb) stepi
0xf7b44c61 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/
0xf7b44c64 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/
0xf7b1fb97 in __i686.get_pc_thunk.bx () from /home/oliver/df_31_09/df_linux/libs/
0xf7b1fb9a in __i686.get_pc_thunk.bx () from /home/oliver/df_31_09/df_linux/libs/
0xf7b44c69 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/
0xf7b44c6f in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/
0xf7b44c73 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/
0xf7b44c76 in alcMakeContextCurrent () from /home/oliver/df_31_09/df_linux/libs/
0x00000000 in ?? ()
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
oliver (reporter)
2010-07-10 22:42

musicsoundst::deinitsound() needs an "if (!functional) return;" guard at the start, in case sound is disabled or failed to link/initialize.
Toady One (administrator)
2010-07-10 22:51

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:38 oliver Issue Monitored: oliver
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-07-10 23:11 oliver Issue End Monitor: oliver
2010-08-10 08:01 Footkerchief Relationship added related to 0003000

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker