Sudden error being logged continuously in XCode console

I've an app I've been working on for quite some time now. It uses SpriteKit. The windows with the scenes in them are generated programmatically. All of a sudden, when it's up and running through XCode, the console throws out a continuous stream of errors - probably in the order of 1 per second. The main one that makes up this stream is:

2022-03-07 20:07:38.765930+0000 My*App[8461:465673] [] CurrentVBLDelta returned 0 for display 1 -- ignoring unreasonable value

But others that appear slightly less frequently are:

2022-03-07 20:07:38.447800+0000 My*App[8461:465143] Metal GPU Frame Capture Enabled 2022-03-07 20:07:38.448070+0000 My*App[8461:465143] Metal API Validation Enabled 2022-03-07 20:07:38.613097+0000 My*App[8461:465640] [] [0x7f9596053820] CVCGDisplayLink::setCurrentDisplay: 1 2022-03-07 20:07:38.613415+0000 My*App[8461:465640] [] [0x7f9596053820] Bad CurrentVBLDelta for display 1 is zero. defaulting to 60Hz. 2022-03-07 20:07:38.613442+0000 My*App[8461:465640] [] [0x7f9596053800] CVDisplayLinkCreateWithCGDisplays count: 1 [displayID[0]: 0x1] [CVCGDisplayLink: 0x7f9596053820] 2022-03-07 20:07:38.613467+0000 My*App[8461:465640] [] [0x7f9596053800] CVDisplayLinkStart 2022-03-07 20:07:38.613487+0000 My*App[8461:465640] [] [0x7f9596053820] CVDisplayLink::start 2022-03-07 20:07:38.613541+0000 My*App[8461:465640] [] [0x7f9596053800] CVDisplayLinkStart 2022-03-07 20:07:38.613575+0000 My*App[8461:465640] [] [0x7f9596053820] CVDisplayLink::start 2022-03-07 20:07:38.613634+0000 My*App[8461:465671] [] [0x600000c09f10] CVXTime::reset 2022-03-07 20:07:38.613718+0000 My*App[8461:465671] [] CurrentVBLDelta returned 0 for display 1 -- ignoring unreasonable value 2022-03-07 20:07:38.639810+0000 My*App[8461:465671] [] CurrentVBLDelta returned 0 for display 1 -- ignoring unreasonable value 2022-03-07 20:07:38.639887+0000 My*App[8461:465671] [] [0x7f9596053820] CVCGDisplayLink::getDisplayTimes display: 1 -- SLSDisplayGetCurrentVBLDelta returned 0 => generating fake times 2022-03-07 20:07:38.673702+0000 My*App[8461:465653] [] [0x7f9596053820] CVCGDisplayLink::setCurrentDisplay: 1 2022-03-07 20:07:38.673748+0000 My*App[8461:465653] [] [0x7f9596053820] CVDisplayLink::stop 2022-03-07 20:07:38.673862+0000 My*App[8461:465653] [] [0x7f9596053820] Bad CurrentVBLDelta for display 1 is zero. defaulting to 60Hz. 2022-03-07 20:07:38.673883+0000 My*App[8461:465653] [] [0x7f9596053820] CVDisplayLink::start

I really don't know how else to describe this. I can only imagine having to hand over the entire project as lately I've only been working on the storyboard file so how would this affect it? To be honest the only change I can see is my upgrade to OSX 12.2.1. It's definitely something to do with SpriteKit since not initialising a window with a scene in it stops the errors from showing.

Hi everyone, after all this time, has this problem been addressed by Apple? Did they fix it in a subsequent update?

We've had the same problem for months, those two lines are piling up in our log output at 120Hz. AppKit app on M1, macOS 12.3.1, Xcode 13.4.1, macOS SDK 10.14 and Rosetta.

Oct of 2022 and this is still happening - Xcode 14, macOS 13 beta.

This error in CVDisplayLink has been occurring since the release of Moneterrey beta over 1.5 years ago. The messages only occur when running x64 apps under Rosetta 2. And the early logs show that the display link is forced to 60Hz, which basically kills ProMotion adaptive sync on M1/M2 at 120Hz.

Then it streams a ton of repeated NSLog messages at 60Hz to the console which further slow down our app. The suggestions to set OS_ACTIVITY_MODE disabled to suppress with the repeated logs works, but then also suppresses all NSLog from ours and any Apple libraries.

I don't understand how this hasn't been fixed, since I'm now on macOS 13.3.1, and was on macOS 12.0 when this started happening.

This just started happening out of the blue on a M1 Studio Mac with Monterrey 12.6.7 and XCode 14.1. The project is at least 3 years old and this warning has never shown up. One thing that is interesting is I move the project between the Studio Mac and an intel iMac every now and then. While trying to figure out what's gone wrong now - I happened to look up at the menu bar in XCode and it was saying to run the app under Rosetta. Changing that from My Mac (Rosetta) to My Mac solved the problem. No idea how that got changed.

This is still completely bust in MacOS 12, 13, and 14. Maybe even back as far as 11.0. It's more than just an error message. It breaks using ProMotion in Rosetta apps, and having any chance of reaching 120Hz.

CurrentVBLDelta returned 200,000 for display 1 -- ignoring unreasonable value [0x7f85fd07ba20] Bad CurrentVBLDelta for display 1 is zero. defaulting to 60Hz. <-

0 fps is supposed to mean run at maximum refresh, not divide by 0 and compute an invalid vertical blank (f.e. 20000).

Sudden error being logged continuously in XCode console
 
 
Q