Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009757Dwarf FortressTechnical -- Generalpublic2016-05-15 13:412018-05-08 08:32
Reporterseudopar 
Assigned Tolethosor 
PrioritylowSeveritytrivialReproducibilityalways
StatusconfirmedResolutionopen 
Platformx86_64OSLinuxOS Version4.5.4
Product Version0.43.02 
Target VersionFixed in Version 
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
Attached Files

- Relationships

-  Notes
(0035211)
lethosor (manager)
2016-05-17 17:03

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.
(0035231)
seudopar (reporter)
2016-05-18 17:44
edited on: 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.

(0038299)
lethosor (manager)
2018-05-08 08:28

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
(0038300)
lethosor (manager)
2018-05-08 08:32

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.

- 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 => needs feedback
2016-05-18 17:44 seudopar Note Added: 0035231
2016-05-18 17:44 seudopar Status needs feedback => assigned
2016-05-18 18:03 seudopar Note Edited: 0035231 View Revisions
2016-05-18 18:06 seudopar Issue Monitored: seudopar
2018-05-08 08:25 lethosor Status assigned => needs 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 needs 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


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker