remirobert / Dotzu

:iphone::eyes: In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.
MIT License
1.8k stars 141 forks source link

Crash sessions don't capture all null dereferences on device #17

Closed DanielAsher closed 7 years ago

DanielAsher commented 7 years ago

Hi,

thanks for an incredible project - a real tour de force.

I have noticed that certain crashes in my application are not caught by Dotzu when run on device. Replacing this line with:

    private func crashSigbart() {
        let a : Int? = nil
        _ = a!  
   }

produces no crash report on restart.

Would someone be able to verify this?

many thanks,

Daniel

remirobert commented 7 years ago

Thanks for reporting that. I will have a look. 👀

DanielAsher commented 7 years ago

I googled around and found SIGTRAP being used in this line to trap null dereferences on device. More info here.

I implemented on my fork here and tested on device. It works!

Let me know if you'd like a PR. dotzu crash session sigtrap

remirobert commented 7 years ago

@DanielAsher Thanks for your research. I would love a PR. 🍻

DanielAsher commented 7 years ago

see #19