-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App restart while using ZXing Barcode Library #372
Comments
I got an exception or two from the java layers when using the library in places that seem unrelated, such as after scanning and navigating backwards in my application. |
I had the same issue, for me it was to do with the environment.txt settings on android i was using for the GC. I reduced the nursery-size and the soft-heap-limit settings to something more reasonable and then no zxing abort. |
Hate to bump a thread this old but I am experiencing the same issue and this is the only relevant thread/issue I have found. App appears to be resetting (on Android, I have not tested iOS) after the barcode is scanned, here is the debug log starting from when my scan button is clicked to when the app resets:
Here is my scan settings /method
This is my MainActivity.OnCreate:
I tried to look up the solution by @Roceh but not sure what that means? I found this info, and set up the GC settings as such:
Any help is appreciated |
So after some more digging and checking into what the conditions are when the app restarts I have trace it to my MainActivity's OnResume method, a condition caused an event to be re-raised that re initiated the whole app. |
Thanks for reporting this issue! Unforunately it took me way too long to respond 😭. Sorry, I apologize! Recently the source code for this project was completely refactored to modernize it. Many PR's were included in this effort, and many bugs were hopefully fixed. Please try out the latest 3.x series of NuGet packages (currently in prerelease). To try and make the project more maintainable in my spare time going forward, I've decided to close all existing issues to start with a clean slate. If you're still experiencing this issue on the newest version, please open a new issue with as much detail as possible. Thank you for your patience and understanding! Happy scanning! |
Hi,
I have problem with ZXing library, I have tried with zxing.net.mobile and zxing.net.mobile.forms but the result is the same, app restart.
I don't get any exception, and I get this with simple Scan and with ScanContinuously.
These are last few lines from output:
07-21 16:16:36.320 I/dalvikvm-heap( 1349): Grow heap (frag case) to 13.727MB for 460816-byte allocation 07-21 16:16:36.360 D/dalvikvm( 1349): GC_FOR_ALLOC freed 0K, 14% free 12922K/14855K, paused 38ms, total 38ms 07-21 16:16:36.420 D/dalvikvm( 1349): GC_FOR_ALLOC freed 900K, 20% free 12023K/14855K, paused 26ms, total 26ms 07-21 16:16:36.495 D/dalvikvm( 1349): GC_CONCURRENT freed 900K, 20% free 12024K/14855K, paused 5ms+5ms, total 63ms 07-21 16:16:36.495 D/dalvikvm( 1349): WAIT_FOR_CONCURRENT_GC blocked 32ms 07-21 16:16:36.605 D/dalvikvm( 1349): GC_CONCURRENT freed 450K, 17% free 12475K/14855K, paused 2ms+7ms, total 74ms 07-21 16:16:36.605 D/dalvikvm( 1349): WAIT_FOR_CONCURRENT_GC blocked 41ms 07-21 16:16:36.675 D/dalvikvm( 1349): GC_FOR_ALLOC freed 900K, 20% free 12025K/14855K, paused 47ms, total 47ms 07-21 16:16:36.730 D/dalvikvm( 1349): GC_FOR_ALLOC freed 452K, 19% free 12035K/14855K, paused 36ms, total 36ms 07-21 16:16:36.790 D/dalvikvm( 1349): GC_CONCURRENT freed 900K, 19% free 12036K/14855K, paused 4ms+2ms, total 28ms 07-21 16:16:36.870 D/dalvikvm( 1349): GC_CONCURRENT freed 452K, 16% free 12495K/14855K, paused 12ms+3ms, total 40ms 07-21 16:16:36.870 D/dalvikvm( 1349): WAIT_FOR_CONCURRENT_GC blocked 8ms 07-21 16:16:36.870 D/dalvikvm( 1349): WAIT_FOR_CONCURRENT_GC blocked 23ms 07-21 16:16:36.940 D/dalvikvm( 1349): GC_FOR_ALLOC freed 900K, 19% free 12046K/14855K, paused 43ms, total 43ms 07-21 16:16:37.005 D/dalvikvm( 1349): GC_CONCURRENT freed 900K, 19% free 12047K/14855K, paused 2ms+4ms, total 37ms 07-21 16:16:37.005 D/dalvikvm( 1349): WAIT_FOR_CONCURRENT_GC blocked 3ms
Any idea?
Thanks!
The text was updated successfully, but these errors were encountered: