• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSImage TIFFRepresentation crashes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage TIFFRepresentation crashes


  • Subject: Re: NSImage TIFFRepresentation crashes
  • From: Mike Abdullah <email@hidden>
  • Date: Sun, 10 Mar 2013 00:55:55 +0000

Well that exception suggests you have a truly giant image on your hands. Perhaps there's enough memory to do some work with it, but not all.

The most important question: what are you actually calling -TIFFRepresentation for? In practice it's often a rather inefficient method to accomplish your end goal.

Sent from my iPad

On 9 Mar 2013, at 18:08, Markus Spoettl <email@hidden> wrote:

> 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

_______________________________________________

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

  • Follow-Ups:
    • Re: NSImage TIFFRepresentation crashes
      • From: Markus Spoettl <email@hidden>
    • Re: NSImage TIFFRepresentation crashes
      • From: Kyle Sluder <email@hidden>
References: 
 >NSImage TIFFRepresentation crashes (From: Markus Spoettl <email@hidden>)

  • Prev by Date: NSImage TIFFRepresentation crashes
  • Next by Date: Re: NSImage TIFFRepresentation crashes
  • Previous by thread: NSImage TIFFRepresentation crashes
  • Next by thread: Re: NSImage TIFFRepresentation crashes
  • Index(es):
    • Date
    • Thread