Black screen and freezing in macOS

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Black screen and freezing in macOS

Postby almeath » 2019-10-10 @ 03:01

I am not sure if this is a potential bug or just a problem that Apple introduced in the latest version of Mojave, so I would like to seek opinions.

When I purchased a game from GOG using their DOSBox wrapper (Warcraft), I noticed that when exiting the application in full screen mode, a black screen and freeze up (i.e spinning pinwheel) would occur. It affected my older iMac (2013 Core i7 Haswell with Nvidia graphics). It happens in Mojave 10.14.6 but not in 10.13 or earlier. It does not occur when the application is run in windowed mode.

To see if this was a DOSBox issue, I extracted the game from the GOG application wrapper, and tried running it directly from DOSBox 0.74-3. The same problem occurred when exiting from full screen. In fact, just opening DOSBOx and then using “exit” command caused the same freeze up.

I then repeated the test with an SVN build of 0.75 and got the same results. Works in High Sierra and earlier, but freezes in Mojave.

To further complicate the situation, I found that this issue does not occur at all on my 2019 5k iMac that has a Core i9 with AMD graphics, also on Mojave 10.14.6.

As I have narrowed down the issue to (apparently) particular hardware, I was hoping someone might have some suggestions as to what could potentially be causing this issue.

I did check that SDL 1.25 and the latest build of version 2 were on both of my iMacs, and I tested in fresh installs of macOS too.
almeath
Newbie
 
Posts: 38
Joined: 2008-2-25 @ 04:41

Re: Black screen and freezing in macOS

Postby Qbix » 2019-10-10 @ 06:03

Does switching back to windowed mode work ? (so does going to fullscreen trigger it, or does shutting down from fullscreen trigger it)
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10918
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Black screen and freezing in macOS

Postby almeath » 2019-10-10 @ 08:33

Qbix wrote:Does switching back to windowed mode work ? (so does going to fullscreen trigger it, or does shutting down from fullscreen trigger it)


The freeze up will occur when:

1. Starting in full screen mode and then exiting DOSBox.
2. Starting in windowed mode, switching to full screen mode, and then exiting DOSBox.
3. Starting in windowed mode, switching to full screen mode, and then switching back to windowed mode. When pressing option-return the screen goes black and presents the spinning pinwheel.

The only method that avoids the freezing is starting up in windowed mode and remaining in it until exiting DOSBox.
almeath
Newbie
 
Posts: 38
Joined: 2008-2-25 @ 04:41

Re: Black screen and freezing in macOS

Postby Qbix » 2019-10-10 @ 08:36

ah, so it is the switching back from fullscreen to windowed.

Does the selected output have an influence ?

Does 0.74-2 work ? (as that one is 64 bit compatible as well)
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10918
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Black screen and freezing in macOS

Postby almeath » 2019-10-10 @ 11:08

Qbix wrote:ah, so it is the switching back from fullscreen to windowed.

Does the selected output have an influence ?

Does 0.74-2 work ? (as that one is 64 bit compatible as well)


I performed further testing in several versions of DOSBox, consisting of starting in windowed mode, switching to full screen with option-return, and then switching back to windowed mode (all while at the main DOS prompt).

I tested 0.75b1, 0.74-3, 0.74-2 and 0.74-1.

The same freeze up happened in all of them, when going back to windowed mode from full screen mode.

Interestingly, the problem did not occur if I used “surface” or “overlay” settings. It only occurs when using “opengl” or “openglnb”.

Since I never had any issues with any version of DOSBox until Mojave 10.14.6, it is looking like a bug introduced by Apple, which seemingly only affects certain hardware.
almeath
Newbie
 
Posts: 38
Joined: 2008-2-25 @ 04:41

Re: Black screen and freezing in macOS

Postby ShovelKnight » 2019-10-10 @ 11:23

Apple really hates Nvidia and they have progressively broken compatibility with Nvidia graphics in later versions of macOS.

I can’t play anything on my MacBook Pro 2012 with GT650M anymore, even the games that were working splendidly previously (such as Tropico 4 and Civilization V) are now crashing constantly.
ShovelKnight
Member
 
Posts: 137
Joined: 2019-4-04 @ 19:00

Re: Black screen and freezing in macOS

Postby Qbix » 2019-10-10 @ 11:58

almeath wrote:
Interestingly, the problem did not occur if I used “surface” or “overlay” settings. It only occurs when using “opengl” or “openglnb”.

Since I never had any issues with any version of DOSBox until Mojave 10.14.6, it is looking like a bug introduced by Apple, which seemingly only affects certain hardware.


Thanks for trying. Could you see if setting fullresolution=0x0 changes things ? (or fullresolution=your desktop resolution)
It's somewhat unfortunate, as in 0.74-3 opengl is the default on Mac.
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10918
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Black screen and freezing in macOS

Postby Dominus » 2019-10-10 @ 12:09

are you compiling yourself? I have to test with my builds bit there was a problem when you compiled SDL on Mojave. My builds are done on OS X 10.11 which should work.
Also latest svn in my sig
User avatar
Dominus
DOSBox Moderator
 
Posts: 7969
Joined: 2002-10-03 @ 09:54
Location: Ludwigsburg

Re: Black screen and freezing in macOS

Postby almeath » 2019-10-10 @ 12:11

Qbix wrote: Thanks for trying. Could you see if setting fullresolution=0x0 changes things ? (or fullresolution=your desktop resolution)
It's somewhat unfortunate, as in 0.74-3 opengl is the default on Mac.


I tried all of the same tests with the native screen resolution of 2560x1440 and also “desktop”. I then tried the 0x0 you suggested. Unfortunately those had no impact on the results.

I suppose Apple could have broken something in their Nvidia drivers in Mojave in the update from 10.14.5 to 10.14.6. There is no way to know for sure because they have not allowed Nvidia to release web drivers for any version of Mojave.
almeath
Newbie
 
Posts: 38
Joined: 2008-2-25 @ 04:41

Re: Black screen and freezing in macOS

Postby almeath » 2019-10-10 @ 12:15

Dominus wrote:are you compiling yourself? I have to test with my builds bit there was a problem when you compiled SDL on Mojave. My builds are done on OS X 10.11 which should work.
Also latest svn in my sig


No, I tested with the precompiled downloads on sourceforge. I will do some more tests with your SVN and also have a go at compiling in Mojave.
almeath
Newbie
 
Posts: 38
Joined: 2008-2-25 @ 04:41

Re: Black screen and freezing in macOS

Postby almeath » 2019-10-10 @ 12:23

Actually, I must have already been using your SVN as I had not tried compiling 0.75 myself.
almeath
Newbie
 
Posts: 38
Joined: 2008-2-25 @ 04:41

Re: Black screen and freezing in macOS

Postby Dominus » 2019-10-10 @ 12:26

If you self compile, make sure you grab the latest mercurial of SDL 1.2x
User avatar
Dominus
DOSBox Moderator
 
Posts: 7969
Joined: 2002-10-03 @ 09:54
Location: Ludwigsburg

Re: Black screen and freezing in macOS

Postby DosFreak » 2019-10-10 @ 13:54

Are you sure the fullscreen changes are taking effect when using opengl? If 0x0 or resolution specified then it shouldn't switch to real fullscreen so that should be noticeable.

It is pretty ridiculous with the Nividia and Apple situation. At least with a desktop you can swap out the card.
User avatar
DosFreak
l33t++
 
Posts: 10438
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: Black screen and freezing in macOS

Postby almeath » 2019-10-11 @ 01:14

I don’t know if this is normal behavior, but whether or not I use 2560x1440, or 0x0, or desktop, I am finding that option-return takes me into what appears to be normal full screen mode, with proper scaling to the native desktop resolution. It appears to be the same whether I use opengl or surface/overlay settings. This is occurring with 0.74-2 through to 0.75b1.
almeath
Newbie
 
Posts: 38
Joined: 2008-2-25 @ 04:41

Re: Black screen and freezing in macOS

Postby Qbix » 2019-10-11 @ 06:22

except it hangs when you return back if you use opengl right.

I think the only thing we can do is try to debug it, to see where it hangs. Either with adding log messages or running an actual debugger.
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10918
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Black screen and freezing in macOS

Postby almeath » 2019-10-11 @ 06:56

Qbix wrote:except it hangs when you return back if you use opengl right.

I think the only thing we can do is try to debug it, to see where it hangs. Either with adding log messages or running an actual debugger.


Yes, that’s right. The core issue is the freeze when switching back, but only with opengl.

I will gather what logs I can and report back.
almeath
Newbie
 
Posts: 38
Joined: 2008-2-25 @ 04:41

Re: Black screen and freezing in macOS

Postby almeath » 2019-10-19 @ 07:25

I have not yet had time to debug, but interestingly, the problem does not occur in the latest DOSBox-X. I might go with that as a work-around for the time being and wait to see if DOSBox 0.75 fixes this when released.
almeath
Newbie
 
Posts: 38
Joined: 2008-2-25 @ 04:41

Re: Black screen and freezing in macOS

Postby Dominus » 2019-10-19 @ 08:48

AFAIK, -X switched to SDL2. This makes it more likely to be a SDL issue
User avatar
Dominus
DOSBox Moderator
 
Posts: 7969
Joined: 2002-10-03 @ 09:54
Location: Ludwigsburg


Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 2 guests