On 02/06/2009, at 4:23 PM, Trygve Inda wrote:

I have a user reporting an odd crash that I can't make happen here, nor has anyone else reported this, but the report is consistent and happens only when Toast is running. It seems very deep in the OS and as far as I know, I
am not using libRIP.A.dylib.

Yes you are - RIP stands for "raster image processing", in other words, any drawing.

The only thing I can find that may be related (based on [NSWindow
displayIfNeeded] being in the report) is that my app has a single window
with a single view and I call:

NSImage*    theImage = [[[NSImage alloc]
initWithContentsOfFile:mapImagePath] autorelease];

[window orderFront:self];

You could try doing this step first, before alloc/init the image. I'm wondering if this is causing a drain of the autorelease pool.

[imageView setImage:theImage];
[imageView setNeedsDisplay:YES];

The file that this image comes from will be deleted later on, but once
initWithContentsOfFile is called, I assume it no longer needs the file,
right?

I assume the autorelease is ok since theImage will be retained by imageView.

Yes, unless it was autoreleased before that step was invoked, in which case <theImage> will be stale which could be crashing the RIP internals.

Why not just -release the image after calling setImage, rather than autoreleasing?

--Graham


_______________________________________________

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 arch...@mail-archive.com

Reply via email to