I am loading images from an external disk, about one image per second.
My code looks like this: filename_ = [list_ objectAtIndex: index_]; NSLog( @"orig filename = %@", filename_ );NSURL * url = [NSURL fileURLWithPath: filename_ isDirectory: NO]; // this escapes any characters that are not allowed in URLs, I think
if ( url == NULL )
...
NSLog( @"url = '%@'", url );
CGImageSourceRef sourceRef = CGImageSourceCreateWithURL
( (CFURLRef) url, NULL );
if ( sourceRef == NULL )
output error message to the log
Now, one user has reported that, occasionally,
CGImageSourceCreateWithURL() fails -- I can tell from the log I
received.
I have never seen a case where -fileURLWithPath has failed.The paths of the images look like "/Volumes/MaxtorMac1/Verses/ image.jpg".
I haven't seen any weird characters, except an occasional space.But CGImageSourceCreateWithURL() failed even with paths that contained no space at all.
I have no idea, in which direction to look for the bug. Could some kind soul suggest which direction to explore?Should I further massage the filename or URL somehow, in order to avoid the failures?
Could it have anything to do with the images being on an external disk?(Since I'm loading one image per second, the bug could not be caused by the external disk going to sleep, could it?)
Thanks a lot in advance.
Best regards,
Gabriel.
____________________________________________________________
Eigentlich bin ich ganz anders, nur komme ich so selten dazu.
( Ödön von Horváth )
____________________________________________________________
http://zach.in.tu-clausthal.de
____________________________________________________________
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
