Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

capture failed #3

Open
unleashed7 opened this issue Dec 22, 2024 · 3 comments
Open

capture failed #3

unleashed7 opened this issue Dec 22, 2024 · 3 comments

Comments

@unleashed7
Copy link

I randomly get "capture failed illegalstateexception already resumed but proposed with update ok" errors at every 3-4th capture. Any solution?

photo_2024-12-22_19-19-03

@unleashed7
Copy link
Author

2024-12-22 19:35:36.779 2 D/ScreenShotButton/CaptureService: showButtonAll
2024-12-22 19:35:36.784 2 D/ScreenShotButton/ActMain: showButton
2024-12-22 19:35:36.819 2 W/ScreenShotButton/CaptureServiceStill: captureStart 1
2024-12-22 19:35:36.819 2 D/ScreenShotButton/CaptureService: showButtonAll
2024-12-22 19:35:36.824 2 D/ScreenShotButton/ActMain: showButton
2024-12-22 19:35:36.825 6890 W/ScreenShotButton/CaptureServiceStill: captureJob try 1
2024-12-22 19:35:36.825 6890 D/ScreenShotButton/Capture: updateMediaProjection caller=CaptureEnv.ctor
2024-12-22 19:35:36.827 6890 D/ScreenShotButton/Capture: MediaProjection registerCallback. addr=android.media.projection.MediaProjection@1ba7d8a
2024-12-22 19:35:36.827 6890 D/ScreenShotButton/Capture: 2ms create imageReader
2024-12-22 19:35:36.835 2 D/ScreenShotButton/CaptureService: showButtonAll
2024-12-22 19:35:36.838 2 D/ScreenShotButton/ActMain: showButton
2024-12-22 19:35:36.848 6878 D/ScreenShotButton/Capture: VirtualDisplay onResumed
2024-12-22 19:35:36.876 6890 D/ScreenShotButton/Capture: 49ms virtualDisplay created. waiting onResumed…
2024-12-22 19:35:36.877 2 D/ScreenShotButton/CaptureService: showButtonAll
2024-12-22 19:35:36.877 6890 E/ScreenShotButton/CaptureServiceStill: capture failed., IllegalStateException, Already resumed, but proposed with update OK
java.lang.IllegalStateException: Already resumed, but proposed with update OK
	at kotlinx.coroutines.CancellableContinuationImpl.alreadyResumedError(CancellableContinuationImpl.kt:447)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:412)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:388)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:293)
	at jp.juggler.screenshotbutton.Capture$CaptureEnv$captureStill$$inlined$use$lambda$1.invokeSuspend(Capture.kt:766)
	at jp.juggler.screenshotbutton.Capture$CaptureEnv$captureStill$$inlined$use$lambda$1.invoke(Unknown Source:10)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturnIgnoreTimeout(Undispatched.kt:102)
	at kotlinx.coroutines.TimeoutKt.setupTimeout(Timeout.kt:148)
	at kotlinx.coroutines.TimeoutKt.withTimeoutOrNull(Timeout.kt:104)
	at jp.juggler.screenshotbutton.Capture$CaptureEnv.captureStill(Capture.kt:731)
	at jp.juggler.screenshotbutton.Capture$CaptureEnv.capture(Capture.kt:822)
	at jp.juggler.screenshotbutton.Capture.capture(Capture.kt:837)
	at jp.juggler.screenshotbutton.CaptureServiceBase$captureStart$1.invokeSuspend(CaptureServiceBase.kt:490)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
2024-12-22 19:35:36.882 2 D/ScreenShotButton/ActMain: showButton
2024-12-22 19:35:41.032 6878 D/ScreenShotButton/Capture: MediaProjection onStop. addr=android.media.projection.MediaProjection@1ba7d8a
2024-12-22 19:35:41.033 2 I/ScreenShotButton/CaptureServiceStill: onDestroy start. stopReason=StopButton
2024-12-22 19:35:41.034 2 I/ScreenShotButton/CaptureServiceStill: onDestroy: captureJob join start
2024-12-22 19:35:41.034 2 I/ScreenShotButton/CaptureServiceStill: onDestroy: captureJob join end
2024-12-22 19:35:41.034 2 D/ScreenShotButton/Capture: release. caller=service.onDestroy
2024-12-22 19:35:41.034 2 D/ScreenShotButton/Capture: MediaProjection close.
2024-12-22 19:35:41.034 2 D/ScreenShotButton/CaptureService: showButtonAll
2024-12-22 19:35:41.034 2 D/ScreenShotButton/ActMain: showButton
2024-12-22 19:35:41.035 2 I/ScreenShotButton/CaptureServiceStill: onDestroy end

@tateisu
Copy link
Owner

tateisu commented Dec 22, 2024 via email

@tateisu
Copy link
Owner

tateisu commented Dec 22, 2024 via email

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

No branches or pull requests

2 participants