macOS: [VLCKit-3.0-current] Crash on close app.
Hello,
Environment:
- VLCKit 3.0-latest
- macOS 13.0
- XCode 14.0.1
- Swift 5.7
Code:
import Cocoa
import VLCKit
class ViewController: NSViewController {
let mediaURL = "https://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4"
let videoView = VLCVideoView(frame: NSRect(x: 5, y: 5, width: 500, height: 400))
let mediaPlayer = VLCMediaPlayer()
override func viewDidLoad() {
super.viewDidLoad()
// custom code
mediaPlayer.drawable = videoView
mediaPlayer.media = VLCMedia(url: URL(string: mediaURL)!)
self.view.addSubview(videoView)
mediaPlayer.play()
}
}
Issue:
The app crashes on exit
2022-10-28 13:33:40.600573+0400 vlcbugs[3324:191229] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600003c256c0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2022-10-28 13:33:40.631491+0400 vlcbugs[3324:191229] creating player instance using shared library
2022-10-28 13:33:40.692057+0400 vlcbugs[3324:191795] Metal API Validation Enabled
pthread_cond_destroy returned 22
LibVLC fatal error destroying condition (22) in thread 18446744073709551615 at /u/seiv/Projects/XCodeProjects/packages/VLCKit-3.0/libvlc/vlc/src/darwin/thread.c:254 in vlc_cond_destroy
0 VLCKit 0x00000001083ce2cc vlc_trace + 132
1 VLCKit 0x00000001083ce55c vlc_thread_fatal + 152
2 VLCKit 0x00000001083ce8a8 vlc_cond_destroy + 148
3 VLCKit 0x00000001097bff7c vlc_access_cache_Destroy + 344
4 VLCKit 0x00000001099a6f14 vlc_access_cache_destructor_dsm_cache + 20
5 libsystem_c.dylib 0x000000018983905c __cxa_finalize_ranges + 464
6 libsystem_c.dylib 0x0000000189838df0 exit + 44
7 AppKit 0x000000018ce992a8 -[NSApplication terminate:] + 1372
8 AppKit 0x000000018ce2d2f0 -[NSApplication(NSResponder) sendAction:to:from:] + 440
9 AppKit 0x000000018cef9998 -[NSMenuItem _corePerformAction] + 336
10 AppKit 0x000000018cef9714 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 104
11 AppKit 0x000000018d1eab7c -[NSMenu _performActionForItem:atIndex:fromEvent:] + 212
12 AppKit 0x000000018cef8c24 -[NSMenu performKeyEquivalent:] + 356
13 AppKit 0x000000018d328090 routeKeyEquivalent + 428
14 AppKit 0x000000018cdafba0 -[NSApplication(NSEvent) sendEvent:] + 652
15 AppKit 0x000000018d002144 -[NSApplication _handleEvent:] + 60
16 AppKit 0x000000018cc77c14 -[NSApplication run] + 500
17 AppKit 0x000000018cc4f058 NSApplicationMain + 880
18 vlcbugs 0x0000000104f0cd70 $sSo21NSApplicationDelegateP6AppKitE4mainyyFZ + 40
19 vlcbugs 0x0000000104f0cd38 $s7vlcbugs11AppDelegateC5$mainyyFZ + 44
Error message: Invalid argument