Re: NSTimer discarding exception 'NSInternalInconsistencyException'
Re: NSTimer discarding exception 'NSInternalInconsistencyException'
- Subject: Re: NSTimer discarding exception 'NSInternalInconsistencyException'
- From: Fabio Genoese <email@hidden>
- Date: Sun, 14 Mar 2004 10:29:04 +0100
Am 13.03.2004 um 22:44 schrieb email@hidden:
On Mar 13, 2004, at 2:06 AM, Fabio Genoese wrote:
2004-03-13 09:40:05.367 Seven[464] *** Assertion failure in
-[NSTextFieldCell _objectValue:forString:],
AppKit.subproj/NSCell.m:1130
2004-03-13 09:40:05.384 Seven[464] *** NSTimer discarding exception
'NSInternalInconsistencyException' (reason 'Invalid parameter not
satisfying: aString != nil') that raised during firing of timer with
target 351e50 and selector 'updateUI:'
The last time I saw this exception get raised, it was because the
program was passing a nil string as the second argument to an
NSRunAlertPanel() call. Anyway, you can figure it out for yourself by
running the program in the debugger and setting a symbolic breakpoint
on "-[NSException raise]" without the quotes... Then, if an exception
is raised, the debugger will stop so you can look at what happened.
Hey,
thanks for your reply. Does the symbolic breakpoint "-[NSException
raise]" work in the Java debugger, too? (It's a Cocoa Java app)
Apparently it doesn't.
Anyway, I just checked my code. There are no NSRunAlertPanels in use
(or going to be used) when the app crashes. Nor am I passing nil (null
in Java) to any Object.
What I am doing is:
a) create a new NSTimer that invokes a method named updateUI every few
milliseconds
b) create a new Thread (Java) that sends some UDP packets to a server
and waits for a reply
c) once there is a reply (or no reply -> timeout) I set flags in this
new thread
d) updateUI (which runs in the main thread) checks these flags and
updates the UI.
Not a very elegant way to update the UI but Cocoa-Java has no
performSelectorOnMainThread...
Side note: If I update the UI from the seperate (network) thread my app
doesn't crash. I just get a funny looking NSProgressIndicator
(sometimes) and a totally unreadable NSTextField (always). It looks
like this:
http://www.cashewproductions.com/q3a/7screen1.tiff
Once I move the code (no changes!) to the updateUI method which is
called by the NSTimer I get a crash.
lol? Not really...
cheers,
Fabio
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.