Re: DVCPROHDAudio.plugin freezes at instantiation
Re: DVCPROHDAudio.plugin freezes at instantiation
- Subject: Re: DVCPROHDAudio.plugin freezes at instantiation
- From: Jeff Moore <email@hidden>
- Date: Tue, 20 Apr 2010 20:53:04 -0700
The interesting part of this backtrace is, as you point out, the initialization of the HAL prior entering main. While I don't believe that this is going to be an issue for the HAL proper because of the way the linkage works, it is possible that something the AVC plug-in needs hasn't been loaded and/or initialized at this point of the program execution.
It would make a good experiment to shift the initialization to some point after entering the main() of the program. For library code, you have a few options. You can make a class method that clients need to call to initialize things. You could also implement lazy initialization, but I'm less clear on how that would work with an ObjC.
On Apr 20, 2010, at 3:47 AM, Martin Hairer wrote:
> Hi,
>
> I was just wondering if this is a known problem or if there's a fault somewhere with my software...
> On some user's machines, my software freezes upon launch, which is obviously rather annoying.
> In every single instance where this happened, the problem was resolved by removing the
> "DVCPROHDAudio.plugin" from the user's Library folder. The problem seems to be triggered
> by this plug-in only under certain circumstances (certain devices attached to the computer),
> so I actually haven't been able to reproduce it myself on any of my machines. However, I got
> about a dozen or so user's reports and they can all generate traces that are similar to the one
> shown at the end of this email (essentially it gets stuck in APW::Mux::DVCProHD::Muxer::Muxer).
>
> If this is a known problem, does Apple have a fix for this or should I try to file a bug report? Also,
> does anyone have an idea why this doesn't cause every single Audio related software on these
> user's machines to freeze? After all, most of these would probably make a call to
> AudioHardwareAddPropertyListener at startup. The offending method in MTCoreAudioDevice is
>
> + (void) load
> {
> _MTCoreAudioHardwareDelegate = nil;
> AudioHardwareAddPropertyListener ( kAudioPropertyWildcardPropertyID, _MTCoreAudioHardwarePropertyListener, NULL );
> }
>
> Is there anything wrong with calling AudioHardwareAddPropertyListener in the "load" method of
> an Objective-C class? (i.e. should I try to defer that call to a later time?) Regards,
>
> Martin
>
> HairerSoft
> http://www.hairersoft.com/
>
> ---------------------------------------------
>
> Sampling process 920 for 3 seconds with 1 millisecond of run time between samples
> Sampling completed, processing symbols...
> Analysis of sampling Amadeus Pro (pid 920) every 1 millisecond
> Call graph:
> 2429 Thread_40083 DispatchQueue_1: com.apple.main-thread (serial)
> 2429 _dyld_start
> 2429 dyldbootstrap::start(macho_header const*, int, char const**, long)
> 2429 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**)
> 2429 dyld::initializeMainExecutable()
> 2429 ImageLoader::runInitializers(ImageLoader::LinkContext const&)
> 2429 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int)
> 2429 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int)
> 2429 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int)
> 2429 dyld::notifySingle(dyld_image_states, ImageLoader const*)
> 2429 load_images
> 2429 call_load_methods
> 2429 +[MTCoreAudioDevice load]
> 2429 AudioHardwareAddPropertyListener
> 2429 HALSystem::CheckOutInstance()
> 2429 HALSystem::InitializeDevices()
> 2429 HALPlugInManagement::Initialize()
> 2429 HALPlugInManagement::CreateHALPlugIn(HALCFPlugIn const*)
> 2429 std::_Rb_tree<unsigned long, std::pair<unsigned long const, HPStream*>, std::_Select1st<std::pair<unsigned long const, HPStream*> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, HPStream*> > >::insert_unique(std::pair<unsigned long const, HPStream*> const&)
> 2429 APW::CA::HALPlugIn::DVCProHD::PlugIn::Initialize()
> 2429 OpenComponent
> 2429 OpenAComponent
> 2429 CallComponentOpen
> 2429 CallComponentDispatch
> 2429 MuxerComponentComponentDispatch(ComponentParameters*, APW::Mux::DVCProHD::MuxerComponentGlobals*)
> 2429 CallComponentFunctionCommonWithStorage(char**, ComponentParameters*, long (*)(), unsigned long)
> 2429 MuxerComponentOpen(APW::Mux::DVCProHD::MuxerComponentGlobals*, ComponentInstanceRecord*)
> 2429 APW::Mux::DVCProHD::Muxer::Muxer()
> 2429 AVS::CreateAVCDeviceController(AVS::AVCDeviceController**, int (*)(AVS::AVCDeviceController*, void*, AVS::AVCDevice*), void*, int (*)(AVS::AVCDevice*, unsigned int, void*, void*))
> 2428 usleep$UNIX2003
> 2422 nanosleep$UNIX2003
> 2420 __semwait_signal
> 2 __spin_lock
> 6 cerror
> 6 cthread_set_errno_self
> 4 __error
> 2 cthread_set_errno_self
> 1 AVS::CreateAVCDeviceController(AVS::AVCDeviceController**, int (*)(AVS::AVCDeviceController*, void*, AVS::AVCDevice*), void*, int (*)(AVS::AVCDevice*, unsigned int, void*, void*))
--
Jeff Moore
Core Audio
Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden