Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0010799Dwarf FortressMiscellaneous Crashespublic2018-06-25 00:582018-06-25 19:47
israveri 
lethosor 
normalblockalways
resolvedno change required 
Arch Linux x86_64Linux4.17.2-1-ARCH
0.44.11 
 
0010799: Game seg faults and crash to desktop without opening
Game stopped working after updating the kernel to 4.17.2-1 and the game to 44.11. Worked fine with previous kernel version and 44.10.

Nothing happens when you try to run the game. Running it in the console shows it crashing and dumping it's core.

$ dwarffortress
Sound devices available:
OpenAL Soft
Picking OpenAL Soft. If your desired device was missing, make sure you have the appropriate 32-bit libraries installed. If you wanted a different device, configure ~/.openalrc appropriately.
Perfect OpenAL context attributes GET
Loading bindings from data/init/interface.txt
[1] 1326 segmentation fault (core dumped) dwarffortress
Analyzing the dumped core, it's clear the game is seg faulting:

coredumpctl info PID
           PID: 1326 (Dwarf_Fortress)
           UID: 1000 (israel)
           GID: 1001 (israel)
        Signal: 11 (SEGV)
     Timestamp: Mon 2018-06-25 03:31:41 -03 (3min 1s ago)
  Command Line: ./libs/Dwarf_Fortress
    Executable: /opt/dwarffortress/libs/Dwarf_Fortress
 Control Group: /user.slice/user-1000.slice/user@1000.service/gnome-terminal-server.service
          Unit: user@1000.service
     User Unit: gnome-terminal-server.service
         Slice: user-1000.slice
     Owner UID: 1000 (israel)
       Boot ID: 82a213c3c48341eb8cf868cd52c914db
    Machine ID: 8f36958e467a4831a3a5bad687073748
      Hostname: X50
       Storage: /var/lib/systemd/coredump/core.Dwarf_Fortress.1000.82a213c3c48341eb8cf868cd52c914db.1326.1529908301000000.lz4
       Message: Process 1326 (Dwarf_Fortress) of user 1000 dumped core.
                
                Stack trace of thread 1326:
                #0 0x000000000000001c n/a (n/a)


Running it through gdb, you can retrieve the crash backtrace:

$ coredumpctl gdb PID
#0 0x000000000000001c in ()
0000001 0x00007fa759579c3d in musicsoundst::set_song(std::string&, std::pair<bool, int>) () at /opt/dwarffortress/libs/libgraphics.so
0000002 0x0000000000ac24a2 in beginroutine() ()
0000003 0x00007fa7594d92b2 in enablerst::loop(std::string) () at /opt/dwarffortress/libs/libgraphics.so
0000004 0x00007fa7594cde51 in main () at /opt/dwarffortress/libs/libgraphics.so
0000005 0x00007fa7587bd06b in __libc_start_main () at /usr/lib/libc.so.6
0000006 0x00000000004092ef in ()
No tags attached.
Issue History
2018-06-25 00:58israveriNew Issue
2018-06-25 01:00israveriIssue Monitored: israveri
2018-06-25 04:31PatrikLundellNote Added: 0038477
2018-06-25 05:06toasttownNote Added: 0038478
2018-06-25 09:59israveriNote Added: 0038479
2018-06-25 10:00israveriNote Edited: 0038479bug_revision_view_page.php?bugnote_id=0038479#r15667
2018-06-25 13:44lethosorNote Added: 0038482
2018-06-25 13:44lethosorAssigned To => lethosor
2018-06-25 13:44lethosorStatusnew => needs feedback
2018-06-25 15:56lethosorNote Added: 0038484
2018-06-25 19:24israveriNote Added: 0038485
2018-06-25 19:24israveriStatusneeds feedback => assigned
2018-06-25 19:45lethosorNote Added: 0038486
2018-06-25 19:46lethosorNote Edited: 0038486bug_revision_view_page.php?bugnote_id=0038486#r15673
2018-06-25 19:46lethosorStatusassigned => resolved
2018-06-25 19:46lethosorResolutionopen => no change required
2018-06-25 19:47lethosorNote Added: 0038487
2018-06-25 20:15lethosorNote Edited: 0038486bug_revision_view_page.php?bugnote_id=0038486#r15674

Notes
(0038477)
PatrikLundell   
2018-06-25 04:31   
Have you tried installing 0.40.10 again (in a different location) to see if that still works? If that version also crashes it's likely your core upgrade that's causing the trouble, otherwise it ought to be DF changing.

You may also try to disable music, as it seems that's where it crashes, to see what happens with 0.44.11.
(0038478)
toasttown   
2018-06-25 05:06   
Disabling sound didn't change anything for me, although a manually installed 44.10 failed to launch with a pair of missing library errors:

./libs/Dwarf_Fortress: /home/zach/odf/df_linux/libs/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/libGLU.so.1)
./libs/Dwarf_Fortress: /home/zach/odf/df_linux/libs/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/libGLU.so.1)

I'm ashamed to say I don't know enough about the C++ linker and how it interplays with DF and Arch to determine if this is congruent with PatrikLundell's theory- or just a sign that my Arch environment is irretrievably horrible.
(0038479)
israveri   
2018-06-25 09:59   
(edited on: 2018-06-25 10:00)
Turning music off did nothing.
Messed around with the config files, no changes fixed the problem.

DF 44.10 worked fine with the new kernel, though.

(0038482)
lethosor   
2018-06-25 13:44   
You set SOUND to NO in data/init/init.txt, right?
What happens if you remove libs/libstdc++.so.6? What if you remove the audio files in data/sound?
(0038484)
lethosor   
2018-06-25 15:56   
Are you using DF from pacman? According to Einveru on Freenode, copying libs/libgraphics.so from the version on http://www.bay12games.com/dwarves/ [^] into the libs folder in pacman's copy fixes this.
(0038485)
israveri   
2018-06-25 19:24   
Yes, it's the Pacman version, and copying the libgraphics.so file from the website download over the pacman one solved the problem.

Removing either the libstdc++.so.6 and data/sound files didn't solve the problem, the game complained about the missing files instead.

The issue seems to be specific with the pacman package and not with the game itself.

Thank you for your time and support.
(0038486)
lethosor   
2018-06-25 19:45   
(edited on: 2018-06-25 20:15)
Weird, removing libstdc++ should cause DF to use your system one instead, which usually works (if it's from GCC 4.8 or later, anyway). Sometimes that's necessary to avoid CXXABI errors, but I've never seen it segfault due to a libstdc++ mismatch (on Linux). Removing sound files was a far-fetched suggestion on my part, though.

In general, it's a good idea to specify when you're using a package that isn't directly from Bay12. I suspect your package maintainer didn't update libgraphics.so properly. However, the only changes (edit: to libgraphics) in 0.44.11 were additional keybindings, and usually a keybinding mismatch doesn't cause DF to crash, so I'm not sure if that's the issue or if something else is wrong with the package. Either way, this is definitely something the package maintainer should know about.

Thanks for reporting back!

(0038487)
lethosor   
2018-06-25 19:47   
toasttown: I'm unsure if you're using the pacman one or not. If not, feel free to open a new issue.