bitstadium / HockeySDK-iOS

HockeyApp was retired and the SDKs are deprecated. Please use App Center instead.
https://github.com/microsoft/appcenter-sdk-apple
Other
597 stars 268 forks source link

Question: Does HockeyApp log Swift's `fatalError` messages? #502

Closed allen-zeng closed 4 years ago

allen-zeng commented 6 years ago

When calling fatalError("a crash message") in Swift, would HockeyApp's crash report catch the content of the string and display it somewhere?

If it does, is it a new addition? What version was it added in?

Thanks!

ElektrojungeAtWork commented 6 years ago

Hey @allen-zeng,

thx for getting in touch.

fatalError("string") will be reported by HockeyApp but it won't show up with the error string but will be reported as aSIGTRAP`.

Best, Benjamin

PS: I've created an item in our backlog to track this, I can't give any ETA though as this requires work in the underlying crash reporting tool.

dive commented 6 years ago

@TroubleMakerBen, hey. Can you tell us a bit more about fatalError handling in HockeyApp? Because at the moment we suspect that HockeyApp SDK treats fatalError as heuristic SIGKILL's.

achocron commented 6 years ago

@dive It looks like the fatalError is being reported as a SIGTRAP without the string, as you pointed out. I've done a little reading and I think that, as @TroubleMakerBen mentioned, we would need to do some more research on the subject (the original work item never ended up making it to the top of our backlog in January).

A little information:

I hope this helps a bit!

dive commented 6 years ago

Hey, @achocron! Yeah, it helps. We will try to investigate as well. I'll keep you posted here about the result, but right now it looks like a very annoying issue to us. We (everyone?) use fatalError() a lot in the current era of Swift and it's very important to distinguish between SIGKILL (+ SIG_friends) and errors that were triggered by a reason and by the app itself.