microsoft / plcrashreporter

Reliable, open-source crash reporting for iOS, macOS and tvOS
Other
2.88k stars 537 forks source link

App getting crashed on launch. #286

Closed abubakar-9013 closed 1 year ago

abubakar-9013 commented 1 year ago

Description

I am using CrashReporter.framework in my test project. I initialise it using the code provided in the documentation. I am successfully getting the crash report whenever there is a crash, but there is that one crash report that I am always getting. It is not my app crash report but I am getting it whenever there isn't any pending crash of my app.

Steps to Reporduce

Screenshot 2023-08-28 at 10 47 00 AM

I am trying crashReporter.purgePendingCrashReport() but it isnt working. My question is why it is happening and if it is somehow the default behaviour, how come i'll be able to identify if there are some crashes pending on my side of app.

DmitriyKirakosyan commented 1 year ago

Hi @abubakar-9013 , thank you for reaching out!

This crash indicates that the system is killing your app, probably due to unexpectedly long work on main thread. Does your app work well when you run it normally, without triggering a crash? Does it respond to buttons etc?

If it works well, then I expect it to be a bug of new iOS or Xcode. Can you share more info on your app and your tooling? What is your Xcode version? Is it possible for you to share a demo app with us so we can reproduce it on our end?

abubakar-9013 commented 1 year ago

Okay, so I am getting a strange issue that I havent noted before. I was just implementing CrashReporter on a test project which didn't included any UI. Just simple plain view controller in which i was producing crash on touches began function. But now, when i have added some UI elements in it, then whenever i launch my project while attaching my device, via xcode, it crashes. And when i launch my app directly from device, and not from xcode, it runs fine.

Following are my details Xcode: 14.3.1 Device: iPhone 13 Device OS: 16.0 You can clone my test project : https://github.com/abubakar-9013/PL

abubakar-9013 commented 1 year ago

Also, when initializing PLCrashReporterConfig, if i use .BSD as signalHandlerType, then app doesn't crash but it doesnt capture crash either like fatal crash as i get false in hasPendingCrashReport

abubakar-9013 commented 1 year ago

I am guessing this might be the issue:

`The Mach exception handler executes in-process, and will interfere with debuggers when they attempt to

abubakar-9013 commented 1 year ago

Closing this thread as it was not Library issue.