Skip to content
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

RuntimeException while switching the camera #31

Closed
sagrawal31 opened this issue Mar 11, 2020 · 5 comments
Closed

RuntimeException while switching the camera #31

sagrawal31 opened this issue Mar 11, 2020 · 5 comments

Comments

@sagrawal31
Copy link

First of all, just to mention, as of now, I'm not concerned with this issue because we have hidden the switch camera button but I just wanted to raise this issue for any future user. So you guys can decide the priority of this issue.

Basically, my camera is set to the front camera and when I'm tapping on the switch camera button, the app is crashing with the following exception:

03-11 13:37:58.399 29637 30821 E AndroidRuntime: FATAL EXCEPTION: Thread-10
03-11 13:37:58.399 29637 30821 E AndroidRuntime: Process: com.ziggeo.androidsdk.demo, PID: 29637
03-11 13:37:58.399 29637 30821 E AndroidRuntime: java.lang.RuntimeException: eglCreateWindowSurface: EGL error: 0x3003
03-11 13:37:58.399 29637 30821 E AndroidRuntime: 	at com.pedro.encoder.utils.gl.GlUtil.checkEglError(GlUtil.java:135)
03-11 13:37:58.399 29637 30821 E AndroidRuntime: 	at com.pedro.encoder.input.gl.SurfaceManager.eglSetup(SurfaceManager.java:132)
03-11 13:37:58.399 29637 30821 E AndroidRuntime: 	at com.pedro.encoder.input.gl.SurfaceManager.<init>(SurfaceManager.java:47)
03-11 13:37:58.399 29637 30821 E AndroidRuntime: 	at com.pedro.rtplibrary.view.LightOpenGlView.run(LightOpenGlView.java:46)
03-11 13:37:58.399 29637 30821 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:919)
@sagrawal31
Copy link
Author

I was getting this issue since the beginning of my Ziggeo integration (which is around 2-3 week) 😄so it's nothing that this issue popped-up in recent releases.

@3akat
Copy link
Contributor

3akat commented Mar 11, 2020

Thanks for reporting. Since it's not urgent for you I'll take a look on it later this week

@3akat
Copy link
Contributor

3akat commented Mar 16, 2020

Hi @sagrawal31, please take a look at 0.82.7

@sagrawal31
Copy link
Author

This is working fine. Thank you. I'm closing this issue.

@sagrawal31
Copy link
Author

Although, one more edge-case which you can deal in future.

The 3-second countdown (start delay) was running and it was touching countdown to 1. At this point of time, I pressed the camera switch button and it crashed with:

03-17 13:33:35.239  6112  6112 E AndroidRuntime: FATAL EXCEPTION: main
03-17 13:33:35.239  6112  6112 E AndroidRuntime: Process: com.ziggeo.androidsdk.demo, PID: 6112
03-17 13:33:35.239  6112  6112 E AndroidRuntime: java.lang.IllegalStateException
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at android.media.MediaRecorder._start(Native Method)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at android.media.MediaRecorder.start(MediaRecorder.java:1348)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at com.ziggeo.androidsdk.widgets.cameraview.Camera1.startRecording(Camera1.java:105)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at com.ziggeo.androidsdk.widgets.cameraview.CameraView.startRecording(CameraView.java:481)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at com.ziggeo.androidsdk.ui.fragments.CameraRecorderFragment.startRecording(CameraRecorderFragment.java:376)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at com.ziggeo.androidsdk.ui.fragments.BaseRecorderFragment.lambda$loadConfigs$0$BaseRecorderFragment(BaseRecorderFragment.java:52)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at com.ziggeo.androidsdk.ui.fragments.-$$Lambda$BaseRecorderFragment$VhRSI25HqTq6r_2bTkvqb6hQSx4.countdown(Unknown Source:2)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at com.ziggeo.androidsdk.recorder.CountDownHandler.start(CountDownHandler.java:24)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at com.ziggeo.androidsdk.recorder.CountDownHandler.lambda$start$0$CountDownHandler(CountDownHandler.java:29)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at com.ziggeo.androidsdk.recorder.-$$Lambda$CountDownHandler$gOW88V4_LPzxBPjp_4xr40KxRdE.run(Unknown Source:6)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:873)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:214)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7081)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
03-17 13:33:35.239  6112  6112 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
03-17 13:33:36.919  9174  9200 E AndroidRuntime: FATAL EXCEPTION: IntentService[CrashTrackingIntentService]
03-17 13:33:36.919  9174  9200 E AndroidRuntime: Process: com.ziggeo.androidsdk.demo:ziggeoCrashTracker, PID: 9174
03-17 13:33:36.919  9174  9200 E AndroidRuntime: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
03-17 13:33:36.919  9174  9200 E AndroidRuntime: 	at com.ziggeo.androidsdk.db.impl.room.RoomConverters.stringToMap(RoomConverters.java:34)
03-17 13:33:36.919  9174  9200 E AndroidRuntime: 	at com.ziggeo.androidsdk.preferences.Preferences.getExtraArgs(Preferences.java:109)
03-17 13:33:36.919  9174  9200 E AndroidRuntime: 	at com.ziggeo.androidsdk.Ziggeo.restoreState(Ziggeo.java:191)
03-17 13:33:36.919  9174  9200 E AndroidRuntime: 	at com.ziggeo.androidsdk.Ziggeo.getInstance(Ziggeo.java:138)
03-17 13:33:36.919  9174  9200 E AndroidRuntime: 	at com.ziggeo.androidsdk.crashtracking.CrashTrackingIntentService.initService(CrashTrackingIntentService.java:66)
03-17 13:33:36.919  9174  9200 E AndroidRuntime: 	at com.ziggeo.androidsdk.crashtracking.CrashTrackingIntentService.onHandleIntent(CrashTrackingIntentService.java:41)
03-17 13:33:36.919  9174  9200 E AndroidRuntime: 	at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:76)
03-17 13:33:36.919  9174  9200 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
03-17 13:33:36.919  9174  9200 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:214)
03-17 13:33:36.919  9174  9200 E AndroidRuntime: 	at android.os.HandlerThread.run(HandlerThread.java:65)

I'm sure this is an edge condition where the recording is about to start and the user switched the camera.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants