CVDisplayLink Bug on macOS 12.3+ M1 Macbook

Recently a bug related to CVDisplayLink happens to some users of our APP.

In our code, we simply create a display link using CVDisplayLinkCreateWithActiveCGDisplays and do the render things in the callback.

The log shows that, in some cases, the interval between two display link callbacks last for many hours, in other cases, the display link callback stop being called from the beginning or after a certain time.

We did not change that code for a long time and that bug only happens on macOS 12.3.0+ and M1 Macbook.

So we want to know if this is a system bug, or there are some changes about CVDisplayLink in recent macOS versions that we need to do some compatibility changes.

(Since 12.1, there will be some logs about CVDisplayLink in the xcode output.)

CVCGDisplayLink::setCurrentDisplay: 69734662
CVDisplayLinkCreateWithCGDisplays count: 2 [displayID[0]: 0x4281106] [CVCGDisplayLink: 0x7fde5200ce20]
CVDisplayLinkStart
CVDisplayLink::start
CVXTime::reset
CVXTime::reset
CVXTime::reset
CVDisplayLink Bug on macOS 12.3+ M1 Macbook
 
 
Q