Re: Suppressing Crash Reporter dialogs for a task

2009-09-23 Thread Mark Woods
Thanks Ken. The link you gave me was very helpful and the crash dialog no longer appears using the code provided. I've verified that it works on 10.5 and 10.6. Thanks to everyone who posted. Mark. On Sep 23, 2009, at 5:57 AM, Ken Thomases wrote: On Sep 22, 2009, at 2:27 PM, Alastair

Re: Suppressing Crash Reporter dialogs for a task

2009-09-23 Thread Jean-Daniel Dupas
The only way I now is to prevent the exception to be caught by the Crash Reporter. It can be done by disabling your task exception port. #include mach/mach.h task_set_exception_ports(mach_task_self(), EXC_MASK_BAD_ACCESS | EXC_MASK_CRASH, MACH_PORT_NULL, NULL, NULL) This is not something

Suppressing Crash Reporter dialogs for a task

2009-09-22 Thread Mark Woods
I have an application that launches an NSTask and checks to see if it returned successfully. The task checks the validity of certain files and in some cases, the task could definitely crash if the data is corrupt - that is the whole purpose of launching a separate task. This is not a

Re: Suppressing Crash Reporter dialogs for a task

2009-09-22 Thread Kyle Sluder
On Tue, Sep 22, 2009 at 9:47 AM, Mark Woods mwoods...@googlemail.com wrote: The task checks the validity of certain files and in some cases, the task could definitely crash if the data is corrupt - that is the whole purpose of launching a separate task. This is not a problem as the application

Re: Suppressing Crash Reporter dialogs for a task

2009-09-22 Thread Mark Woods
Easier said than done. It's QuickTime that's crashing. I'm calling canInitWithFile first and checking for errors with movieWithFile:error: but in certain instances it will still crash. On Sep 22, 2009, at 5:53 PM, Kyle Sluder wrote: On Tue, Sep 22, 2009 at 9:47 AM, Mark Woods

Re: Suppressing Crash Reporter dialogs for a task

2009-09-22 Thread Jens Alfke
On Sep 22, 2009, at 9:47 AM, Mark Woods wrote: However, when the task crashes, a Crash Reporter dialog appears which could be confusing for the user and ugly if several appear at once. Is there any way to suppress these messages and prevent them from appearing? I'm pretty sure there is,

Re: Suppressing Crash Reporter dialogs for a task

2009-09-22 Thread Alastair Houghton
On 22 Sep 2009, at 18:01, Jens Alfke wrote: On Sep 22, 2009, at 9:47 AM, Mark Woods wrote: However, when the task crashes, a Crash Reporter dialog appears which could be confusing for the user and ugly if several appear at once. Is there any way to suppress these messages and prevent them

Re: Suppressing Crash Reporter dialogs for a task

2009-09-22 Thread Ken Thomases
On Sep 22, 2009, at 2:27 PM, Alastair Houghton wrote: If you was *your* process that crashed, on normal UNIX-like systems you can use signal handlers to catch the crash and do something about it. Likewise, on a normal UNIX-like platform you'd get a SIGCHLD from the system and you could