zdavatz / AmiKo-iOS

AmiKo Desitin für iPhone und iPad
https://apps.apple.com/ch/app/amiko-desitin/id687642725
GNU General Public License v3.0
1 stars 2 forks source link

App Crashes on iPad/iPhone when canceling the empty scanning. #78

Closed zdavatz closed 6 years ago

zdavatz commented 6 years ago

App Crashes on iPad when doing the followin:

  1. Start App in Portrait Mode
  2. Goto Prescriptions
  3. Longtap on Medicines Table header
  4. Wait for Scanner
  5. Hit Cancel
  6. Now the App hangs and my crash, see: https://gist.github.com/zdavatz/d09e05d1d52c4bce098ae390624818bd
bettar commented 6 years ago

Unfortunately I cannot reproduce this. The attached message log is not very useful. There are a lot of irrelevant messages. After filtering them out and retaining only those containing AmiKoDesitin (with a trailing Tab) we see that after the call to cancelCamera: there is nothing useful, and 35 seconds later, a message XPC connection interrupted. Maybe a more informative log could be captured by launching the app from Xcode, possibly compiling the DEBUG version.

zdavatz commented 6 years ago

ok, will send you the log.

zdavatz commented 6 years ago

This is where it hangs when iPhoneX is connected:

2018-07-26 13:52:45.534960+0300 AmiKoDesitin[16114:7664217] -[MLViewController switchTabBarItem:] item.tag:3
2018-07-26 13:52:45.535016+0300 AmiKoDesitin[16114:7664217] TabBar - Prescription
2018-07-26 13:52:45.582809+0300 AmiKoDesitin[16114:7664217] -[PrescriptionViewController loadDefaultPrescription]
2018-07-26 13:52:45.582888+0300 AmiKoDesitin[16114:7664217] -[PrescriptionViewController loadDefaultPrescription] Default prescription not yet defined
2018-07-26 13:52:45.582900+0300 AmiKoDesitin[16114:7664217] -[PrescriptionViewController loadDefaultDoctor]
2018-07-26 13:52:45.625922+0300 AmiKoDesitin[16114:7664217] Patient DB found in user's documents folder /var/mobile/Containers/Data/Application/8305E6A2-F3C6-4CE7-B8E9-EDEBA6B726FA/Documents/patient_db.db
2018-07-26 13:52:45.625969+0300 AmiKoDesitin[16114:7664217] /var/mobile/Containers/Data/Application/8305E6A2-F3C6-4CE7-B8E9-EDEBA6B726FA/Documents/patient_db.db
2018-07-26 13:52:47.176787+0300 AmiKoDesitin[16114:7664217] -[videoViewController shouldAutorotate]
2018-07-26 13:52:51.659830+0300 AmiKoDesitin[16114:7664217] -[videoViewController cancelCamera:]
2018-07-26 13:52:51.671338+0300 AmiKoDesitin[16114:7664217] -[PrescriptionViewController loadDefaultPrescription]
2018-07-26 13:52:51.671376+0300 AmiKoDesitin[16114:7664217] -[PrescriptionViewController loadDefaultPrescription] Default prescription not yet defined
2018-07-26 13:52:51.671385+0300 AmiKoDesitin[16114:7664217] -[PrescriptionViewController loadDefaultDoctor]
2018-07-26 13:52:51.707306+0300 AmiKoDesitin[16114:7664217] Patient DB found in user's documents folder /var/mobile/Containers/Data/Application/8305E6A2-F3C6-4CE7-B8E9-EDEBA6B726FA/Documents/patient_db.db
2018-07-26 13:52:51.707364+0300 AmiKoDesitin[16114:7664217] /var/mobile/Containers/Data/Application/8305E6A2-F3C6-4CE7-B8E9-EDEBA6B726FA/Documents/patient_db.db
bettar commented 6 years ago

The title says the issue is with an iPad, but the log above is for when an iPhoneX is connected. Still, there is nothing unusual in that log. There is no indication that it crashes, no exception or error message.

zdavatz commented 6 years ago

Ok, I will test with 2.9.32. Actually it does not crash anymore, it just hangs for some time and then continues to work normally.

bettar commented 6 years ago

On my iPhone 8 it doesn't hang.

zdavatz commented 6 years ago

On iPhone X after hitting the Cancel Button, the CPU stays at over 90% and the memory just keeps growing. Looks like you have to release something differently for iPhone X.

https://ywesee.slack.com/files/U27FC8WLA/FBYTBL686/cpu_memory_grows_after_clicking_cancel.mov

Exactly the same happens on iPad as well.

zdavatz commented 6 years ago

there is no more crash. Just a hang now.

bettar commented 6 years ago

I cannot reproduce it because I don't have the physical devices. On the simulator (iPad Air) the CPU stays at 0% after hitting Cancel.