Re: Unhidable App
Re: Unhidable App
- Subject: Re: Unhidable App
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Wed, 3 Nov 2010 02:52:41 +0700
On 2 Nov 2010, at 11:41, Kyle Sluder wrote:
> On Nov 1, 2010, at 9:33 PM, "Gerriet M. Denkmann" <email@hidden> wrote:
>
>> 02/11/2010 09:18:20 EnTeP[149] HIToolbox: ignoring exception '-[NSConcreteNotification invalidate]: unrecognized selector sent to instance 0x113b3b160' that raised inside Carbon event dispatch
>> (
>> 0 CoreFoundation 0x00007fff86d8bcc4 __exceptionPreprocess + 180
>> 1 libobjc.A.dylib 0x00007fff815970f3 objc_exception_throw + 45
>> 2 CoreFoundation 0x00007fff86de5140 +[NSObject(NSObject) doesNotRecognizeSelector:] + 0
>> 3 CoreFoundation 0x00007fff86d5dcdf ___forwarding___ + 751
>> 4 CoreFoundation 0x00007fff86d59e28 _CF_forwarding_prep_0 + 232
>> 5 EnTeP 0x00000001000149c6 0x0 + 4295051718
>> 6 Foundation 0x00007fff8097884e _nsnote_callback + 167
>> 7 CoreFoundation 0x00007fff86d33a90 __CFXNotificationPost + 1008
>> 8 CoreFoundation 0x00007fff86d20008 _CFXNotificationPostNotification + 200
>> 9 Foundation 0x00007fff8096f7b8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 101
>> 10 AppKit 0x00007fff81c8f694 -[NSApplication _doUnhideWithoutActivation] + 1156
>
> I'm assuming EnTeP is your app.
Yes. Sorry, I should have mentioned this in my post.
> It looks like one of your notification handlers sent -invalidate to a zombie object. Because this happened in a menu item, the Menu Manager swallowed the exception.
You are absolutely right again.
I have a class ClockHandler, which registers for NSApplicationDidUnhideNotification with the selector updateClock:, which is also used by NSTimer.
Makes sense, as the clock has to be updated every second (via NSTimer) and also when the app unhides (the clock does not run when it is not visible).
But I messed up things and so I did send the invalidate message to the NSConcreteNotification when the app was unhiding.
A rather stupid mistake. Thanks very much for pointing me into the right direction.
Kind regards,
Gerriet.
_______________________________________________
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