View Issue Details

IDProjectCategoryView StatusLast Update
0009757Dwarf FortressTechnical -- Generalpublic2018-05-08 08:32
Reporterseudopar Assigned Tolethosor  
PrioritylowSeveritytrivialReproducibilityalways
Status confirmedResolutionopen 
Platformx86_64OSLinuxOS Version4.5.4
Product Version0.43.02 
Summary0009757: dwarffortress binary seems to always exit with a non-zero exit code
DescriptionWhen ever I run the dwarffortress binary, I have noticed that it always seems to exit with what is conventionally considered an error status code of 1, although no error appears to be occurring.
Steps To Reproduce> dwarffortress
<exit the game>
> echo $?
Tags0.44.10, binary patch

Activities

lethosor

2016-05-17 17:03

manager   ~0035211

What is the "dwarffortress" script? If it's not "df" or a renamed copy of the "df" script (or a link to the libs/Dwarf_Fortress executable), it's not something Toady works with.

seudopar

2016-05-18 17:44

reporter   ~0035231

Last edited: 2016-05-18 18:03

Oh sorry. That appears to be a bash script that the maintainer of the package in Arch Linux wrapped it in.

The same behavior occurs when the actual binary (libs/Dwarf_Fortress) is called.

lethosor

2018-05-08 08:28

manager   ~0038299

Interestingly enough, running DF 0.44.10 on OS X with
DYLD_LIBRARY_PATH=./libs DYLD_FRAMEWORK_PATH=./libs ./dwarfort.exe ; echo $?

gives an exit code of 32

lethosor

2018-05-08 08:32

manager   ~0038300

I think I found the issue, too:
https://github.com/svenstaro/dwarf_fortress_unfuck/blob/d6a4ee67e7b41bec1caa87548640643db35a6080/g_src/enabler.cpp#L543-L593
https://github.com/svenstaro/dwarf_fortress_unfuck/blob/d6a4ee67e7b41bec1caa87548640643db35a6080/g_src/enabler.cpp#L796-L804

main() returns the result of enabler.loop(), which is supposed to return an int but never actually does. There are a couple easy ways to fix this.

Add Note

Note

Issue History

Date Modified Username Field Change
2016-05-15 13:41 seudopar New Issue
2016-05-17 17:03 lethosor Note Added: 0035211
2016-05-17 17:03 lethosor Assigned To => lethosor
2016-05-17 17:03 lethosor Status new => feedback
2016-05-18 17:44 seudopar Note Added: 0035231
2016-05-18 17:44 seudopar Status feedback => assigned
2016-05-18 18:03 seudopar Note Edited: 0035231
2018-05-08 08:25 lethosor Status assigned => feedback
2018-05-08 08:28 lethosor Note Added: 0038299
2018-05-08 08:28 lethosor Summary dwarffortress binary seems to always exit with an error status code of 1. => dwarffortress binary seems to always exit with a non-zero exit code
2018-05-08 08:28 lethosor Status feedback => confirmed
2018-05-08 08:29 lethosor Tag Attached: 0.44.10
2018-05-08 08:32 lethosor Note Added: 0038300
2018-05-08 08:32 lethosor Tag Attached: binary patch