Buglife / Buglife-iOS

Awesome bug reporting for iOS apps
Apache License 2.0
509 stars 63 forks source link

App crashes after shaking. Invalid parameter not satisfying: drawn #37

Closed xuezhma closed 6 years ago

xuezhma commented 6 years ago

Using Buglife 2.8.0.

Crashed at https://github.com/Buglife/Buglife-iOS/blob/master/Source/Additions/UIApplication+LIFEAdditions.m#L101

Fatal Exception: NSInternalInconsistencyException
Invalid parameter not satisfying: drawn

There is the error trace if helpful: screen shot 2018-06-25 at 5 43 35 pm

schukin commented 6 years ago

Thanks for reporting this! So it appears that this is a crashed caused by a Buglife-iOS assertion, which only gets compiled into debug builds. In release builds, this is an error that Buglife handles gracefully, and thus will not crash.

That said... we are currently unable to reproduce this in debug builds (that assertion is specifically there to flag weird edge cases where the system screen capture APIs fail). Are you able to reproduce this consistently, and if so, how?

xuezhma commented 6 years ago

Good to know. I can't reproduce it consistently. It happened a couple times when I shake the phone after opening a fresh built app right away.

btw, when system screen capture fails, will there be a retry, or simply nothing happens?

schukin commented 6 years ago

This can happen in rare circumstances with certain types of non-UIKit views, i.e. games (Unity) / certain types of video / 3rd party maps / etc. Do you have anything like this in your app? Are you able to perhaps share a screenshot (taken with the iOS system screenshot utility), and post it either here or to our support email?

Screen capture occurs for each UIWindow in an app, and then they are merged. In rare circumstances when one window fails, the others are taken & merged into a screenshot to get submitted with a bug report. We've yet to encounter an instance of this actually happening, which is why we're particularly interested in this case :)

danhd123 commented 6 years ago

The assertion is removed in https://github.com/Buglife/Buglife-iOS/commit/9814f1bee70f776a2c3c0bb5e67db195ca3b2538 but if anyone encounters an error in stemming from that call failing, we'll be happy to work with you to try to find a root cause.