Skip navigation.
 
mlRe: Leopard on PPC
FROM : Jean-Daniel Dupas
DATE : Thu Mar 27 17:19:14 2008

Le 27 mars 08 à 16:59, Sherm Pendley a écrit :
> On Thu, Mar 27, 2008 at 11:25 AM, Clark Cox <<email_removed>> 
> wrote:
>

>> On Wed, Mar 26, 2008 at 4:48 PM, Sherm Pendley <sherm.<email_removed>
>> >
>> wrote:

>>> On Wed, Mar 26, 2008 at 7:04 PM, Lorenzo <<email_removed>> wrote:
>>>

>>>> Hi Laurent,
>>>> I am going to debug and let you know. Right now I have found these

>> lines.

>>>> Might they cause the trouble on Leopard && PPC?
>>>>
>>>>  number = CFNumberCreate(NULL, kCFNumberFloatType,

>> &destSize.width);

>>>>  options = [NSDictionary dictionaryWithObjectsAndKeys:
>>>>          (id) kCFBooleanTrue,  (id) kCGImageSourceShouldCache,
>>>>          (id) kCFBooleanTrue,  (id)
>>>>

>> kCGImageSourceCreateThumbnailFromImageIfAbsent,

>>>>          (id) number,          (id)
>>>> kCGImageSourceThumbnailMaxPixelSize,
>>>>          NULL];
>>>>
>>>>
>>>>
>>>>  options = [NSDictionary dictionaryWithObjectsAndKeys:
>>>>          (id) kCFBooleanTrue,    (id) kCGImageSourceShouldCache,
>>>>          (id) kCFBooleanTrue,    (id)

>> kCGImageSourceShouldAllowFloat,

>>>>          NULL];

>>>
>>>
>>> I'm deeply suspicious of those typecast CFBoolRefs. Not every Core
>>> Foundation class is toll-free bridged. CFNumber is, but I don't 
>>> see any
>>> indication in the CF reference that CFBoolean is. Have you tried 
>>> using
>>> NSNumber objects instead of those kCFBooleanTrue constants?

>>
>> CFBoolean *is* toll free bridged to NSNumber.

>
>
> OK, so where is that documented then? As I said, the CFBoolean 
> reference
> says not a word about it:
>
>    <
> http://developer.apple.com/documentation/CoreFoundation/Reference/CFBooleanRef/Reference/reference.html

>>

>
> By contrast, every other toll-free bridged CF class I can think of
> explicitly documents that fact.
>
> sherm--


I don't know but that what Apple do in the samples on ADC (http://developer.apple.com/samplecode/ImageApp/listing4.html).If
  this is the cause of the crash, i think this sample should be change.

NSDictionary* options = [NSDictionary dictionaryWithObjectsAndKeys:
                    (id)kCFBooleanTrue, (id)kCGImageSourceShouldCache,
                    (id)kCFBooleanTrue, 
(id)kCGImageSourceShouldAllowFloat,
                    nil];

Related mailsAuthorDate
mlLeopard on PPC Lorenzo Mar 26, 17:51
mlRe: Leopard on PPC Laurent Cerveau Mar 26, 18:02
mlRe: Leopard on PPC Jean-Daniel Dupas Mar 26, 18:07
mlRe: Leopard on PPC Lorenzo Mar 26, 21:02
mlRe: Leopard on PPC Nick Zitzmann Mar 26, 21:17
mlRe: Leopard on PPC Laurent Cerveau Mar 26, 21:29
mlRe: Leopard on PPC Jonathan Hess Mar 26, 21:41
mlRe: Leopard on PPC Lorenzo Mar 27, 00:04
mlRe: Leopard on PPC Sherm Pendley Mar 27, 00:48
mlRe: Leopard on PPC Clark Cox Mar 27, 16:25
mlRe: Leopard on PPC Clark Cox Mar 27, 16:29
mlRe: Leopard on PPC Sherm Pendley Mar 27, 16:59
mlRe: Leopard on PPC Matt Gough Mar 27, 17:18
mlRe: Leopard on PPC Jean-Daniel Dupas Mar 27, 17:19
mlRe: Leopard on PPC glenn andreas Mar 27, 17:22
mlRe: Leopard on PPC Sherm Pendley Mar 27, 17:33
mlRe: Leopard on PPC Scott Thompson Mar 27, 21:39
mlRe: Leopard on PPC Lorenzo Apr 28, 09:31
mlRe: Leopard on PPC Nick Zitzmann Apr 28, 09:34
mlRe: Leopard on PPC Lorenzo Apr 28, 09:48
mlRe: Leopard on PPC Jean-Daniel Dupas Apr 28, 09:58
mlRe: Leopard on PPC Jean-Daniel Dupas Apr 28, 10:58
mlRe: Leopard on PPC Michael Vannorsdel Apr 28, 18:58