On May 31, 2009, at 3:45 PM, Kyle Sluder wrote:

On Sun, May 31, 2009 at 3:36 PM, Seth Willits <[email protected]> wrote:
If [self title] were nil, I'd get an exception when creating the attributed string, not a crash when calling -size. There's nothing fancy going on with

Not on Leopard you don't.  You do get a warning, but not an exception.
This is the warning:

-[NSConcreteAttributedString initWithString:] called with nil string
argument. This has undefined behavior and will raise an exception in
post-Leopard linked apps. This warning is displayed only once.


Alright, well, either way I know it's not happening because it's not in the console log.




On May 31, 2009, at 3:49 PM, Joar Wingfors wrote:

If [self title] were nil, I'd get an exception when creating the attributed string, not a crash when calling -size. There's nothing fancy going on with the string. The only thing I can think of is that this drawing and call to -size is happening while the window is resizing caused by a simple call to -[NSWindow setFrame:display:animate:].

Is it at all possible that this is the result of some sort of thread unsafe operation in your app?

Only if clicking on a button is not thread-safe. :-\

That's the only way this code could be triggered.


--
Seth Willits



_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to