Blank Screen Startup Mac OS X 10.9.4 and 10.9.5

Started by jotapeh, October 01, 2014, 11:56:25 AM

Previous topic - Next topic

Tynan

Updated.

Anyway, it's not looking good, I tried a version with some extra logging to investigate but I'm seeing absolutely nothing out of the ordinary.

I submitted a bug to Unity.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Mystic

Quote from: Tynan on October 02, 2014, 09:17:53 PM
Anyway, it's not looking good, I tried a version with some extra logging to investigate but I'm seeing absolutely nothing out of the ordinary.

I submitted a bug to Unity.

Sometimes that's all you can do. I wonder if any other games have run into the same issue with the latest Unity build? I kind of hope so, actually, 'cause that might help escalate the issue and get them working on it posthaste.

asciiface

Quote from: Tynan on October 02, 2014, 09:17:53 PM
Updated.

Anyway, it's not looking good, I tried a version with some extra logging to investigate but I'm seeing absolutely nothing out of the ordinary.

I submitted a bug to Unity.

Hey I am just impressed you did this much in one work day, that is light years ahead of other early access devs going "well it IS mac, so, deal with it"

Mystic

Quote from: asciiface on October 02, 2014, 10:04:20 PM
Hey I am just impressed you did this much in one work day, that is light years ahead of other early access devs going "well it IS mac, so, deal with it"

I wholeheartedly agree with this.

joshcarter

Jumping into the fray here. I am running A7 on my Mac okay when it's attached to the same display that I was running with earlier alphas. However, I observe this problem when I switch to a different display which doesn't run at the same resolution as my first display.

Here's the rub: I manually edited Preferences/unity.Ludeon Studios.RimWorld.plist (using Xcode) and saved it, then started RimWorld, and the prefs file reset itself to the prior resolution! I've dug into every RimWorld file I can find under ~/Library, to no avail--somehow Unity really, passionately believes that my fullscreen resolution is 1920x1200 no matter what reality might say. I can't discover where it's getting that from.

Another observation: if I hit Command-Escape to force RimWorld into windowed mode, which works, then click fullscreen in the options window, I go back to black screen. There's just no way to convince it that my fullscreen resolution is something different.

Tynan: while googling, I noticed that Unity's scripting API has a way to get the list of the screen's resolutions (Screen.resolutions) and the current resolution (Screen.Resolution). Could you perhaps ensure that the current resolution is a member of the list of possible resolutions, and change it if not?

Thanks to everyone working on this problem. A7 is a wonder to behold when I play on that one monitor.

Best regards,
Josh

Mystic

#50
Quote from: joshcarter on October 03, 2014, 08:29:04 PM
Here's the rub: I manually edited Preferences/unity.Ludeon Studios.RimWorld.plist (using Xcode) and saved it, then started RimWorld, and the prefs file reset itself to the prior resolution! I've dug into every RimWorld file I can find under ~/Library, to no avail--somehow Unity really, passionately believes that my fullscreen resolution is 1920x1200 no matter what reality might say. I can't discover where it's getting that from.

Good information, so I went to look at that same user preferences file.  My laptop's native resolution is 1680x1050.  Here's what I found when I went into full screen mode in A7, got the black screen, then pressed Cmd-Q to exit the application:


<key>Screenmanager Is Fullscreen mode</key>
<integer>1</integer>
<key>Screenmanager Resolution Height</key>
<integer>915</integer>
<key>Screenmanager Resolution Width</key>
<integer>1533</integer>


1533x915 happens to be what my most recent windowed size was.

Then I ran A6 to remind myself of how it used to behave.  When I switch A6 to fullscreen in the options, it initially comes up in fullscreen, but still at the previous 1533x915 resolution, resulting in a severely aliased but still usable screen.  I then can change the screen resolution to my native desktop resolution and the screen sharpens up, with the plist file containing the following afterwards:


<key>Screenmanager Is Fullscreen mode</key>
<integer>1</integer>
<key>Screenmanager Resolution Height</key>
<integer>1050</integer>
<key>Screenmanager Resolution Width</key>
<integer>1680</integer>


What I next tried was to run A7 in windowed mode, then I exited and manually updated this plist file with the correct fullscreen resolution settings.  However, after doing this A7 still came up initially in the windowed mode at the previous resolution.

So I am taking two things away from this round of tests:

1) it seems like either the game or Unity must be storing and getting the resolution from somewhere else and just updating this plist file after the fact.  (I looked to see if there was a system-wide version of this preferences file in /Library/Preferences, but did not find one.)

2) The distinction between the version of Unity in A6 and the one in A7 seems to be that the A6 version will display fullscreen in a non-native resolution, allowing the screen to become aliased, while A7 will not attempt to display the screen at all in that situation.  This has me wondering if, when A7 switches to fullscreen in Windows, it now also automatically changes to the screen's native resolution rather than making the user change that additional setting after the fact?  (Someone other than I would need to check on that.)  If it does this, and if A6 didn't, perhaps some new Unity code that is doing a native resolution lookup during a switch to fullscreen is failing to get the proper resolution on the Mac version?

Dieform

Were both A6 and A7 built off the exact same Unity versions?

asciiface

Quote from: Dieform on October 05, 2014, 02:51:52 PM
Were both A6 and A7 built off the exact same Unity versions?

I believe not. From my research thus far there was a Unity update in between. The previous version of Unity would accept resolutions your screen couldn't handle and "just do it". The version of unity a7 is on just black screens if it is an unsupported resolution. We could work around this except Unity's accessing of its plist files seems flakey at best (it tends to write TO the file before it reads from it)

Mystic

Quote from: asciiface on October 05, 2014, 05:17:49 PM
Quote from: Dieform on October 05, 2014, 02:51:52 PM
Were both A6 and A7 built off the exact same Unity versions?

I believe not. From my research thus far there was a Unity update in between. The previous version of Unity would accept resolutions your screen couldn't handle and "just do it". The version of unity a7 is on just black screens if it is an unsupported resolution. We could work around this except Unity's accessing of its plist files seems flakey at best (it tends to write TO the file before it reads from it)

Tynan did mention earlier in this thread that he'd used a newer Unity version on A7, and that he gets exactly the same black screen if he rebuilds A6 using that newer version.  So I believe your research to be spot on.  Did you find additional developers reporting the same "black screen on unsupported resolutions" behavior with the latest versioon of Unity, then?

asciiface

I didn't get any specific Unity versions out of it, but I did find exactly identical issues involving Unity updates and resolution handling. The one that stuck out was that a previous version of Unity just dealt with different resolutions and rendered it anyway while a newer one just doesn't render.

Quote from: Mystic on October 06, 2014, 09:34:21 AM
Quote from: asciiface on October 05, 2014, 05:17:49 PM
Quote from: Dieform on October 05, 2014, 02:51:52 PM
Were both A6 and A7 built off the exact same Unity versions?

I believe not. From my research thus far there was a Unity update in between. The previous version of Unity would accept resolutions your screen couldn't handle and "just do it". The version of unity a7 is on just black screens if it is an unsupported resolution. We could work around this except Unity's accessing of its plist files seems flakey at best (it tends to write TO the file before it reads from it)

Tynan did mention earlier in this thread that he'd used a newer Unity version on A7, and that he gets exactly the same black screen if he rebuilds A6 using that newer version.  So I believe your research to be spot on.  Did you find additional developers reporting the same "black screen on unsupported resolutions" behavior with the latest versioon of Unity, then?


stefanstr

According to the Info.plist, Alpha 6 was using version 4.5.0f6 of Unity. Alpha 7 is using version 4.5.3f3.

Mystic

I may be talking through my hat here, but I thought I'd read something that indicated Unity had an API method for returning the native resolutions supported by a display.  I don't know if that API exists, or if it works correctly on Macs or not, but if it does, I wonder if it might be possible for RimWorld itself to query that information and then change to a/the natively supported resolution immediately before attempting the switch to fullscreen?  Could that possibly address this issue without a Unity patch?

asciiface

that is one solution I had seen on other bug report forums, automagically correcting the resolution.

If I know anything about development and systems tho, (and I know quite a lot, not to toot my own horn more than it is worth), unless implemented with some thought and care could cause more harm than good.

Quote from: Mystic on October 07, 2014, 10:41:28 AM
I may be talking through my hat here, but I thought I'd read something that indicated Unity had an API method for returning the native resolutions supported by a display.  I don't know if that API exists, or if it works correctly on Macs or not, but if it does, I wonder if it might be possible for RimWorld itself to query that information and then change to a/the natively supported resolution immediately before attempting the switch to fullscreen?  Could that possibly address this issue without a Unity patch?

Mystic

Quote from: asciiface on October 07, 2014, 01:44:22 PM
that is one solution I had seen on other bug report forums, automagically correcting the resolution.

If I know anything about development and systems tho, (and I know quite a lot, not to toot my own horn more than it is worth), unless implemented with some thought and care could cause more harm than good.

Quote from: Mystic on October 07, 2014, 10:41:28 AM
I may be talking through my hat here, but I thought I'd read something that indicated Unity had an API method for returning the native resolutions supported by a display.  I don't know if that API exists, or if it works correctly on Macs or not, but if it does, I wonder if it might be possible for RimWorld itself to query that information and then change to a/the natively supported resolution immediately before attempting the switch to fullscreen?  Could that possibly address this issue without a Unity patch?

I suppose the same could be said for most software development, of course ... anything implemented without thought and care is asking for trouble.  :)  I'm sure Tynan would give it the thought required beforehand.  At least it would be worth trying, because I suspect that waiting for a fix from the Unity developers might be a long, long wait (based upon things I've read elsewhere).

You're in the software development business too, then?  As am I (for over three decades now).  From what I am seeing, there's no shortage of technical know-how in the RimWorld user community ... it must be the type of game that appeals to other developers.