Weird exception after converting to autolayout

2014-07-30 Thread Graham Cox
I'm getting this happening at certain unpredictable times - I haven't found a 
repeatable trigger for it, but it only started happening after I switched to 
autolayout. The ruler views here are in the scroller that hosts my main content 
view. I have no constraints set on this view at all, though it works normally 
most of the time other than this problem.

Since the problem seems to be with ruler marker images, note that I am 
supplying some custom images for ruler markers, but again, they seem to be 
working as expected.

Anyone come across this one before, or have any insight into what this is 
implying?

(n.b. '' is my redacted app name)

2014-07-30 19:10:58.654 [5110:303] Overflow allocating bitmap backing 
store.  Cannot back bitmap with 1152921504606846976 bytes per row, 
-9223372036854775808 height, and 1 planes.
2014-07-30 19:10:58.659 [5110:303] (
0   CoreFoundation  0x7fff832bd25c 
__exceptionPreprocess + 172
1   libobjc.A.dylib 0x7fff88af2e75 
objc_exception_throw + 43
2   CoreFoundation  0x7fff832bd10c 
+[NSException raise:format:] + 204
3   AppKit  0x7fff8532465e 
NSNewBitmapBackingStore + 134
4   AppKit  0x7fff853a976e 
+[NSCGImageSnapshotRep 
_lockFocusForCreatingSnapshot:withRect:context:hints:flipped:] + 749
5   AppKit  0x7fff854240eb -[NSImageRep 
_newCGImageForProposedRect:context:hints:flipped:] + 645
6   AppKit  0x7fff8541dc88 -[NSImageRep 
CGImageForProposedRect:context:hints:] + 99
7   AppKit  0x7fff854232c6 -[NSImageRep 
CGImageForProposedRect:context:hints:flipped:] + 346
8   AppKit  0x7fff85423df6 -[NSImage 
_newSnapshotRepForRep:rect:context:processedHints:] + 159
9   AppKit  0x7fff85423d28 -[NSImage 
_snapshotRepForRep:rect:context:processedHints:] + 195
10  AppKit  0x7fff8541cab6 
__71-[NSImage 
drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 264
11  AppKit  0x7fff853a8286 -[NSImage 
_usingBestRepresentationForRect:context:hints:body:] + 170
12  AppKit  0x7fff8541c8ac -[NSImage 
drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1447
13  AppKit  0x7fff855a0b03 -[NSImage 
_compositeFlipped:inRect:fromRect:operation:fraction:] + 254
14  AppKit  0x7fff857e939e -[NSImage 
_compositeFlipped:atPoint:fromRect:operation:fraction:] + 212
15  AppKit  0x7fff858bca09 
-[NSRulerMarker drawRect:] + 213
16  AppKit  0x7fff858c41ca 
-[NSRulerView drawMarkersInRect:] + 399
17  AppKit  0x7fff858c464e 
-[NSRulerView drawRect:] + 543
18  AppKit  0x7fff8540c04f -[NSView 
_drawRect:clip:] + 3748
19  AppKit  0x7fff8540a8c4 -[NSView 
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1799
20  AppKit  0x7fff858c59ba 
-[NSRulerView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 537
21  AppKit  0x7fff8540aca0 -[NSView 
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
22  AppKit  0x7fff8540aca0 -[NSView 
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
23  AppKit  0x7fff8540aca0 -[NSView 
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
24  AppKit  0x7fff8540aca0 -[NSView 
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
25  AppKit  0x7fff8540aca0 -[NSView 
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
26  AppKit  0x7fff85408706 -[NSView 
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
 + 841
27  AppKit  0x7fff85407eb1 
-[NSThemeFrame 
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
 + 314
28  AppKit  0x7fff85404e9f -[NSView 
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2828
29  AppKit  0x7fff853e42fa -[NSView 
displayIfNeeded] + 1680
30  AppKit  0x7fff8544974e 
_handleWindowNeedsDisplayOrLayoutOrUpdateConstraints + 884
31  AppKit  0x7fff85a1f061 

Re: Weird exception

2010-01-25 Thread Alexander Bokovikov


On 24.01.2010, at 14:08, vincent habchi wrote:


Under XCode, you select 'run with performance tool' - 'zombies'.
This will launch your app with the 'zombie instrument' attached,  
that will signal you if you app tries to message a released entity.


I'm sorry, but I don't see zombies item within Start with  
Performance Tool menu. I'm using XCode 3.1.4. Also it's not clear how  
to launch the app. Is it enough to set the target SDK to 10.4 or  
should I transfer my project into 10.4 system completely, then build  
it and run?


Thanks for your help.

___

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


Re: Weird exception

2010-01-25 Thread James Montgomerie
On 25 Jan 2010, at 10:21, Alexander Bokovikov wrote:
 On 24.01.2010, at 14:08, vincent habchi wrote:
 Under XCode, you select 'run with performance tool' - 'zombies'.
 This will launch your app with the 'zombie instrument' attached, that will 
 signal you if you app tries to message a released entity.
 
 I'm sorry, but I don't see zombies item within Start with Performance 
 Tool menu. I'm using XCode 3.1.4. Also it's not clear how to launch the app. 
 Is it enough to set the target SDK to 10.4 or should I transfer my project 
 into 10.4 system completely, then build it and run?

I think you're on a wild goose chase here - the most likely explanation to me 
is that something somewhere is deliberately calling -[NSString boolValue] (and 
it may not be 'your' code - I wouldn't put it out of the realms of possibility 
that a call to it sneaked into Sparkle), which didn't exist until 10.5.  

If this is the problem, and you want to target Tiger, the best solution would 
be to find the use of boolValue in the code base and replace it with something 
that will work on 10.4.

The category method you made on NSString is not the right solution - it almost 
certainly does less than the 10.5+ framework implementation, and it'll replace 
that method when system frameworks call it, which could cause all sorts of 
problems (this hit me in the past - the SYCK YAML parsing framework implemented 
-[NSString boolValue], and it caused problems with, of all things, the iPhone 
keyboard in iPhone OS 3.0).

Jamie.=
___

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


Re: Weird exception

2010-01-25 Thread Greg Guerin

Alexander Bokovikov wrote:


I don't know how to do it, as I have no sources for Sparkle.


http://sparkle.andymatuschak.org/

  -- GG

___

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


Re: Weird exception

2010-01-24 Thread vincent habchi
Dobre dien, privet, poka!

Le 24 janv. 2010 à 08:38, Alexander Bokovikov a écrit :

 On 24.01.2010, at 1:12, Kyle Sluder wrote:
 You should turn on zombies and run your app in the debugger on 10.4.
 
 Could you please describe it more particularly, as it's not clear for me what 
 should I do exactly. Should I transfer all my sources into 10.4 OS? Or should 
 I use Terminal to run gdb then launch my app? And how to turn zombies on?

Under XCode, you select 'run with performance tool' - 'zombies'.
This will launch your app with the 'zombie instrument' attached, that will 
signal you if you app tries to message a released entity.

 @implementation NSString (MissingMethods)
 -(BOOL) boolValue {
   return strcmp([self UTF8String], true) == 0;
 }
 @end
 
 and I don't see any exceptions now. Doesn't it mean the problem is fixed?

What you've done is like putting a band aid over a broken bone. It might cease 
bleeding, but you won't go very far anyway.

Dosvedania!
Vincent___

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


Re: Weird exception

2010-01-23 Thread Alexander Bokovikov


On 22.01.2010, at 20:50, Keary Suska wrote:

I would put my money on bindings. It shouldn't be too difficult to  
isolate the issue with the debugger.


I've created a category and set a breakpoint within this method. Call  
stack leads me to NSApplication applicationWillFinishLaunching method,  
but what can I do with it? Really, I'm using this delegate method, but  
I don't use any boolValue calls there.


Now I've written this one:

@implementation NSString (MissingMethods)

-(BOOL) boolValue {
return [self value] == @true;
}

@end

Because debugger shows just true value, when this method is called.

I have no idea how to switch between OS versions, because this  
category is useless (if not worse) in 10.5+, but it does something  
useful in 10.4. I can build release with 10.4 SDK, but it will be not  
correct, as I believe.


Any ideas?

___

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


Re: Weird exception

2010-01-23 Thread Kyle Sluder
On Fri, Jan 22, 2010 at 6:10 AM, Alexander Bokovikov
openwo...@uralweb.ru wrote:
 Browsing the console log I've found that my app raises an exception, when it
 is launched in Mac OS X 10.4. I built it in 10.5 with 10.4 as a target
 setting. I didn't see any problems there. The exception is caused by
 unsupported selector calling [NSString boolValue]. I've scanned all my
 project but couldn't find any reference to boolValue. What could cause the
 problem?

Unrecognized selector exceptions are usually caused by memory
management bugs. It looks like an NSNumber is getting overreleased
somewhere, and its memory is being taken up by an NSString. Since you
don't do any -boolValue calls yourself, Keary's thought about bindings
is probably correct.

You should turn on zombies and run your app in the debugger on 10.4.

--Kyle Sluder
___

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


Re: Weird exception

2010-01-23 Thread Alexander Bokovikov


On 24.01.2010, at 1:12, Kyle Sluder wrote:


You should turn on zombies and run your app in the debugger on 10.4.


Could you please describe it more particularly, as it's not clear for  
me what should I do exactly. Should I transfer all my sources into  
10.4 OS? Or should I use Terminal to run gdb then launch my app? And  
how to turn zombies on?


Thanks in advance.

P.S. Now I've fixed this issue as follows:

@implementation NSString (MissingMethods)
-(BOOL) boolValue {
return strcmp([self UTF8String], true) == 0;
}
@end

and I don't see any exceptions now. Doesn't it mean the problem is  
fixed?


-Alex
___

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


Weird exception

2010-01-22 Thread Alexander Bokovikov

Hi, All,

Browsing the console log I've found that my app raises an exception,  
when it is launched in Mac OS X 10.4. I built it in 10.5 with 10.4 as  
a target setting. I didn't see any problems there. The exception is  
caused by unsupported selector calling [NSString boolValue]. I've  
scanned all my project but couldn't find any reference to boolValue.  
What could cause the problem?


Visually my app is working nice in 10.4.

BTW, I'm using Sparkle framework, but AFAIK it is compatible with 10.4.

Any ideas?

-Thanks
___

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


Re: Weird exception

2010-01-22 Thread Keary Suska
On Jan 22, 2010, at 7:10 AM, Alexander Bokovikov wrote:

 Hi, All,
 
 Browsing the console log I've found that my app raises an exception, when it 
 is launched in Mac OS X 10.4. I built it in 10.5 with 10.4 as a target 
 setting. I didn't see any problems there. The exception is caused by 
 unsupported selector calling [NSString boolValue]. I've scanned all my 
 project but couldn't find any reference to boolValue. What could cause the 
 problem?

I would put my money on bindings. It shouldn't be too difficult to isolate the 
issue with the debugger.

Keary Suska
Esoteritech, Inc.
Demystifying technology for your home or business

___

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