• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: disabling Apple Crash Reporter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disabling Apple Crash Reporter


  • Subject: Re: disabling Apple Crash Reporter
  • From: Jonathan Mitchell <email@hidden>
  • Date: Mon, 09 Mar 2015 23:39:34 +0000

> On 9 Mar 2015, at 20:56, Torsten Curdt <email@hidden> wrote:
>
> This seems to work!

Nice catch indeed.
I have confirmed that this works with the HockeyApp SDK (which uses PLCrashReporter).

However the user experience is rather barren.
The app simply dies.

As well as posting the report ReportCrash(8) also allows informs the user of termination and allows restart.
I know that prompting users twice for reporting is inelegant and confusing but crashing with no UI feedback at all is a bit mystifying - where did my app go! Throwing up any sort of UI in the callback will be unreliable due to the normal re-entrant code caveats - I think the Adium code does this anyway.

HockeyApp
=========

    BITCrashManagerCallbacks callbacks;
    callbacks.context = NULL;
    callbacks.handleSignal = exitCallback;
    [hockeyManager.crashManager setCrashCallbacks:&callbacks];

void exitCallback(void *context)
{
    BOOL triggerAppleCrashReporter = YES;

    if (triggerAppleCrashReporter) {
        abort();
    } else {
        // see man abort
        exit(-1);
    }
}
>
> void exitCallback(siginfo_t *info, ucontext_t *uap, void *context)
> {
>    exit(-1);
> }
>
> - (void) setupCrashReporting
> {
>    PLCrashReporter *crashReporter = [PLCrashReporter sharedReporter];
>
>    ...
>
>    PLCrashReporterCallbacks callbacks;
>    callbacks.version = 0;
>    callbacks.context = NULL;
>    callbacks.handleSignal = exitCallback;
>    [crashReporter setCrashCallbacks:&callbacks];
>
> Yay!
>

>
>
>
> On Mon, Mar 9, 2015 at 9:45 PM, Torsten Curdt <email@hidden> wrote:
>
>> I guess it might be worth opening bug reports for the crash reporters to
>>> use "exit" if they don't.
>>>
>>>
>>> Or just find the exit point to PLCrashReporter’s signal handler, add an
>>> “exit” there, and send a patch to the developers. I can’t imagine it’d be
>>> much work.
>>>
>>
>> Touché :)
>>
>> Actually it seems that PLCrashReporter already has a callback.
>> I guess one could use that to then just exit. Will try!
>>
>> cheers,
>> Torsten
>>
> _______________________________________________
>
> 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


_______________________________________________

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


  • Follow-Ups:
    • Re: disabling Apple Crash Reporter
      • From: Torsten Curdt <email@hidden>
References: 
 >disabling Apple Crash Reporter (From: Torsten Curdt <email@hidden>)
 >Re: disabling Apple Crash Reporter (From: Jonathan Mitchell <email@hidden>)
 >Re: disabling Apple Crash Reporter (From: Torsten Curdt <email@hidden>)
 >Re: disabling Apple Crash Reporter (From: Robert Monaghan <email@hidden>)
 >Re: disabling Apple Crash Reporter (From: email@hidden)
 >Re: disabling Apple Crash Reporter (From: Torsten Curdt <email@hidden>)
 >Re: disabling Apple Crash Reporter (From: Charles Srstka <email@hidden>)
 >Re: disabling Apple Crash Reporter (From: Torsten Curdt <email@hidden>)
 >Re: disabling Apple Crash Reporter (From: Torsten Curdt <email@hidden>)

  • Prev by Date: Re: All buttons lost focus ring on Yosemite
  • Next by Date: Re: disabling Apple Crash Reporter
  • Previous by thread: Re: disabling Apple Crash Reporter
  • Next by thread: Re: disabling Apple Crash Reporter
  • Index(es):
    • Date
    • Thread