Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage save error



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.