Closed wlTrunks closed 1 year ago
Describe the bug Crash in the sdk when disable camera
To Reproduce
Expected behavior Not crashing
Device (please compete the following information):
Additional context Last Exception Backtrace: java.lang.IllegalStateException java.lang.IllegalStateException: Session has been closed; further changes are illegal. 0 android.hardware.camera2.impl.CameraCaptureSessionImpl.checkNotClosed(CameraCaptureSessionImpl.java:887) 1 android.hardware.camera2.impl.CameraCaptureSessionImpl.stopRepeating(CameraCaptureSessionImpl.java:418) 2 com.opentok.android.Camera2VideoCapturer.stopCapture(SourceFile:0) 3 com.opentok.android.Camera2VideoCapturer.onPause(SourceFile:0) 4 com.opentok.android.PublisherKit.onPause(SourceFile:0) 5 com.opentok.android.PublisherKit.update(SourceFile:0) 6 java.util.Observable.notifyObservers(Observable.java:177) 7 com.opentok.android.Session.onPause(SourceFile:0) STREAMLAYE-81-qppbHVZLOTMBpDCSyaZ-callstack.txt
Last Exception Backtrace: java.lang.IllegalStateException java.lang.IllegalStateException: Session has been closed; further changes are illegal. 0 android.hardware.camera2.impl.CameraCaptureSessionImpl.checkNotClosed(CameraCaptureSessionImpl.java:887) 1 android.hardware.camera2.impl.CameraCaptureSessionImpl.stopRepeating(CameraCaptureSessionImpl.java:418) 2 com.opentok.android.Camera2VideoCapturer.stopCapture(SourceFile:0) 3 com.opentok.android.Camera2VideoCapturer.onPause(SourceFile:0) 4 com.opentok.android.PublisherKit.onPause(SourceFile:0) 5 com.opentok.android.PublisherKit.update(SourceFile:0) 6 java.util.Observable.notifyObservers(Observable.java:177) 7 com.opentok.android.Session.onPause(SourceFile:0)
Same issue in our code. Calling the Publisher.publishVideo(...) several times and switching between true and false will quickly cause the SDK to crash.
Publisher.publishVideo(...)
true
false
Fixed on https://github.com/opentok/opentok-android-sdk-samples/pull/462
Describe the bug Crash in the sdk when disable camera
To Reproduce
Expected behavior Not crashing
Device (please compete the following information):
Additional context
Last Exception Backtrace: java.lang.IllegalStateException java.lang.IllegalStateException: Session has been closed; further changes are illegal. 0 android.hardware.camera2.impl.CameraCaptureSessionImpl.checkNotClosed(CameraCaptureSessionImpl.java:887) 1 android.hardware.camera2.impl.CameraCaptureSessionImpl.stopRepeating(CameraCaptureSessionImpl.java:418) 2 com.opentok.android.Camera2VideoCapturer.stopCapture(SourceFile:0) 3 com.opentok.android.Camera2VideoCapturer.onPause(SourceFile:0) 4 com.opentok.android.PublisherKit.onPause(SourceFile:0) 5 com.opentok.android.PublisherKit.update(SourceFile:0) 6 java.util.Observable.notifyObservers(Observable.java:177) 7 com.opentok.android.Session.onPause(SourceFile:0)
STREAMLAYE-81-qppbHVZLOTMBpDCSyaZ-callstack.txt