Crash on OSX after changing audio source

This forum is about all development around libVLC.
grum666
New Cone
New Cone
Posts: 1
Joined: 06 Aug 2014 16:44

Crash on OSX after changing audio source

Postby grum666 » 06 Aug 2014 17:01

Hi, we are using the VLC 2.0.9 library's to play video and audio on a 32bit Xojo app on OSX. I have come across a crash which i cannot stop when either the computer goes to sleep / wakes up or the list of audio devices is changed, say by unplugging usb speakers or thunderbolt screen with built in audio (though i think the two crashes are related).
I am initializing a global VLCInstance and creating a media reference to the audio file , then creating a player wrapping that media reference. At this stage the app will not crash if audio devices are changed. If i start playing the audio file and then change audio lists the program crashes out with the following error, the crash also occurs after i stop playback.
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libvlccore.5.dylib 0x131f2389 vlc_vaLog + 649
1 libvlccore.5.dylib 0x131f2783 vlc_Log + 51
2 com.apple.audio.CoreAudio 0x91f80771 ___ZN19HALPropertyListener4CallEmmPK26AudioObjectPropertyAddress_block_invoke_2 + 56
3 libdispatch.dylib 0x9a8f876b _dispatch_call_block_and_release + 15
4 libdispatch.dylib 0x9a8f5386 _dispatch_client_callout + 50
5 libdispatch.dylib 0x9a8fda7b _dispatch_main_queue_callback_4CF + 294
6 com.apple.CoreFoundation 0x924abfae __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
7 com.apple.CoreFoundation 0x924633c9 __CFRunLoopRun + 1897
8 com.apple.CoreFoundation 0x924629ea CFRunLoopRunSpecific + 394
9 com.apple.CoreFoundation 0x9246284b CFRunLoopRunInMode + 123
10 com.apple.HIToolbox 0x91fe4b5d RunCurrentEventLoopInMode + 259
11 com.apple.HIToolbox 0x91fe4777 ReceiveNextEventCommon + 163
12 com.apple.HIToolbox 0x9217f936 ReceiveNextEventInMode + 75
13 com.apple.HIToolbox 0x9217f99a ReceiveNextEvent + 72
14 rbframework.dylib 0x02e60b44 0x2dda000 + 551748
15 rbframework.dylib 0x02e60759 0x2dda000 + 550745
16 rbframework.dylib 0x02e61676 0x2dda000 + 554614
17 My Application.debug 0x00063d08 Delegate.Invoke%% + 34
18 My Application.debug 0x0010f662 Application._CallFunctionWithExceptionHandling%%o<Application>p + 248
19 rbframework.dylib 0x02e614a4 0x2dda000 + 554148
20 rbframework.dylib 0x02e61850 0x2dda000 + 555088
21 rbframework.dylib 0x02e2cd02 RuntimeRun + 50
22 My Application.debug 0x002a664d REALbasic._RuntimeRun + 34
23 My Application.debug 0x00003b6f _Main + 245
24 My Application.debug 0x0000253c % main + 36
25 My Application.debug 0x027f04a1 _start + 116
26 My Application.debug 0x027f03f7 start + 43
The following error has also occured
Thread 10 Crashed:: Dispatch queue: com.apple.audio.CADispatchQueue.SerialQueue
0 libsystem_c.dylib 0x93bd8837 tfind + 30
1 libvlccore.5.dylib 0x13127c2a var_TriggerCallback + 74
As well as
Thread 2 Crashed:: Dispatch queue: com.apple.audio.CADispatchQueue.SerialQueue
0 ??? 0x04921380 0 + 76682112
1 com.apple.audio.CoreAudio 0x91f8081c HALPropertyListener_Call_Helper(long, void*, void*, unsigned long, unsigned long, AudioObjectPropertyAddress const*) + 148
2 com.apple.audio.CoreAudio 0x91f8060b HALPropertyListener::Call(unsigned long, unsigned long, AudioObjectPropertyAddress const*) + 615
3 com.apple.audio.CoreAudio 0x91f7dae9 HALObject::PropertiesChanged(unsigned long, AudioObjectPropertyAddress const*) + 725
4 com.apple.audio.CoreAudio 0x91f7aa0f HALDevice::PropertiesChanged(unsigned long, AudioObjectPropertyAddress const*) + 749
5 com.apple.audio.CoreAudio 0x91f7974f HALDevice::Teardown() + 75
6 com.apple.audio.CoreAudio 0x91f82a23 HALSystem::ObjectsPublishedAndDied(unsigned long, unsigned long const*, unsigned long, unsigned long const*) + 517
7 com.apple.audio.CoreAudio 0x91f83264 HALSystem::AudioObjectsPublishedAndDied(AudioHardwarePlugInInterface**, unsigned long, unsigned long, unsigned long const*, unsigned long, unsigned long const*) + 196
8 com.apple.audio.CoreAudio 0x91f705a7 ___ZN16HALC_ShellPlugIn34Defer_AudioObjectsPublishedAndDiedEmmPKmmS1__block_invoke + 64
9 libdispatch.dylib 0x9a8f876b _dispatch_call_block_and_release + 15
10 libdispatch.dylib 0x9a8f5386 _dispatch_client_callout + 50
11 libdispatch.dylib 0x9a8f7af3 _dispatch_queue_drain + 410
12 libdispatch.dylib 0x9a8f8fcf _dispatch_queue_invoke + 126
13 libdispatch.dylib 0x9a8f738a _dispatch_root_queue_drain + 72
14 libdispatch.dylib 0x9a8f870e _dispatch_worker_thread2 + 39
15 libsystem_pthread.dylib 0x9a8eedab _pthread_wqthread + 336
16 libsystem_pthread.dylib 0x9a8f2cce start_wqthread + 30
I cannot stop the crash even but cleaning up all references to the media, player and even shutting down the global instance.
All the calls to VLC are being done through the MonkeyBreadSoftware libraries.

I am not sure if this has been fixed in a more recent release but as VLC on OSX is no longer compiled to 32bit we cannot use them.
Any info on how to stop the crash would be most appreciated.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Crash on OSX after changing audio source

Postby Jean-Baptiste Kempf » 10 Dec 2014 15:36

I'm afraid we won't support for 32bits for a good reason. And that should be fixed in 2.2.0
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

edwinnaar
New Cone
New Cone
Posts: 4
Joined: 23 Mar 2016 02:09

Re: Crash on OSX after changing audio source

Postby edwinnaar » 20 Apr 2017 21:53

Nowadays Xojo supports 64bit, in both debugmode as in a build app. Have you been able to get your app running yet?
I have been playing around with ffmpeg in a shell. But I want to try the VLC libraries. Are you using Declares?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 1 guest