-
Notifications
You must be signed in to change notification settings - Fork 703
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
Random crash on Android - getParameters failed (empty parameters) #924
Comments
I cannot reproduce it by myself but we have exactly the same issue for a couple of users. Crash with these phones:
Stack from Crashlytics:
|
Same issue here and with same stack trace, and we are using the latest pre-release version (3.0.0 beta 5) as recommended in the original issue here. Any update on this? |
Same reason for closing and lack of any discernible fix on this issue which also seems related. A workaround has been suggested on that thread by one user, though. |
I'm getting this too. |
I also get a crash with a Samsung Galaxy Note 10+.
@breenbob I tried the workaround. It did work. Thank you. |
Hey guys, do you also get this crash with v2.4.1? |
It's not an option for us because we have to use ZXing.Net 0.16.5 as min version |
I'm running into this exception on v2.4.1. It happens when taking a photo, then navigating to a scanner page, then navigating to take another photo. The second time a photo is taken, the exception is thrown after taking a photo and clicking to confirm the picture. Rolling back to 2.3.2 seems to have done the trick. |
Confirmed here as well on v2.4.1 have not tried any workaround yet. But it appears to be related to OnAppearing and OnDisappearing events. note: ios appears to be fine. |
If 2.3.2 works and 2.4.1 doesn't, can someone bisect it please? |
Sorry to disappoint folks, but confirmed here on 2.3.2 also. I fear however that no action is to be taken unless it is reproduced within one of the 3.x beta versions. Would like to know how "beta" these beta versions are given that they have gone from 3.0.x to 3.1.x with every version in between being marked as beta. Additionally, it would appear that nobody has been replying to any issues since January which is also worrying for the future of the project. |
This occurs for me on 3.0.0 beta 5 and 3.1.0 beta*. |
On 3.1.0 beta, this crash still occurs in the field, even if IsScanning and IsAnalyzing are set false in OnAppearing. |
I also am getting this issue using the latest ZXing 3.1.0-beta2 My Xamarin.Forms 5 app was seemingly working fine previously using FreshMvvm, but I have now changed it to a shell application. It seems to me I get this error (callstack is only 1 deep and shows "external code") when the page is not even the current page (have moved to a different page via Shell.Current.GotoAsync). The problem is definitely emitted from my ZXing library as it doesn't happen if I remove my ZXIngScannerView from the page, it does not happen. Searching this project's issues here in Github, I find at least 3 references to the same error (though possibly for different reasons). It was first reported in #728 in 2018. The author @Redth closed it March 2020 asking for a new issue to be opened if it still occurs. This thread for issue #924 you are reading now was opened in July 2020, and issue 1011 was opened in August 2021. Although others have commented it still occurs in various versions of ZXing, these new reports contain no suggestions to fix, nor comments from the ZXing author. Whilst very grateful to @Redth for the library in the first place, his continued input on the library and these posts do not seem very forthcoming. Has anybody actually solved this issue themselves? Are you aware of a fork inthe library where somebody has addressed it? |
Hi @PlaysafePP , OP here, I never did find a resolution and eventually moved to an alternate library. |
Hi @RhomGit thanks for your very quick response (I expect to wait weeks/months). It would be a shame to have to move away from ZXing, but if I had to..... what alternate did you go with? Thanks in advance |
I didn't want to move away either but in a production app no choice really. If/when you decide to move to MAUI there is the new ZXing project here if you wanted to remain loyal :) https://github.com/Redth/ZXing.Net.Maui |
5 years this issue persists, and it's not acceptable for our applications to CRASHE violently in production :-( Related Issues : #728 #924 #1011 (and maybe more ? I stopped my search here...) A pull request #1002 has been kindly submitted by @rdfordatascience-ops (thanks ;-)) but has never been merged, accepted or included in a new version... So :
https://www.nuget.org/packages/Respawnsive.ZXing.Net.Mobile/ -> 1 hour, that's all what it takes to me... So I hope this will be usefull for some peoples... because the "real production world" is not focused on MAUI (not yet at least ;-)) |
@Redth Could you update the package, please? It really does need to be fixed. |
ZXing.Net.Mobile v3.0.0-beta5
Android 9.0 - API 28
Debugging on physical device via USB, Samsung Galaxy S8+ with Torch on.
I entered scan mode and reached over my desk to get something with a barcode. I looked up at my screen, app had crashed. Managed to get this output.
I can't replicate it but it might be a simple one to handle so it doesn't randomly crash peoples apps.
07-22 08:31:07.251 D/ZXing.Net.Mobile(22486): Checking Number of cameras...
07-22 08:31:07.252 D/ZXing.Net.Mobile(22486): Found 2 cameras...
07-22 08:31:07.255 D/ZXing.Net.Mobile(22486): Found Back Camera, opening...
07-22 08:31:07.258 E/Camera_APM : (22486): [APM]APM's Thread is started
07-22 08:31:07.262 E/Camera_APM : (22486): [APM] This app is forground app
07-22 08:31:08.011 D/ZXing.Net.Mobile(22486): Selected Resolution: 960x720
07-22 08:31:08.018 D/ZXing.Net.Mobile(22486): Changing Camera Orientation to: 180
07-22 08:31:08.237 D/SurfaceView(22486): show()
07-22 08:31:08.251 D/SurfaceView(22486): surfaceChanged (2094,891) 1 #5 crc6480997b3ef81bf9b2.ZXingSurfaceView{93190d5 V.E...... ......ID 0,0-2094,891 #7c}
07-22 08:31:08.296 I/OpenGLRenderer(22486): Davey! duration=1428ms; Flags=1, IntendedVsync=1487089529651695, Vsync=1487089579651693, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=1487089583023162, AnimationStart=1487089583161316, PerformTraversalsStart=1487089583163047, DrawStart=1487090932708354, SyncQueued=1487090936351238, SyncStart=1487090936453738, IssueDrawCommandsStart=1487090940576123, SwapBuffers=1487090957041546, FrameCompleted=1487090958181854, DequeueBufferDuration=10016000, QueueBufferDuration=508000,
07-22 08:31:08.299 D/ViewRootImpl@dffda6mainactivity: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 2220, 1080) ci=Rect(126, 63 - 0, 0) vi=Rect(126, 63 - 0, 0) or=2
07-22 08:31:08.301 D/ViewRootImpl@dffda6mainactivity: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 2220, 1080) ci=Rect(126, 63 - 0, 0) vi=Rect(126, 63 - 0, 0) or=2
07-22 08:31:08.302 I/Choreographer(22486): Skipped 76 frames! The application may be doing too much work on its main thread.
Java.Lang.RuntimeException: getParameters failed (empty parameters)
at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0006e] in :0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in :0
at Android.Hardware.Camera.GetParameters () [0x0000a] in :0
at ZXing.Mobile.CameraAccess.CameraAnalyzer.DecodeFrame (ApxLabs.FastAndroidCamera.FastJavaByteArray fastArray) [0x00000] in D:\a\ZXing.Net.Mobile\ZXing.Net.Mobile\ZXing.Net.Mobile\Android\CameraAccess\CameraAnalyzer.android.cs:111
at ZXing.Mobile.CameraAccess.CameraAnalyzer+<>c__DisplayClass24_0.b__0 () [0x00000] in D:\a\ZXing.Net.Mobile\ZXing.Net.Mobile\ZX
ing.Net.Mobile\Android\CameraAccess\CameraAnalyzer.android.cs:96
--- End of managed Java.Lang.RuntimeException stack trace ---
java.lang.RuntimeException: getParameters failed (empty parameters)
at android.hardware.Camera.native_getParameters(Native Method)
at android.hardware.Camera.getParameters(Camera.java:2133)
The text was updated successfully, but these errors were encountered: