Crash in Catalina beta: assertion failure: "((void *)0) == tsd->NSCurrentOpenGLContext"
Hi. I am experiencing a crash, *assertion failure: "((void )0) == tsd->NSCurrentOpenGLContext" -> %lld, in my own app running on macOS Catalina 10.15 beta 8 (build 19A558d). I believe the crash happens every time I switch media after the initial playback; the same crash also occurs in version 3.0.8 of the VLC application. Details and crash reports follow.
My application has been successfully using VLCKit to stream IP cameras for over a year; obviously I can provide additional details and promo-codes to download it from the App Store if needed.
I previously tested my app on beta 1 of Catalina and the app was behaving properly (or my testing was insufficient
Here are the details of the crash and what I have figured out so far: when the app launches, by defaults starts playback of the first stream in its "playlist" and works fine as long as I leave it be, but as soon as I try to switch to another stream URL (media), the app immediately crashes with the assertion failure in the subject. What is worst, even attached to the Xcode debugger, no specific part of my code is highlighted, Xcode just logs "assertion failure: "((void *)0) == tsd->NSCurrentOpenGLContext" -> 0" and "Message from debugger: Terminated due to signal 9".
Placing a few breakpoints, I have been able to vaguely understand when this happens. When I switch from a camera to another, I:
- Select a different media from a VLCMediaList instantiated upon launch (and used also to set up the initial, properly working, playback) with
mediaPlayer?.media = playlist?.media(at: myNewIndex)
The app crashes always on 2, as soon as I switch the media, and never gets to
I tried performing the same operation using the latest VLC application (using File > Open Network and pasting a video stream URL) and the result is the same: it works the first time, and then crashes immediately with the next URL I try to open. I can provide this two test URLs if you want to test the crash yourself with VLC: first open rtsp://contact-me:email@example.com:9999/videoSub and later try opening rtsp://contact-me:firstname.lastname@example.org:9999/videoMain.
A couple of final notes: I did update the VLCKit framework in my app from 3.3.1 to 3.3.5, but the situation did not improve; I also searched the forum and the web for other reports, and I did not find anything specific about VLC, but it seems that the crash occurs in many, many OpenGL based applications.
I am very worried that Apple might have killed OpenGL sooner that expected, so any suggestions is very much appreciated, especially given the imminent launch of Catalina and the unreliable situation I will be putting my app users' in.
Attached you can find a couple of crash reports of my app, and one from the official VLC app:
Thank you in advance, and please let me know if I need to clarify anything: I am out of my league here, but I really hope to be able to fix it for my users before the new OS ships.