View Issue Details

IDProjectCategoryView StatusLast Update
0003000Dwarf FortressGeneralpublic2020-10-05 15:36
Reporterdirkthedorf Assigned Tolethosor  
PrioritylowSeveritycrashReproducibilityalways
Status confirmedResolutionopen 
PlatformMac (MacBook4.1)OSMac OS XOS Version10.5.8
Product Version0.31.12 
Summary0003000: Mac/OS X segfault when quitting game with graphics enabled
DescriptionAfter having played in fortress mode, the Mac port of Dwarf Fortress will crash with the following error when attemped to quit using the title menu:
"~/Desktop/Dwarf Fortress/df: line 5: 16493 Segmentation fault ./dwarfort.exe logout"
Steps To ReproduceRun Dwarf Fortress.
Play in fortress mode.
(Save world.)
Quit.
Additional Informationhttp://pastebin.com/FBVZJkiw
TagsNo tags attached.

Relationships

related to 0002617 resolvedToady One Segfault on quit 
has duplicate 0005737 resolveduser6 Error report when I try to quit from the main menu. 
has duplicate 0003697 resolveduser6 Game Unexpectedly Quits on exit. 

Activities

user6

2010-08-10 08:01

  ~0011691

Congratulations on getting report # 3000.

The NSQuickDrawView thing is unrelated -- it was previously reported as 0002624.

Cespinarve

2012-02-16 08:30

reporter   ~0019794

I have the same segmentation fault every time I quit - it doesn't cause any problems or anything, but it is a thing that happens.

dglidden

2012-03-02 13:10

reporter   ~0020998

Same thing here - 10.7.3, DF 0.34.04

jrtomsic

2012-03-31 10:34

reporter   ~0021951

I'm getting a very similar issue. I've found that it's only happening when I'm using a tileset that has [GRAPHICS:YES] in the init.txt file. If I turn that off, the game quits without error.

Are you guys (cespinarve, dglidden, and dirkthedwarf) playing with a graphical tileset (eg phoebus, ironhand, lazy newb pack, masterwork, etc)?

user6

2012-03-31 12:21

  ~0021953

Reminder sent to: Cespinarve, dglidden, dirkthedorf

Does this still occur with GRAPHICS:NO?

dirkthedorf

2012-03-31 13:57

reporter   ~0021955

While I cannot recall whether GRAPHICS were set to NO, I believe that they were since I rarely play with tilesets. I am unable to verify as I have since upgraded, but I can, however, say that the current version of Dwarf Fortress (0.34.07) quits without any error. Running Lion (10.7.3) on the same old MacBook4,1.

Cespinarve

2012-03-31 20:42

reporter   ~0021968

I have yet to have it recur, but I'm not using a tileset right now, and I'm not running the game for a long period of time before quitting (too busy at present).

dglidden

2012-04-01 07:11

reporter   ~0021982

I can't reproduce this with GRAPHICS:NO whereas with GRAPHICS:YES it happens every single time.

lethosor

2014-11-25 16:29

manager   ~0031187

Last edited: 2015-08-01 06:59

I can't reproduce this with GRAPHICS:YES in 0.40.16 or 0.40.18. Has anyone seen this occur in 0.40.xx?
Edit: Confirmed by someone else (I assume)

danaris

2015-08-01 07:01

reporter   ~0032945

Last edited: 2015-08-01 07:08

I've also been experiencing this, and saved this crash log: http://topazgryphon.org/~tcollett/df/dfhack-crash.2015-08-01.txt

Hopefully this can be of some help.

[Edit] The above is with PRINT_MODE:2D. I have reproduced it with PRINT_MODE:STANDARD, with DFHack disabled, and it produced a slightly different crash log: http://topazgryphon.org/~tcollett/df/df-crash.2015-08-01.txt

lethosor

2015-08-01 07:24

manager   ~0032946

Last edited: 2015-08-01 08:53

For reference, just starting and quitting the game isn't enough to produce this crash (at least for me) - you have to do something that involves loading graphics first, e.g. starting a new arena.

Edit: It looks like the crash occurs when SDL_FreeSurface() is called on a surface that has already been freed. If I interpose SDL_FreeSurface and prevent the actual function from being called in this sort of situation, there are two more calls (not necessarily successive) with already-freed surfaces, and the crash does not occur.

seanwessmith

2015-08-03 19:41

reporter   ~0032950

Last edited: 2015-08-03 19:42

Running Mac OS X 10.11 El Capitan, I have the NSQuickDrawView error when trying to start from the terminal.

lethosor

2015-08-25 19:41

manager   ~0032999

Last edited: 2015-08-25 19:42

As Footkerchief pointed out, that is 0002624, which is not related to this issue and can be fixed by upgrading to SDL 1.2.15.

pol

2018-03-10 23:04

reporter   ~0037873

Last edited: 2018-03-10 23:05

Just to add another stone to the pile, this is still happening for me on MacOS 10.12.6. Graphics is enabled (though I am using the built-in graphics).

On quitting I get something like:

dwarfort.exe(61442,0x7fff9879b3c0) malloc: *** error for object 0x11e580ee0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

I suppose it isn't precisely a segfault, so maybe it's not the same thing, but it seems enough like it that this seemed like the right place.

kiniry

2020-10-05 15:36

reporter   ~0040748

This seems to still exist. I see it on 10.15.7 every time I quit 47.04. Here is a prefix of a crash report. Thread 0 is the culprit on cleanup.

Process: dwarfort.exe [46895]
Path: /Users/USER/*/dwarfort.exe
Identifier: dwarfort.exe
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Terminal [8962]
User ID: 502

Date/Time: 2020-10-05 15:30:53.726 -0700
OS Version: Mac OS X 10.15.7 (19H2)
Report Version: 12
Bridge OS Version: 4.6 (17P6610)
Anonymous UUID: 32F665C7-8A5B-4378-A833-2CE8089907AD

Sleep/Wake UUID: AB548F7B-AB87-40A0-82AF-4DFC1A8729B1

Time Awake Since Boot: 260000 seconds
Time Since Wake: 120000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called
dwarfort.exe(46895,0x10de80dc0) malloc: *** error for object 0x18aaf6e00: pointer being freed was not allocated
 

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff6bb0133a __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff6bbbde60 pthread_kill + 430
2 libsystem_c.dylib 0x00007fff6ba88808 abort + 120
3 libsystem_malloc.dylib 0x00007fff6bb7e50b malloc_vreport + 548
4 libsystem_malloc.dylib 0x00007fff6bb8140f malloc_report + 151
5 SDL 0x00000001026b45fe SDL_FreeSurface + 189
6 dwarfort.exe 0x0000000101373255 0x100000000 + 20394581
7 dwarfort.exe 0x000000010042c3ef 0x100000000 + 4375535
8 dwarfort.exe 0x0000000100955c9d 0x100000000 + 9788573
9 libsystem_c.dylib 0x00007fff6ba6313c __cxa_finalize_ranges + 319
10 libsystem_c.dylib 0x00007fff6ba63412 exit + 55
11 dwarfort.exe 0x00000001013ac3f8 0x100000000 + 20628472
12 com.apple.CoreFoundation 0x00007fff3193f7a3 ___CFXRegistrationPost1_block_invoke + 63
13 com.apple.CoreFoundation 0x00007fff3193f718 _CFXRegistrationPost1 + 372
14 com.apple.CoreFoundation 0x00007fff3193f384 ___CFXNotificationPost_block_invoke + 80
15 com.apple.CoreFoundation 0x00007fff3190f4fd -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1554
16 com.apple.CoreFoundation 0x00007fff3190e9a9 _CFXNotificationPost + 1351
17 com.apple.Foundation 0x00007fff33f8c786 -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
18 com.apple.AppKit 0x00007fff2ebc34f3 -[NSApplication _postDidFinishNotification] + 312
19 com.apple.AppKit 0x00007fff2ebc3232 -[NSApplication _sendFinishLaunchingNotification] + 208
20 com.apple.AppKit 0x00007fff2ebc02f3 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 549
21 com.apple.AppKit 0x00007fff2ebbff38 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 688
22 com.apple.Foundation 0x00007fff33fb7a26 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 308
23 com.apple.Foundation 0x00007fff33fb7890 _NSAppleEventManagerGenericHandler + 98
24 com.apple.AE 0x00007fff32cbc203 0x7fff32caf000 + 53763
25 com.apple.AE 0x00007fff32cbb929 0x7fff32caf000 + 51497
26 com.apple.AE 0x00007fff32cb3bd7 aeProcessAppleEvent + 449
27 com.apple.HIToolbox 0x00007fff305867fa AEProcessAppleEvent + 54
28 com.apple.AppKit 0x00007fff2ebba2d1 _DPSNextEvent + 1547
29 com.apple.AppKit 0x00007fff2ebb8880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
30 com.apple.AppKit 0x00007fff2ebaa58e -[NSApplication run] + 658
31 dwarfort.exe 0x00000001013aca56 0x100000000 + 20630102

Add Note

Note

Issue History

Date Modified Username Field Change
2010-08-10 07:17 dirkthedorf New Issue
2010-08-10 08:01 user6 Note Added: 0011691
2010-08-10 08:01 user6 Relationship added related to 0002617
2012-02-16 08:30 Cespinarve Note Added: 0019794
2012-03-02 13:10 dglidden Note Added: 0020998
2012-03-31 10:34 jrtomsic Note Added: 0021951
2012-03-31 12:21 user6 Note Added: 0021953
2012-03-31 12:21 user6 Relationship added related to 0005737
2012-03-31 13:57 dirkthedorf Note Added: 0021955
2012-03-31 20:42 Cespinarve Note Added: 0021968
2012-04-01 07:11 dglidden Note Added: 0021982
2012-04-01 09:05 user6 Additional Information Updated
2012-04-01 09:06 user6 Relationship replaced has duplicate 0005737
2012-04-01 09:07 user6 Summary Segmentation fault when quitting (Mac) => Mac/OS X segfault when quitting game with graphics enabled
2014-11-25 16:28 lethosor Relationship added has duplicate 0003697
2014-11-25 16:29 lethosor Note Added: 0031187
2014-11-25 16:29 lethosor Assigned To => lethosor
2014-11-25 16:29 lethosor Status new => feedback
2014-11-30 13:10 lethosor Status feedback => confirmed
2015-08-01 06:59 lethosor Note Edited: 0031187
2015-08-01 07:01 danaris Note Added: 0032945
2015-08-01 07:08 danaris Note Edited: 0032945
2015-08-01 07:24 lethosor Note Added: 0032946
2015-08-01 08:53 lethosor Note Edited: 0032946
2015-08-03 19:41 seanwessmith Note Added: 0032950
2015-08-03 19:42 seanwessmith Note Edited: 0032950
2015-08-25 19:41 lethosor Note Added: 0032999
2015-08-25 19:41 lethosor Description Updated
2015-08-25 19:42 lethosor Note Edited: 0032999
2018-03-10 23:04 pol Note Added: 0037873
2018-03-10 23:05 pol Note Edited: 0037873
2020-10-05 15:36 kiniry Note Added: 0040748