NSImage save error
NSImage save error
- Subject: NSImage save error
- From: Vinay Prabhu <email@hidden>
- Date: Thu, 15 Mar 2007 11:12:02 +0530
- Importance: Normal
Hi,
In my application, I am distributing the images from the folder on different
pages Eg, 4 photo's on each page.
I have created a recursive function to save each page as a tiff image.
The recursive function is like this,
NSImage* drawImage = [[NSImage alloc] initWithSize:pageSize];
[drawImage lockFocus];
//Drawing code here
//I will draw 4 thumbnail images on the page
[drawImage unlockFocus];
//Save the drawImage as a tiff file
[[drawImage TIFFRepresentation] writeToFile:path automatically:NO];
When there are more than 100 images in the folder, the recursion level
reaches the depth of more than 25 level's.
At the 25th level, I am getting the following messages in the log and
application crashes.
(330,0x191d400) malloc: *** vm_allocate(size=24559616) failed (error code=3)
(330,0x191d400) malloc: *** error: can't allocate region
(330,0x191d400) malloc: *** set a breakpoint in szone_error to debug
(330,0x191d400) malloc: *** vm_allocate(size=32743424) failed (error code=3)
(330,0x191d400) malloc: *** error: can't allocate region
(330,0x191d400) malloc: *** set a breakpoint in szone_error to debug
(330,0x191d400) malloc: *** vm_allocate(size=32743424) failed (error code=3)
(330,0x191d400) malloc: *** error: can't allocate region
(330,0x191d400) malloc: *** set a breakpoint in szone_error to debug
I am having hard time finding what does this indicates.
Regards
Vinay
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden