View Issue Details

IDProjectCategoryView StatusLast Update
0009762Dwarf FortressMiscellaneous Crashespublic2021-03-16 19:11
Reporteralexchandel Assigned Tolethosor  
PrioritynormalSeveritycrashReproducibilityalways
Status confirmedResolutionopen 
OSOS XOS Version10.11.4 
Product Version0.43.02 
Summary0009762: Dwarf Fortress immediately crashes when using system full screen toggle (green button) on OS X 10.10+
DescriptionDwarf Fortress immediately crashes whenever the window is maximized by clicking the standard green button in the corner of the window. Normally, the window would simply be resized to fullscreen. cropping or blacking what it needed to. But dwarf fortress immediately crashes. There is no opportunity to save the game state. No other OS X application does this. This crash is replicable and occurs 100% of the time.
Steps To Reproduce1. Run dwarf fortress on OS X.
2. Click the green "Full Screen" icon in the corner of the window.
3. Dwarf fortress crashes immediately.
Additional InformationThis happened to me the very first time I played DF, after spending hours in the game. All progress was lost. I've never seen a game with such a blatant, user-accessible crash.
TagsProbable Quick Fix, SDL

Relationships

has duplicate 0009912 resolvedlethosor game crash going full screen 
has duplicate 0011152 resolvedlethosor Input lags on fullscreen 
related to 0009962 confirmedlethosor Window disappears when clicking on upper edge of title bar (32-bit DF only) 

Activities

lethosor

2016-05-17 16:51

manager   ~0035208

Does the fix in 0005260 work?
Sorry about this :/. Toady uses an older version of OS X than what you're using, so if that is the issue, he wouldn't be experiencing this.

alexchandel

2016-05-18 05:28

reporter   ~0035225

... Sort of. It still crashes sometimes, for example 100% of the time during the opening movie, but not 100% of the time for the game.

However, it's not ideal. It produces a buggy fullscreen, with the window chrome still drawn around the window. It appears that dwarffortress realizes that it's in fullscreen, and redraws itself in a new window inside the fullscreen space. This means that repeatedly clicking the green button in the window chrome will repeatedly produce other (non-functional, blank, completely white) fullscreen window that can never be removed. Moreover, because dwarffortress is still drawing itself in this small subwindow, it can now never be taken out of fullscreen mode.

All of this might be fixed by building against the correct version of SDL. Could this happen sooner? I install via Homebrew, the OS X package manager, and unless a maintainer here submits a PR updating the package formula, it'll probably take an additional few weeks for even that to get updated :\

alexchandel

2016-05-18 05:33

reporter   ~0035226

Actually, it turns out that even trying to bring it back to normal, after having maximized it, by clicking the green button sometimes crashes it during normal gameplay. Man, I feel like I'm walking on broken glass with this window chrome.

Dame de la Licorne

2016-05-18 06:39

reporter   ~0035227

Last edited: 2016-05-18 06:40

I just tested this (simply to confirm that it does the same thing on my OSX machine). I don't normally use the green button to full-screen my game, but if you start with the window at a small size, then double-click on the DF title bar (the one that contains the three buttons), it will become "full-screen" (it's not really, but it adjusts to the computer screen size) without crashing.

Note: I have my init file set to allow in-game window resizing.

Does that work for you?

alexchandel

2016-05-24 14:33

reporter   ~0035287

It does, but that's the same as just resizing the window as large as possible. The window chrome is still visible however, as is the menu bar. And other programs below it are free to open popups/panels, which are displayed on top of dwarf fortress.

OSX's fullscreen mode is special, and should be supported. It essentially gives a separate desktop to the program, with no window chrome, menu bar, or other programs' windows. Distraction-free dwarf fortress is the goal, anyways.

Dame, were you able to confirm the fullscreen crash, and the crash & glitches with the swapped-in-place SDL framework?

Dame de la Licorne

2016-05-24 15:52

reporter   ~0035288

I did confirm the fullscreen crash, but haven't attempted to reproduce the SDL-related stuff.

lethosor

2016-05-30 17:14

manager   ~0035338

Last edited: 2016-05-30 17:16

It sounds like this is an SDL issue, and we really can't fix SDL. I'm surprised that SDL 1.2.15 is still crashing, as most people have reported that it works just fine. If it really is, there's not much we can do here, unless Toady decides to update to SDL 2, which would be a lot of work.

lethosor

2016-07-23 19:26

manager   ~0035698

Has this changed in 0.43.05?

lethosor

2016-09-09 10:57

manager   ~0035862

Confirmed in 0.43.05 with PRINT_MODE:STANDARD.

alexchandel

2016-10-26 12:52

reporter   ~0036000

Confirmed in 0.43.05 with PRINT_MODE:STANDARD on macOS 10.12.0.

Note that PRINT_MODE:STANDARD is still necessary on macOS 10.12 because PRINT_MODE:2D uses 57% CPU, which is unacceptable.

You should really consider updating to SDL 2, it has perfect support for OSX's fullscreen. Is there are crash log somewhere I can upload for you to fix this?

alexchandel

2016-10-26 13:40

reporter   ~0036004

Crash confirmed as well with PRINT_MODE:VBO, PRINT_MODE:SHADER, PRINT_MODE:PARTIAL:0, PRINT_MODE:PARTIAL:1, PRINT_MODE:PARTIAL:2, and PRINT_MODE:FRAME_BUFFER.

In short, every mode but 2D. And PRINT_MODE:2D is basically unusable due to its massive CPU usage WHEN PAUSED.

lethosor

2017-04-29 11:56

manager   ~0036478

Just a note: holding down "alt" when pressing the green button makes the window as large as possible without entering full-screen mode (similar to double-clicking the title bar).

lethosor

2017-05-01 18:20

manager   ~0036488

Mifki has put together an SDL build that seems to fix this, at least for him and me: https://www.dropbox.com/s/vobjcytkiguxky9/SDL.framework.zip?dl=0

(Replace libs/SDL.framework with this one)

alexchandel

2017-05-12 09:55

reporter   ~0036525

Mifki's SDL build fixes this issue. I notice it opts out of the "resize to fullscreen" animation, so I wonder if that animation influenced the crash.

lethosor

2017-05-17 14:05

manager   ~0036534

It doesn't have anything to do with the animation - on my end, the window animates (somewhat) but the contents don't until it reaches its final size, which is also the case when maximizing the window with "alt" (with and without mifki's SDL build).

alexchandel

2017-11-11 16:54

reporter   ~0036862

Any chance of Mifki's SDL build making it into the upcoming version of DF?

alexchandel

2017-12-16 20:51

reporter   ~0037337

This is broken in 44.02 in a different way. Now, clicking the fullscreen button in anything other than PRINT_MODE:2D (which is unusable, as it requires 50%-100% CPU to update the screen vs <10% CPU for other modes) causes DF to resize (as though the alt key were held), not enter fullscreen. Hitting it a second time usually moves it to a fullscreen space, but I can't return my window to its original size, which is moderately annoying.

With some PRINT_MODE values, like STANDARD, hitting the green button spawns an additional blank fullscreen window that can't be closed.

Can't Toady just bundle Mifki's SDL build?

lethosor

2017-12-16 21:41

manager   ~0037339

The SDL libraries included in 0.43.05 and 0.44.02 are identical. Maybe the behavior changes depending on your OS version or just randomly.

I'll tag this issue to make it more obvious that it's a simple enough change. There are obviously security concerns with including random files from Dropbox (there's no indication that the one I linked to is from Mifki), so Toady might want to verify where it came from first.

alexchandel

2018-01-06 21:28

reporter   ~0037538

That's very perplexing then. I'll have to check again when I can redownload it, but IIRC, diff claimed the 0.43.05 and 0.44.02 SDL binaries differed, and only 0.44.02 had the bizarre behavior.

Is https://github.com/rofl0r/df-libgraphics/tree/0_43_05_official still the latest graphics code? I almost want to update it to SDL2 myself...

lethosor

2018-01-06 22:29

manager   ~0037539

Last edited: 2018-01-06 22:29

I've found that https://github.com/svenstaro/dwarf_fortress_unfuck is usually kept more up-to-date, but neither is official. Note that you cannot use 0.43.05 libgraphics with 0.44 because of new keybindings.

alexchandel

2018-01-07 13:01

reporter   ~0037543

Nice, dwarf_fortress_unfuck has a 0.44.03 commit. The CMakeLists mentions Linux, but is the g_src the same for Windows and macOS? The macOS downloads don't include any source.

lethosor

2018-01-07 14:42

manager   ~0037547

The same g_src is used on all platforms, but it's only distributed in the Linux packages because that's the only platform where you could compile your own libgraphics and have DF use it.

jecowa

2018-02-19 23:49

reporter   ~0037811

Last edited: 2018-02-23 01:10

Just a note that Mifki's universal SDL library causes a crash when exiting full-screen mode. Tested in OSX 10.6, 10.7, and 10.8 using both 32-bit and 64-bit Dwarf Fortress, and it crashed every time when trying to exit full-screen mode.

Edit: Also in 10.12 Sierra, It still causes crashes when exiting from full screen mode, but it also causes full screen to look odd – the window border is still visible but it's the only window visible. It does fix the green-button crash that occurs while in Standard print mode, though.

Edit 2: Just tested in 10.10 Yosemite. It was the same as in Sierra, but there was not an issue with the green button in Standard print mode. It maximized the Dwarf Fortress Window. I exited Dwarf Fortress and relaunched a couple more times to try to get the green button to make it crash, but it just reliably maximized the window like it does in 10.6 Snow Leopard, 10.7 Lion, and 10.8 Mountain Lion.

alexchandel

2019-01-06 03:18

reporter   ~0039089

Last edited: 2019-01-06 03:20

Just tested on 10.14.2 Mojave on a vanilla OS reinstallation, in STANDARD and TWBT modes.

The default SDL bundle still has erratic maximizing and restoring. The green button stretches the window to fill the desktop, rather expanding it to its own desktop. Clicking it again expands it to a new desktop in an extremely glitchy fashion, where the original desktop is completely occluded by a blank window. There is no way to remove this.

Mifki's SDL bundle works perfectly, both entering and exiting fullscreen. No window border is visible in fullscreen. Is it possible the crashes you saw with it were caused by something else?

jecowa

2021-03-09 20:30

reporter   ~0040967

I'm not having this issue. Tested with 0.43.02, 0.43.05, and 0.47.05 in Mac OS X 10.13 High Sierra. The green button makes it enter and exit full screen in both 2D and STANDARD print modes. Tested from the main menu and from the Object Testing Arena.

They worked for me in 10.14 Mojave too, except DF 0.43.02 doesn't launch at all for me on 10.14 Mojave.

[code]
...copying shared history...dyld: Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
  Referenced from: /Applications/DF v0.43.02/libs/SDL_ttf.framework/Versions/A/SDL_ttf
  Reason: image not found
[/code]

Is the full screen crash from STANDARD Print_Mode still an issue?

lethosor

2021-03-16 19:11

manager   ~0040979

The SDL version that DF uses hasn't changed, to my knowledge. Are you using unmodified vanilla downloads?

Add Note

Note

Issue History

Date Modified Username Field Change
2016-05-17 02:46 alexchandel New Issue
2016-05-17 16:51 lethosor Note Added: 0035208
2016-05-17 16:51 lethosor Assigned To => lethosor
2016-05-17 16:51 lethosor Status new => feedback
2016-05-18 05:28 alexchandel Note Added: 0035225
2016-05-18 05:28 alexchandel Status feedback => assigned
2016-05-18 05:33 alexchandel Note Added: 0035226
2016-05-18 06:39 Dame de la Licorne Note Added: 0035227
2016-05-18 06:40 Dame de la Licorne Note Edited: 0035227
2016-05-24 14:33 alexchandel Note Added: 0035287
2016-05-24 15:52 Dame de la Licorne Note Added: 0035288
2016-05-30 17:14 lethosor Note Added: 0035338
2016-05-30 17:16 lethosor Note Edited: 0035338
2016-07-23 19:26 lethosor Note Added: 0035698
2016-07-23 19:26 lethosor Status assigned => feedback
2016-08-09 11:45 lethosor Relationship added related to 0009962
2016-09-09 10:57 lethosor Note Added: 0035862
2016-09-09 10:57 lethosor Status feedback => confirmed
2016-09-09 10:58 lethosor Relationship added has duplicate 0009912
2016-09-11 11:58 lethosor Summary Dwarf Fortress immediately crashes when maximizing window on OS X => Dwarf Fortress immediately crashes when using system full screen toggle (green button) on OS X 10.10+
2016-10-26 12:52 alexchandel Note Added: 0036000
2016-10-26 13:40 alexchandel Note Added: 0036004
2017-04-29 11:56 lethosor Note Added: 0036478
2017-05-01 18:20 lethosor Note Added: 0036488
2017-05-12 09:55 alexchandel Note Added: 0036525
2017-05-12 09:55 alexchandel Tag Attached: SDL
2017-05-17 14:05 lethosor Note Added: 0036534
2017-11-11 16:54 alexchandel Note Added: 0036862
2017-12-16 20:51 alexchandel Note Added: 0037337
2017-12-16 21:41 lethosor Note Added: 0037339
2017-12-16 21:41 lethosor Tag Attached: Probable Quick Fix
2018-01-06 21:28 alexchandel Note Added: 0037538
2018-01-06 22:29 lethosor Note Added: 0037539
2018-01-06 22:29 lethosor Note Edited: 0037539
2018-01-07 13:01 alexchandel Note Added: 0037543
2018-01-07 14:42 lethosor Note Added: 0037547
2018-02-19 23:49 jecowa Note Added: 0037811
2018-02-23 00:47 jecowa Note Edited: 0037811
2018-02-23 00:50 jecowa Note Edited: 0037811
2018-02-23 01:10 jecowa Note Edited: 0037811
2019-01-06 03:18 alexchandel Note Added: 0039089
2019-01-06 03:19 alexchandel Note Edited: 0039089
2019-01-06 03:20 alexchandel Note Edited: 0039089
2019-10-05 13:55 lethosor Relationship added has duplicate 0011152
2021-03-09 20:30 jecowa Note Added: 0040967
2021-03-16 19:11 lethosor Note Added: 0040979