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

ANR when stopStream() #1524

Open
AlwaysYang opened this issue Jul 15, 2024 · 3 comments
Open

ANR when stopStream() #1524

AlwaysYang opened this issue Jul 15, 2024 · 3 comments

Comments

@AlwaysYang
Copy link

Describe the bug
ANR :
fun ExecutorService.secureSubmit(code: () -> Unit) {
try { submit { code() }.get() } catch (ignored: Exception) {}
}

To Reproduce
stopStream()

Expected behavior

Screenshots

Smartphone (please complete the following information):

  • Library version [2.4.5]
  • Device: [e.g. Pixel 6a]
  • OS: [e.g. Android13]
  • Media server [e.g. srs, version 5.0]
  • Class used [e.g. RtmpCamera1]
    1

Additional context

07-11 15:29:03.343 26007 26044 E AndroidRuntime: FATAL EXCEPTION: |ANR-WatchDog|
07-11 15:29:03.343 26007 26044 E AndroidRuntime: Process: net.whir.emp.endusertest, PID: 26007
07-11 15:29:03.343 26007 26044 E AndroidRuntime: com.github.anrwatchdog.ANRError: Application Not Responding for at least 5000 ms.
07-11 15:29:03.343 26007 26044 E AndroidRuntime: Caused by: com.github.anrwatchdog.ANRError$$$_Thread: main (state = WAITING)
07-11 15:29:03.343 26007 26044 E AndroidRuntime: 	at sun.misc.Unsafe.park(Native Method)
07-11 15:29:03.343 26007 26044 E AndroidRuntime: 	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:190)
07-11 15:29:03.343 26007 26044 E AndroidRuntime: 	at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:450)
07-11 15:29:03.343 26007 26044 E AndroidRuntime: 	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
07-11 15:29:03.343 26007 26044 E AndroidRuntime: 	at com.pedro.common.ExtensionsKt.secureSubmit(Extensions.kt:87)
07-11 15:29:03.343 26007 26044 E AndroidRuntime: 	at com.pedro.library.view.GlStreamInterface.removeMediaCodecSurface(GlStreamInterface.kt:130)
07-11 15:29:03.343 26007 26044 E AndroidRuntime: 	at com.pedro.library.base.StreamBase.stopSources(StreamBase.kt:387)
@pedroSG94
Copy link
Owner

Hello,

Can you tell me library version used? because that logcat is not related with the last version lines
Can you reproduce the error consistently?

@pedroSG94
Copy link
Owner

After check a bit others version. This seems that you are using version 2.4.5
I did a commit for this error. If you can reproduce the case, get the last commit of master branch and test if your error is solved

@AlwaysYang
Copy link
Author

After check a bit others version. This seems that you are using version 2.4.5 I did a commit for this error. If you can reproduce the case, get the last commit of master branch and test if your error is solved

Thank you. I will try to integrate the source code into the project and let users test it, which may take a little time

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