Re: NSApp with wrong _running count

2008-05-20 Thread Andrew Farmer
On 20 May 08, at 11:10, Michael Vannorsdel wrote: When you mention running count, are you keeping an int or something to keep track of thread progress? If so remember to use atomic operations to update the count from multiple threads to prevent data corruption. As for NSAlert, a general ru

Re: NSApp with wrong _running count

2008-05-20 Thread Chris Hanson
On May 20, 2008, at 4:51 AM, Micha Fuhrmann wrote: many thanks, now, what else can I use that's thread safe for that matter? Don't structure your code such that you would be putting up an alert from a non-main thread. If you keep to strict MVC, you can design your application such that

Re: NSApp with wrong _running count

2008-05-20 Thread Michael Vannorsdel
When you mention running count, are you keeping an int or something to keep track of thread progress? If so remember to use atomic operations to update the count from multiple threads to prevent data corruption. As for NSAlert, a general rule is not to interact with the UI from any thread

Re: NSApp with wrong _running count

2008-05-20 Thread Nick Zitzmann
On May 20, 2008, at 5:51 AM, Micha Fuhrmann wrote: many thanks, now, what else can I use that's thread safe for that matter? Nick Zitzmann

RE: NSApp with wrong _running count

2008-05-20 Thread Rajendran_Pichaimurthy
: Andrew Farmer Cc: Cocoa-Dev List Subject: Re: NSApp with wrong _running count Andrew, many thanks, now, what else can I use that's thread safe for that matter? Michael On 20 mai 08, at 13:30, Andrew Farmer wrote: > On 20 May 08, at 04:07, Micha Fuhrmann wrote: >> some users are report

Re: NSApp with wrong _running count

2008-05-20 Thread Micha Fuhrmann
Andrew, many thanks, now, what else can I use that's thread safe for that matter? Michael On 20 mai 08, at 13:30, Andrew Farmer wrote: On 20 May 08, at 04:07, Micha Fuhrmann wrote: some users are reporting a crash at start. From the logs it seems that the sys is recognizing multiple runni

Re: NSApp with wrong _running count

2008-05-20 Thread Andrew Farmer
On 20 May 08, at 04:07, Micha Fuhrmann wrote: some users are reporting a crash at start. From the logs it seems that the sys is recognizing multiple running of the app, but from there I have no clue as to how to remedy. <...> Thread 3: 8 com.apple.AppKit0x93eeb2fd NSRun

NSApp with wrong _running count

2008-05-20 Thread Micha Fuhrmann
(SIGTRAP) Exception Codes: 0x0002, 0x Crashed Thread: 0 Application Specific Information: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSApp with wrong _running count' Thread 0 Crashed: 0 com.