Cannot find executable for CFBundle/CFPlugIn 0x432bfa0 (not loaded)
Cannot find function pointer NewPlugIn for 开发者_StackOverflowfactory C5A4CE5B-0BB8-11D8-9D75-0003939615B6 in CFBundle/CFPlugIn 0x432bfa0 (not loaded)
That's the error I get when I try to run this code:
NSString *path = [[NSBundle mainBundle] pathForResource:[arraySubFarts objectAtIndex:indexPath.row] ofType:@"mp3"];
NSURL *file = [[NSURL alloc] initFileURLWithPath:path];
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:file error:nil];
self.player = player;
[player prepareToPlay];
[player setDelegate:self];
[self.player play];
Have you got any idea why this is happening?
I have included the needed frameworks, and the code works great, the only thing is this odd Console-message..
EDIT: New odd messages:
AddRunningClient starting device on non-zero client count
when playing an MP3.
As it seams that the problem isn't in the code, there may multiple causes for your problem, so:
I recommend you create a simple project in which you put the simplest audio file or run one of the apple's sample project, like Metronome or avTouch
Try to uninstall XCode by writing in Terminal:
sudo /Developer/Library/uninstall-devtools --mode=all
and re-install XCode because sometimes there appear some problems in the instalation process of the XCode(I had some errors too, but they dissapeared after a clean install).
Try to play the same file with MPMoviePlayerController
Try to run on the iPhone.
The message "AddRunningClient starting device on non-zero client count" also appears for mpmoviePlayercontroller on iPhone SDK 4.0 Beta, so you don't have to worry too much about it.
Hope my answer helps you!
There is a fairly old thread over at Apple support that might have some sage advice.
The suggestion is to try running Disk Utility on your system, clicking "Repair Disk Permissions". The symptom may be that, for whatever reason, the DVCPROHDAudio.plugin file has lost its execute mode or has had its owner id changed.
try deleting or renaming the plugin file to something like ...plugin.old and re-run your code to see if you get the error still.
Or just Reboot your machine. Oddly, this worked for me as it seemed to only be happening when I connected to my local WiFi.
Yes, weird. But it worked.
Make clean did the trick for me...
精彩评论