15 Most Recent [RSS]
More...
|
UKCrashReporter 0.3
A few days ago, I released a new version 0.2 of UKCrashReporter (accompanied by a new version of UKFeedbackProvider) that updated my crash reporter that uses no patches or any other dangerous things (does no Magic as Rainer would probably say) to include more necessary system information, and offers a spot where the users can provide a message descriping what you did.
That new release had two big flaws: First and foremost, it had a tiny bug that caused it to prefer 10.4 crash logs to 10.5 crash logs, thus simply not reporting crashes if a user for some reason had both kinds of crash logs on a 10.5 installation. Second, it was missing the UKSystemInfo files.
So, here's the fixed version 0.3 of UKCrashReporter. Thanks for the kind souls who pointed these bugs out to me via Twitter and e-mail. Oh, and yes, I'm still looking into providing a CGI that people can install on their servers to use with UKCrashReporter, but work is kinda busy, preventing me from stress-testing and cleaning up the one I'm using, so don't expect anything too soon.
Tony Arnold writes: Hi Uli, have you got an example of the PHP script you use to collect the info output by your crash reporter you wouldn't mind sharing?
|
Uli Kusterer replies: ★ No time, but the basic principle (in PHP) would be
<?php
$crashlog = $_REQUEST['crashlog'];
mail( "email@example.com", "Crash Report", "\r\n\r\n".$crashlog);
?>
|
Decoder writes: Hi Uli,
I tried to integrate UKCrashReporter in a sample application over snow leopard but it is giving following errors:
1. "_kABEmailProperty", referenced from:
_kABEmailProperty$non_lazy_ptr in UKCrashReporter.o
(maybe you meant: _kABEmailProperty$non_lazy_ptr)
2. ".objc_class_name_ABAddressBook", referenced from:
literal-pointer@__OBJC@__cls_refs@ABAddressBook in UKCrashReporter.o
ld: symbol(s) not found
I followed steps as written below:
1. Included following files within my project:
UKCrashReporter.h/.m, UKCrashReporter.strings, UKNibOwner.h/.m, UKSystemInfo.h/.m.
2. Copied the window from UKCrashReporter.nib to MyProject.XIB.
3. Dropped an object cube within XIB. Set its class as UKCrashReporter.
4. Performed all bindings between window (step 2) and UKCrashReporter object (step 3).
5. In UKCrashReporter.strings file set "CRASH_REPORT_CGI_URL" as: "http://xyz.com/crashreportform.php"
6. In controller class included "UKCrashReporter.h" file and called UKCrashReporterCheckForCrash(); method within applicationDidFinishLaunching:
7. Then I compiled it with build settings: 10.5 / 10.6 but it gave errors listed above in both cases.
Can you please suggest if I am doing anything wrong ?
Thanks!
|
Uli Kusterer replies: ★ Decoder, you're missing Apple's address book framework. You have to link to that to get these symbols. The crash reporter uses the address book to find a return e-mail address for the user.
|
Decoder writes: Thanx... it is now getting properly compiled :).
However after running it I am getting following message printed at debugger console: UKCrashReporter: Couldn't find NIB file "UKCrashReporter.nib".
Also no crash reporter is invoked on its crash :(
Should I create a new XIB for UKCrashReporter and integrate it in my project in place of step 2 and 3, (written in previous comment) to make it working?
|
Uli Kusterer replies: ★ Yes, you need to use the included NIB, because UKCrashReporter tries to load that, you can't just copy the window elsewhere and expect UKCR to find it.
|
Kevin Boyce writes: Hi Uli,
I am adding UKCrashReporter to my app, and in some cases there are crash logs sitting around from earlier versions. Of course these logs trigger UKCrashReporter, which would probably confuse the user, since it didn't crash the previous time he used my app, it just got upgraded to the new version with UKCR.
To solve this problem, I added a couple lines to check whether UKCR has ever run, and if not pretend it did. I replaced
if( lastTimeCrashLogged )
with the following:
// Enter a time, but don't send a crash report, if this was the first time we've run with UKCrashReporter installed.
if( !lastCrashReportInterval )
{
[[NSUserDefaults standardUserDefaults] setDouble: [[NSDate date] timeIntervalSince1970] forKey: @"UKCrashReporterLastCrashReportDate"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
else if( lastTimeCrashLogged )
Is there any reason you can think of why this would cause any trouble?
Thanks for all your work!
-Kevin |
| |