Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0005260Dwarf FortressTechnical -- Generalpublic2012-02-18 07:142016-07-05 17:49
peterb 
Toady One 
normalmajoralways
resolvedfixed 
MacMac OS X10.7.3
0.34.02 
0.43.05 
0005260: Can't play fullscreen on Mac OS X Lion (bug in outdated SDL)
When you try to take DF fullscreen from the prompt, the following error appears:

Feb 18 10:12:05 smaug.local dwarfort.exe[2246] <Warning>: CGDisplayBaseAddress is obsolete and returning NULL for display 0x42801c0
(1) Set init.txt to PROMPT mode for windows/fullscreen
(2) Start df
(3) Answer "YES" to the fullscreen prompt.
Manager's note: Suggested fix: update SDL to SDL 1.2.15
1. Download SDL-1.2.15.dmg from https://www.libsdl.org/download-1.2.php [^] (under Mac OS X). Direct link as of May 2016: https://www.libsdl.org/release/SDL-1.2.15.dmg [^]
2. Open the downloaded .dmg file
3. Replace SDL.framework (possibly displayed as "SDL") in the libs folder in your DF folder with the downloaded version of SDL.framework
Fixed in 0.43.05?, SDL
related to 0002624confirmed lethosor Bundled SDL version uses NSQuickDrawView on OS X; deprecated/unavailable in newer versions of OS X 
has duplicate 0006177resolved Knight Otu Fullscreen mode unsupported 
has duplicate 0007822resolved Footkerchief Fullscreen is inoperable on Mac 
related to 0007778acknowledged lethosor Keyboard input stops working after fullscreen/window toggle (F11) 
related to 0009680resolved lethosor Cannot open the df executable. 
Issue History
2012-02-18 07:14peterbNew Issue
2012-02-18 10:10FootkerchiefNote Added: 0020053
2012-03-06 14:22NecromungerNote Added: 0021187
2012-03-06 14:38NecromungerIssue Monitored: Necromunger
2012-04-25 19:49ardekanturIssue Monitored: ardekantur
2012-05-27 23:12philomoryNote Added: 0022753
2012-05-27 23:12philomoryIssue Monitored: philomory
2012-06-08 17:24peterbNote Added: 0022926
2013-01-03 02:44Knight OtuRelationship addedhas duplicate 0006177
2013-10-22 17:19lethosorIssue Monitored: lethosor
2014-07-10 19:02darchitectNote Added: 0025643
2014-07-28 17:44lethosorTag Attached: SDL
2014-07-28 17:44lethosorAssigned To => lethosor
2014-07-28 17:44lethosorStatusnew => acknowledged
2014-07-28 17:44lethosorStatusacknowledged => confirmed
2014-07-30 19:29lethosorSummaryCan't play fullscreen on Mac OS X Lion => Can't play fullscreen on Mac OS X Lion (bug in outdated SDL)
2014-08-01 05:22DwarfuRelationship addedrelated to 0007778
2014-08-04 14:55FootkerchiefRelationship addedhas duplicate 0007822
2014-08-15 13:03ToadChildIssue Monitored: ToadChild
2014-11-07 14:25ToadChildNote Added: 0030906
2015-03-09 16:10matthew49Note Added: 0032358
2015-03-09 16:30lethosorNote Added: 0032361
2015-08-15 14:45lethosorNote Edited: 0032361bug_revision_view_page.php?bugnote_id=0032361#r13263
2015-08-15 14:45lethosorNote Edited: 0022753bug_revision_view_page.php?bugnote_id=0022753#r13265
2015-10-18 10:54lethosorRelationship addedrelated to 0002624
2015-12-22 14:13lethosorIssue End Monitor: lethosor
2015-12-22 14:13lethosorIssue Monitored: lethosor
2016-03-26 12:32ToadChildNote Added: 0034924
2016-04-05 10:06lethosorRelationship addedrelated to 0009680
2016-05-17 16:49lethosorAdditional Information Updatedbug_revision_view_page.php?rev_id=14194#r14194
2016-06-29 18:23lethosorTag Attached: Fixed in 0.43.05?
2016-06-29 18:24lethosorNote Added: 0035524
2016-07-05 17:49lethosorNote Added: 0035566
2016-07-05 17:49lethosorStatusconfirmed => resolved
2016-07-05 17:49lethosorFixed in Version => 0.43.05
2016-07-05 17:49lethosorResolutionopen => fixed
2016-07-05 17:49lethosorAssigned Tolethosor => Toady One

Notes
(0020053)
Footkerchief   
2012-02-18 10:10   
Try changing the PRINT_MODE in init.txt (to STANDARD or whatever).
(0021187)
Necromunger   
2012-03-06 14:22   
Does not help at all to change the PRINT_MODE to standard.

The only way i can play is windowed with massive resolution to come close to my screen size.

But making windowed mode exactly my screen sizes crashes the game.

I get an error every time about SDL using the QuickDraw library which is completely depreciated in Mac OS X Lion, it should be using QuartzCore.

This would explain earlier Macs being about to run the game properly, because QuickDraw has not been fully Depreciated on those machines.
(0022753)
philomory   
2012-05-27 23:12   
(edited on: 2015-08-15 14:45)
I can verify that this can be fixed by using SDL 1.2.15. I was able to substitute the 1.2.15 SDL.framework by placing it into the <DF_ROOT>/libs/ directory in place of the old one, opening terminal to <DF_ROOT>/libs/SDL.framework/Versions/A/, and running `install_name_tool -id @executable_path/../Frameworks/SDL.framework/Versions/A/SDL SDL` After that, Dwarf Fortress could be run in fullscreen without crashing, or indeed without any issues at all.

If toady can compile the next DF release against SDL 1.2.15, that should fix the problem. In the mean time, enterprising users can apply the same fix I did (note that install_name_tool comes with the XCode command line tools package).

(Manager's note: The install_name_tool step may not be necessary.)

(0022926)
peterb   
2012-06-08 17:24   
I can confirm that philomory's hack works. It would be great if SDL 1.2.15 was included in the next official MacOS build.
(0025643)
darchitect   
2014-07-10 19:02   
This bug still exists in v0.40.02 for OS 10.7.5.
(0030906)
ToadChild   
2014-11-07 14:25   
Issue still exists with DF 0.40.15 and OS X 10.10 (Yosemite). The fix from philomory still works.
(0032358)
matthew49   
2015-03-09 16:10   
Could someone help me with philomory's trick?

I successfully switched the SDL.framework, put in the terminal line (which I assume had an extra "SDL" at the end), got this:

Usage: /Library/Developer/CommandLineTools/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input


but the problem is still happening. Mar 9 19:08:30 Matthews-MacBook-Pro.local dwarfort.exe[23390] <Warning>: CGDisplayBaseAddress is obsolete and returning NULL for display 0x4280800

I am most likely making a stupid mistake right now as I am new to all of this stuff.
(0032361)
lethosor   
2015-03-09 16:30   
(edited on: 2015-08-15 14:45)
I think it should work without the install_name_tool step (i.e. just replacing SDL.framework should work). Can you provide the command you used?

Edit: There was not an extra "SDL" at the end of the command; it was intentional (but you don't need to run it, as far as I can tell).

(0034924)
ToadChild   
2016-03-26 12:32   
I downloaded Dwarf Fortress 0.42.06 (most recent at time of writing) and the game would not even start unless I applied philomory's fix.

Mac OS X 10.11.3 "El Capitan".

Please update to the latest version of SDL (1.2.15, released in 2012!) when building the Mac version in the future.
(0035524)
lethosor   
2016-06-29 18:24   
May be fixed in 0.43.05, since Toady reports that he is using SDL 1.2.15 now.
(0035566)
lethosor   
2016-07-05 17:49   
This looks like it's working in 0.43.05 for me. Please PM me on the forums to reopen this report if not.