Screensaver on OSX just black screen

I just downloaded Cinder and made a screensaver app with TinderBox. It compiles just fine but I only end up with a black screen. I tried clearing the screen with random colours, but it didn’t work.
The cinder samples work fine, so I know the libraries are working. Is there something specific I have to do to get screensavers working on Mac?
I can’t try it on another operating system for the time being.
I am using Cinder 0.9.2 on OSX Catalina 10.15.2 if that helps

I just compiled a default project, installed the resultant .saver by doubleclicking and previewed it within the system preferences and everything worked as expected. This was cinder_0.9.1 but i very much doubt that anything changed on the cinder side with respect to screensavers between then and 0.9.2, but since catalina has been a comedy of errors, my being on mojave (and having all the SIP shit disabled) could be the difference.

here’s my compiled saver if you want to try that, otherwise maybe you can have a look in Console.app and see if there’s anything pertinent in there about it being blocked for whatever reason.

1 Like

Hi lithium, thanks for your help.

I tried your screensaver, and after jumping through many hoops to convince macos that it wasn’t malware, I finally got it installed as a screensaver.
Just a black screen. I guess that means it’s not related to my system, it’s just a problem with cinder on Catalina. So that means I am left to wait for it to get fixed.

I can run non-screensaver samples and they mostly work. However, cinder still has a problem with retina displays. The specific high-density-display sample looks exactly the same when I try to turn retina off, and several samples are shown in a quarter of the screen because glViewport using getWindowSize which doesn’t seem to be taking scaling into account. I really can’t believe this isn’t a solved problem by now.

And finally, I checked Console.app and didn’t see anything that would account for the black screen. However, I did find this interesting:

Aug 8 08:56:14 Dales-MacBook-Pro legacyScreenSaver[1222]: objc[1222]: Class CaptureImplAvFoundation is implemented in both /Users/dale/Library/Screen Savers/ScreenSaverTest.saver/Contents/MacOS/ScreenSaverTest (0x1101acdc0) and /Users/dale/Library/Screen Savers/RDScreensaver.saver/Contents/MacOS/RDScreensaver (0x113e602a0). One of the two will be used. Which one is undefined.
Aug 8 08:56:14 Dales-MacBook-Pro legacyScreenSaver[1222]: objc[1222]: Class CocoaRendererQuartzView is implemented in both /Users/dale/Library/Screen Savers/ScreenSaverTest.saver/Contents/MacOS/ScreenSaverTest (0x1101ace38) and /Users/dale/Library/Screen Savers/RDScreensaver.saver/Contents/MacOS/RDScreensaver (0x113e60318). One of the two will be used. Which one is undefined.
Aug 8 08:56:14 Dales-MacBook-Pro legacyScreenSaver[1222]: objc[1222]: Class RendererImpl2dMacQuartz is implemented in both /Users/dale/Library/Screen Savers/ScreenSaverTest.saver/Contents/MacOS/ScreenSaverTest (0x1101ace60) and /Users/dale/Library/Screen Savers/RDScreensaver.saver/Contents/MacOS/RDScreensaver (0x113e60340). One of the two will be used. Which one is undefined.

It seems like naming conflicts. So we can’t install more than one cinder screensaver on a computer? I see in the precompiled header there is some “devilry” to try to get around this kind of problem, but it doesn’t seem to be working. At least not for the lastest os version.

Thanks for your help.

I found a solution to this problem. Apparently, Apple refactored the drawing loop in 10.15 and drawRect is being called now instead of draw, for whatever reason. Apparently you are supposed to draw on this callback and not try to render outside of that execution chain. My solution was to add one line of code to the drawRect function:

- ( void )drawRect:(NSRect)rect
{
    if ( ! sAppImplInstance ) {
        [ super drawRect:rect]; *// draws black by default*
        return;
    }

    if ( ( ! mCinderView ) || ( ! mCinderView.readyToDraw ) ) {
        [ super drawRect:rect]; *// draws black by default*
        return;
    }

    [mCinderView draw];    // <------ THIS IS THE NEW LINE

}

It took way, way too long to figure this out. I should caveat this by saying I know next to nothing about app development on a mac so I was swimming in unknown waters. In any case, I tested the solution on 3 different computers, one of which runs 10.15. On older machines, the draw function is called, and on the newer one, drawRect is called. Note that calling [self draw] did not work; I had to call draw directly on the view.

2 Likes