Re: CGImageSourceCreateFromURL failed with error -11
I'd also try opening all the image files in some Apple-related graphics programs (e.g., Preview, QuickTime Player, etc.) in order to determine if it's system-wide or some combination in your own application; of course, there are other factors that would be involved in using these, but since Apple software also relies upon OS-level technologies, if it happened there, it'll help Apple track down the bug. Nevertheless, it sounds like you're going to have to produce a small application along with any particular combination of image files that can reproduce the problem and submit it as a bug. If you've got a DTS incident available, you probably should forward them the bug number to expedite things. According to a MacNN article this morning: http://www.macnn.com/articles/08/08/08/new.mac.os.x.1055.build/ if you've got a developer seed key, you might try that out to see if a bug related to this is fixed. And, if there is a 10.5.5 coming out (whether or not there is, I can't say so), getting this submitted through the DTS channel today, if it's an OS-level thing, might get you the fix you need more quickly. Well, I can't speak for James, but I have forced the thumbnail creation to have at most 10 files opened at the same time, and it doesn't make a difference... I could understand a memory allocation issue, if the app didn't take roughly 100 megs of RAM. And besides, I can see there's a difference between running in debug and release mode too... Does anyone know what -11 means? Let's forget for a minute how we do things, I guess James and I don't have the same app, the same goals and the same method of getting the images... If the lib explicitely indicates that it's a -11 error, maybe there's a simple explanation? On 06 Aug 2008, at 23:36, Gary L. Wade wrote: Off the top of my head, with a number of files being opened so high and relatively close to the value you get from getrlimit with a parameter of RLIMIT_NOFILE, I'd suggest checking to see if that's the problem. -- Zino ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
As I mentioned in my case, the images load fine when running through XCode, but not as a standalone binary. So, I guess the images themselves are fine. As producing an isolated test case scenario is going to be prohibitively difficult in my case, all I would like is a way to detect this happening so I can behave accordingly. Im my application, The -11 errors start getting coughed up after a delay. Is there any way I can detect this error happening? My code that calls CGImageSourceCreateFromURL doesn't appear to produce null image sources, so I can't detect and handle this error condition. Is there any way I can detect this error condition? -j On Fri, Aug 8, 2008 at 11:00 AM, Gary L. Wade [EMAIL PROTECTED] wrote: I'd also try opening all the image files in some Apple-related graphics programs (e.g., Preview, QuickTime Player, etc.) in order to determine if it's system-wide or some combination in your own application; of course, there are other factors that would be involved in using these, but since Apple software also relies upon OS-level technologies, if it happened there, it'll help Apple track down the bug. Nevertheless, it sounds like you're going to have to produce a small application along with any particular combination of image files that can reproduce the problem and submit it as a bug. If you've got a DTS incident available, you probably should forward them the bug number to expedite things. According to a MacNN article this morning: http://www.macnn.com/articles/08/08/08/new.mac.os.x.1055.build/ if you've got a developer seed key, you might try that out to see if a bug related to this is fixed. And, if there is a 10.5.5 coming out (whether or not there is, I can't say so), getting this submitted through the DTS channel today, if it's an OS-level thing, might get you the fix you need more quickly. Well, I can't speak for James, but I have forced the thumbnail creation to have at most 10 files opened at the same time, and it doesn't make a difference... I could understand a memory allocation issue, if the app didn't take roughly 100 megs of RAM. And besides, I can see there's a difference between running in debug and release mode too... Does anyone know what -11 means? Let's forget for a minute how we do things, I guess James and I don't have the same app, the same goals and the same method of getting the images... If the lib explicitely indicates that it's a -11 error, maybe there's a simple explanation? On 06 Aug 2008, at 23:36, Gary L. Wade wrote: Off the top of my head, with a number of files being opened so high and relatively close to the value you get from getrlimit with a parameter of RLIMIT_NOFILE, I'd suggest checking to see if that's the problem. -- Zino ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/trankelson%40gmail.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
Hi James, Nicholas, I still bet it's someone holding too many file descriptors open. Nicholas, when you said this, but I have forced the thumbnail creation to have at most 10 files opened at the same time, what did you mean? You can see what files your process has open using the lsof command line tool. Use that to check what files you have open. lsof -p pid If you find that the problem is files staying open longer than you want, you may be able to work around the issue by bringing the data into the process with a method like +[NSData dataWithContentsOfURL:] (I don't see a CF equivalent, but I may be going blind) then using CGImageSourceCreateWithData instead of CGImageSourceCreateWithURL. The -11 error is kCFURLUnknownSchemeError, but even the determination of the error code be a bug. -Ken On Fri, Aug 8, 2008 at 11:31 AM, James Trankelson [EMAIL PROTECTED] wrote: As I mentioned in my case, the images load fine when running through XCode, but not as a standalone binary. So, I guess the images themselves are fine. As producing an isolated test case scenario is going to be prohibitively difficult in my case, all I would like is a way to detect this happening so I can behave accordingly. Im my application, The -11 errors start getting coughed up after a delay. Is there any way I can detect this error happening? My code that calls CGImageSourceCreateFromURL doesn't appear to produce null image sources, so I can't detect and handle this error condition. Is there any way I can detect this error condition? -j On Fri, Aug 8, 2008 at 11:00 AM, Gary L. Wade [EMAIL PROTECTED] wrote: I'd also try opening all the image files in some Apple-related graphics programs (e.g., Preview, QuickTime Player, etc.) in order to determine if it's system-wide or some combination in your own application; of course, there are other factors that would be involved in using these, but since Apple software also relies upon OS-level technologies, if it happened there, it'll help Apple track down the bug. Nevertheless, it sounds like you're going to have to produce a small application along with any particular combination of image files that can reproduce the problem and submit it as a bug. If you've got a DTS incident available, you probably should forward them the bug number to expedite things. According to a MacNN article this morning: http://www.macnn.com/articles/08/08/08/new.mac.os.x.1055.build/ if you've got a developer seed key, you might try that out to see if a bug related to this is fixed. And, if there is a 10.5.5 coming out (whether or not there is, I can't say so), getting this submitted through the DTS channel today, if it's an OS-level thing, might get you the fix you need more quickly. Well, I can't speak for James, but I have forced the thumbnail creation to have at most 10 files opened at the same time, and it doesn't make a difference... I could understand a memory allocation issue, if the app didn't take roughly 100 megs of RAM. And besides, I can see there's a difference between running in debug and release mode too... Does anyone know what -11 means? Let's forget for a minute how we do things, I guess James and I don't have the same app, the same goals and the same method of getting the images... If the lib explicitely indicates that it's a -11 error, maybe there's a simple explanation? On 06 Aug 2008, at 23:36, Gary L. Wade wrote: Off the top of my head, with a number of files being opened so high and relatively close to the value you get from getrlimit with a parameter of RLIMIT_NOFILE, I'd suggest checking to see if that's the problem. -- Zino ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/trankelson%40gmail.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/kenferry%40gmail.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
Le 8 août 08 à 20:56, Ken Ferry a écrit : Hi James, Nicholas, I still bet it's someone holding too many file descriptors open. Nicholas, when you said this, but I have forced the thumbnail creation to have at most 10 files opened at the same time, what did you mean? You can see what files your process has open using the lsof command line tool. Use that to check what files you have open. lsof -p pid If you find that the problem is files staying open longer than you want, you may be able to work around the issue by bringing the data into the process with a method like +[NSData dataWithContentsOfURL:] (I don't see a CF equivalent, but I may be going blind) It's just hidden in the Core Foundation References: CFURLCreateDataAndPropertiesFromResource() from Core Foundation URL Access Utilities Reference http://developer.apple.com/documentation/CoreFoundation/Reference/CFURLAccessUtils/Reference/reference.html ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
Indeed, for me, this is related to file descriptors. While it's still unclear to me exactly where the problem lies, some quick fiddling with opening the files as NSData and creating images from those appears to be bearing fruit. Thanks! -j On Fri, Aug 8, 2008 at 5:51 PM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: Le 8 août 08 à 20:56, Ken Ferry a écrit : Hi James, Nicholas, I still bet it's someone holding too many file descriptors open. Nicholas, when you said this, but I have forced the thumbnail creation to have at most 10 files opened at the same time, what did you mean? You can see what files your process has open using the lsof command line tool. Use that to check what files you have open. lsof -p pid If you find that the problem is files staying open longer than you want, you may be able to work around the issue by bringing the data into the process with a method like +[NSData dataWithContentsOfURL:] (I don't see a CF equivalent, but I may be going blind) It's just hidden in the Core Foundation References: CFURLCreateDataAndPropertiesFromResource() from Core Foundation URL Access Utilities Reference http://developer.apple.com/documentation/CoreFoundation/Reference/CFURLAccessUtils/Reference/reference.html ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/trankelson%40gmail.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
Well, I can't speak for James, but I have forced the thumbnail creation to have at most 10 files opened at the same time, and it doesn't make a difference... I could understand a memory allocation issue, if the app didn't take roughly 100 megs of RAM. And besides, I can see there's a difference between running in debug and release mode too... Does anyone know what -11 means? Let's forget for a minute how we do things, I guess James and I don't have the same app, the same goals and the same method of getting the images... If the lib explicitely indicates that it's a -11 error, maybe there's a simple explanation? On 06 Aug 2008, at 23:36, Gary L. Wade wrote: Off the top of my head, with a number of files being opened so high and relatively close to the value you get from getrlimit with a parameter of RLIMIT_NOFILE, I'd suggest checking to see if that's the problem. -- Zino ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
Hi Nicolas, David, I'm having the exact same problem. Loading collections of small images (jpeg in my case). The only slight difference for me is that if I run my application under XCode (Debug build), I don't get any errors. All of the images load fine. However, when I run the (Debug) binary, I'm able to load around ~180 small jpegs, then just a whole bunch of the following error for each image I try to load past that ~180 image limit. CGImageSourceCreateWithURL failed with error code -11. I'd like to get this figured out if anyone has any insight. I'd also like to know if there are any *expected* differences between running the same (Debug) binary through XCode versus as a standalone... I wouldn't think so, but that's not what I'm seeing. In other parts of my app, the standalone will simply crash without explanation, whereas the XCode version will perform the expected behavior without complaint. -j On Tue, Aug 5, 2008 at 2:32 AM, Nicolas Zinovieff [EMAIL PROTECTED] wrote: David, the images are GIFs, roughly 40KB each, 200x100 (or 100x200). Nothing fancy. On 05 Aug 2008, at 01:05, David Duncan wrote: What types of images are you trying to load? -- Zino ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/trankelson%40gmail.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
Couldn't tell either of you why your having issues without seeing code, and probably not even then, but this is probably worth a bug report. On Aug 6, 2008, at 1:52 PM, James Trankelson wrote: I'm having the exact same problem. Loading collections of small images (jpeg in my case). On Tue, Aug 5, 2008 at 2:32 AM, Nicolas Zinovieff [EMAIL PROTECTED] wrote: David, the images are GIFs, roughly 40KB each, 200x100 (or 100x200). Nothing fancy. -- David Duncan Apple DTS Animation and Printing [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
Off the top of my head, with a number of files being opened so high and relatively close to the value you get from getrlimit with a parameter of RLIMIT_NOFILE, I'd suggest checking to see if that's the problem. Hi Nicolas, David, I'm having the exact same problem. Loading collections of small images (jpeg in my case). The only slight difference for me is that if I run my application under XCode (Debug build), I don't get any errors. All of the images load fine. However, when I run the (Debug) binary, I'm able to load around ~180 small jpegs, then just a whole bunch of the following error for each image I try to load past that ~180 image limit. CGImageSourceCreateWithURL failed with error code -11. I'd like to get this figured out if anyone has any insight. I'd also like to know if there are any *expected* differences between running the same (Debug) binary through XCode versus as a standalone... I wouldn't think so, but that's not what I'm seeing. In other parts of my app, the standalone will simply crash without explanation, whereas the XCode version will perform the expected behavior without complaint. -j On Tue, Aug 5, 2008 at 2:32 AM, Nicolas Zinovieff [EMAIL PROTECTED] wrote: David, the images are GIFs, roughly 40KB each, 200x100 (or 100x200). Nothing fancy. On 05 Aug 2008, at 01:05, David Duncan wrote: What types of images are you trying to load? -- Zino ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
David, the images are GIFs, roughly 40KB each, 200x100 (or 100x200). Nothing fancy. On 05 Aug 2008, at 01:05, David Duncan wrote: What types of images are you trying to load? -- Zino ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
CGImageSourceCreateFromURL failed with error -11
Hey all, I have this app that constantly updates a series of thumbnails in the background for a Cocoa view. When I have less than, say, 40 items in there, there is no problem at all. If I add three times that many elements, CGImageSourceCreateWithURL fails with error -11 Now, I know it's not a memory issue, since my app takes less than 70 megs of RAM (and I have no leak), and I know this is not a threaded vs main thread issue, since it works beautifully up until that roughly 100-items-limit. My trouble is -11 isn't documented. I found some info on a -15 (bad param) with that function, but -11 is supposed to be dsDisassemblerInstalled. Is MacsBug back in Leopard? ;) Does anyone know what this error is about? -- Zino ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
On Aug 4, 2008, at 4:00 AM, Nicolas Zinovieff wrote: I have this app that constantly updates a series of thumbnails in the background for a Cocoa view. When I have less than, say, 40 items in there, there is no problem at all. If I add three times that many elements, CGImageSourceCreateWithURL fails with error -11 How is CGImageSourceCreateWithURL failing with any error when its return value is a CGImageSourceRef and not an OSStatus? -- David Duncan Apple DTS Animation and Printing [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
On 04 Aug 2008, at 18:54, David Duncan wrote: How is CGImageSourceCreateWithURL failing with any error when its return value is a CGImageSourceRef and not an OSStatus? Well, it returns NULL, and prints in the console that it failed with error -11... And that takes a very long time to return, too. -- Zino ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]
Re: CGImageSourceCreateFromURL failed with error -11
On Aug 4, 2008, at 3:58 PM, Nicolas Zinovieff wrote: On 04 Aug 2008, at 18:54, David Duncan wrote: How is CGImageSourceCreateWithURL failing with any error when its return value is a CGImageSourceRef and not an OSStatus? Well, it returns NULL, and prints in the console that it failed with error -11... And that takes a very long time to return, too. What types of images are you trying to load? -- David Duncan Apple DTS Animation and Printing [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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]