NSImage TIFFRepresentation crashes
NSImage TIFFRepresentation crashes
- Subject: NSImage TIFFRepresentation crashes
- From: Markus Spoettl <email@hidden>
- Date: Sat, 09 Mar 2013 19:08:48 +0100
Hello,
I have a user who reports a crash in NSImage's -TIFFRepresentation, the
backtrace from -TIFFRepresentation is below. Apparently the image dimensions are
wrong.
I don't have the image itself but since my app displays and serializes the image
without problem (according to the user), I have no reason to believe that it's
corrupt.
Is there any legal way that TIFFRepresentation can crash? If so, is there any
way to detect that?
Regards
Markus
Application Specific Information:
*** Terminating app due to uncaught exception 'NSBadBitmapParametersException',
reason: 'Overflow allocating bitmap backing store. Cannot back bitmap with
10737418240 bytes per row, 1786807033 height, and 1 planes.'
abort() called
terminate called throwing an exception
0 CoreFoundation 0x00007fff8d3470a6 __exceptionPreprocess
+ 198
1 libobjc.A.dylib 0x00007fff8ee103f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8d346e7c +[NSException
raise:format:] + 204
3 AppKit 0x00007fff93877cdf
NSNewBitmapBackingStore + 134
4 AppKit 0x00007fff939c5b31
+[NSCGImageSnapshotRep
_lockFocusForCreatingSnapshot:withRect:context:hints:flipped:] + 821
5 AppKit 0x00007fff93a8747e -[NSImageRep
_newCGImageForProposedRect:context:hints:flipped:] + 641
6 AppKit 0x00007fff93916acb -[NSImageRep
CGImageForProposedRect:context:hints:] + 99
7 AppKit 0x00007fff939d5653
-[NSCGImageSnapshotRep _snapshotRep_CGImageForProposedRect:context:hints:] + 544
8 AppKit 0x00007fff939d5405
-[NSCGImageSnapshotRep CGImageForProposedRect:context:hints:] + 17
9 AppKit 0x00007fff93c884d3 -[NSImageRep
_withHints:performBlockUsingBitmapForTIFFRepresentation:] + 83
10 AppKit 0x00007fff93f88896
-[NSCGImageSnapshotRep _withHints:performBlockUsingBitmapForTIFFRepresentation:]
+ 90
11 AppKit 0x00007fff93c83fe0 __block_global_1 + 179
12 AppKit 0x00007fff93c8054b -[NSImage
_usingBestRepresentationAmongRepresentations:forRect:context:hints:body:] + 178
13 AppKit 0x00007fff93c83f02 __53-[NSImage
TIFFRepresentationUsingCompression:factor:]_block_invoke_0 + 344
14 AppKit 0x00007fff9386367f -[NSImage
_usingRepProviderPerformBlock:] + 41
15 AppKit 0x00007fff93863641 -[NSImage
_usingRepresentationsPerformBlock:] + 91
16 AppKit 0x00007fff93c83cfb -[NSImage
TIFFRepresentationUsingCompression:factor:] + 400
1
17 MyApp 0x000000010e4e15fb [NSImage
TIFFRepresentation]
--
__________________________________________
Markus Spoettl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden