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

dead loop? #126

Closed
cuijinfeng68 opened this issue Oct 10, 2019 · 16 comments
Closed

dead loop? #126

cuijinfeng68 opened this issue Oct 10, 2019 · 16 comments
Labels
❔question Further information is requested wontfix

Comments

@cuijinfeng68
Copy link

I/org.webrtc.Logging(28548): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4003 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(28548): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.

@cloudwebrtc
Copy link
Member

Maybe you forgot to call RTCVideoRenderer.dispose?

@cloudwebrtc cloudwebrtc added the ❔question Further information is requested label Oct 10, 2019
@ChauNTM
Copy link

ChauNTM commented Nov 29, 2019

I call RTCVideoRenderer.dispose() already, even I init new RTCVideoRender but I still haven't receive any frame, could anyone help me?

@johnnydevvcodes
Copy link

Any updates on this? I am also getting this problem.

@ycherniavskyi
Copy link
Member

Sorry, but to get any help with such a question/issue you need to be more specific. At last, you need to point the Flutter version, OS version, and maybe even device name. But to get precise help - a tiny demo project where this issue is reproduced could be provided.

@johnnydevvcodes
Copy link

johnnydevvcodes commented Jul 22, 2020

Yea thanks. I always experience the "EglRenderer: Duration: ... " as a continuous log when initiating a connection running the p2p call sample from the flutter webrtc demo.
While replicating the issue for more than once , I found out that the signaling stream listeners are the ones who were causing it. So I had to put a filter like from the code below:

FILE: signaling.dart

_signaling.onLocalStream = ((stream) async {
  if (_isCallAnswered) {
    localRenderer.srcObject = stream;
  }
});

_signaling.onAddRemoteStream = ((stream) async {
  if (_isCallAnswered){
    remoteRenderer.srcObject = stream;
  }
});

I guess I did it right .. And seems like Im getting the right log as below:

I/org.webrtc.Logging( 7773): EglRenderer: Releasing.
I/org.webrtc.Logging( 7773): GlShader: Deleting shader.
I/org.webrtc.Logging( 7773): EglRenderer: eglBase detach and release.
I/org.webrtc.Logging( 7773): EglRenderer: Releasing done.
I/org.webrtc.Logging( 7773): EglRenderer: Quitting render thread.

@PedroRTomas
Copy link

Hi there,
Have been any advances in this topic? @cloudwebrtc
Configuring and running according to the example available at https://uiflutter.com/tutorial/flutter-webrtc-plugin-for-ios-android.html
I'm still experiencing this issue.

flutter version:
Channel beta, v1.17.0-3.2.pre, on Microsoft Windows [Version 10.0.18362.1016], locale pt-PT

Note: flutter doctor doesn't present any issues. Detected when running with Android device.

@MurtuzaSrashtaSoft
Copy link

same issue facing.

@MurtuzaSrashtaSoft
Copy link

I/org.webrtc.Logging(25267): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.

@ghenry
Copy link

ghenry commented Sep 21, 2020

I'm seeing this using the on my own app which uses https://github.com/cloudwebrtc/dart-sip-ua :

I/org.webrtc.Logging(11666): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(11666): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.

then I tested with the the example app from dart-sip-ua and see a successful call ends like so:

E/BufferQueueProducer(29961): [SurfaceTexture-0-29961-0] disconnect: not connected (req=1)
W/libEGL  (29961): EGLNativeWindowType 0x724cdad010 disconnect failed
I/org.webrtc.Logging(29961): EglRenderer: Releasing done.
I/org.webrtc.Logging(29961): EglRenderer: Quitting render thread.
I/org.webrtc.Logging(29961): EglRenderer: Releasing.
I/org.webrtc.Logging(29961): EglRenderer: eglBase detach and release.
I/mali_egl(29961): eglDestroySurface() in
I/mali_winsys(29961): delete_surface() [1x1] return
I/mali_egl(29961): eglDestroySurface() out
E/BufferQueueProducer(29961): [SurfaceTexture-0-29961-1] disconnect: not connected (req=1)
W/libEGL  (29961): EGLNativeWindowType 0x71d0700010 disconnect failed
I/org.webrtc.Logging(29961): EglRenderer: Quitting render thread.
I/org.webrtc.Logging(29961): EglRenderer: Releasing done.

and I don't see anymore EglRenderer logs, so it must be my app :-)

https://github.com/flutter-webrtc/dart-sip-ua/blob/b68eb7a66dcee9e3404343695e1eac167f03e6d8/example/lib/src/callscreen.dart#L59

This may help others.

@Ayman-Kortobaa
Copy link
Contributor

Ayman-Kortobaa commented Oct 7, 2020

and I don't see anymore EglRenderer logs, so it must be my app :-)

flutter-webrtc/dart-sip-ua@b68eb7a/example/lib/src/callscreen.dart#L59

This may help others.

Thank you so much for opening my eyes, I was having a similar issue and apparently, I wasn't disposing of all renderers which caused memory leaking and sometimes app crashes.

I am gonna share the issue I had for anyone else who has it:
I had a Map<String, RTCVideoRenderer> where I added to it the renderers for each participant in the session, and I was disposing of them correctly by using:

    for (RTCVideoRenderer renderer in _remoteRenderers.values) {
		await renderer.dispose();
    }
    _remoteRenderers.clear();

when the session terminates.

But the issue is not only disposing, but creating unnecessary renderers and initializing them, this will keep them in the background causing memory leakage even if the variable is garbage collected on the Flutter side.

Don't create renderers unnecessarily, I used to create renderers and add them in both onAddStream and onAddTrack callbacks, which caused creating double renderers and only having one in memory to dispose of later.

So yeah, this is not an issue with the package but with how we use it and I suggest that it would be closed.

@ghenry
Copy link

ghenry commented Oct 7, 2020

Thanks for the follow up and knowledge share @Ayman-Kortobaa

@telinx
Copy link

telinx commented Oct 16, 2020

you may Initialized RTCVideoRenderer twice or more, but dispose one time, check you code, I faced the same problem, it is my solution.

@Bharavi26
Copy link

i am getting white screen when opponent screen is not rendering ... anyone have idea about this ?
thank you.

when opponent screen is not rendering receiving this log..

I/org.webrtc.Logging(28658): EglRenderer: Releasing. I/org.webrtc.Logging(28658): GlShader: Deleting shader. I/org.webrtc.Logging(28658): EglRenderer: eglBase detach and release. D/Surface (28658): Surface::disconnect(this=0x7f5fb5c000,api=1) I/BufferQueueProducer(28658): [SurfaceTexture-0-28658-19](this:0x7f4c5fa400,id:19,api:1,p:-1,c:28658) disconnect(P): api 1 I/BufferQueueConsumer(28658): [SurfaceTexture-0-28658-19](this:0x7f4c5fa400,id:19,api:1,p:-1,c:28658) getReleasedBuffers: returning mask 0xffffffffffffffff D/GraphicBuffer(28658): unregister, handle(0x7f491693c0) (w:540 h:960 s:544 f:0x2 u:0x000300) I/[MALI][Gralloc](28658): [-]r_hnd(0x7f491693c0), client(109), share_fd(261) D/GraphicBuffer(28658): unregister, handle(0x7f49169320) (w:540 h:960 s:544 f:0x2 u:0x000300) I/[MALI][Gralloc](28658): [-]r_hnd(0x7f49169320), client(109), share_fd(239) D/GraphicBuffer(28658): unregister, handle(0x7f461907c0) (w:360 h:640 s:368 f:0x2 u:0x000300) I/[MALI][Gralloc](28658): [-]r_hnd(0x7f461907c0), client(109), share_fd(259) D/GraphicBuffer(28658): unregister, handle(0x7f49169500) (w:360 h:640 s:368 f:0x2 u:0x000300) I/[MALI][Gralloc](28658): [-]r_hnd(0x7f49169500), client(109), share_fd(241) D/Surface (28658): Surface::disconnect(this=0x7f5fb5c000,api=1) I/BufferQueueProducer(28658): [SurfaceTexture-0-28658-19](this:0x7f4c5fa400,id:19,api:1,p:-1,c:28658) disconnect(P): api 1 I/org.webrtc.Logging(28658): EglRenderer: Quitting render thread. I/org.webrtc.Logging(28658): EglRenderer: Releasing done. I/BufferQueueConsumer(28658): [SurfaceTexture-0-28658-19](this:0x7f4c5fa400,id:19,api:1,p:-1,c:-1) disconnect(C) D/GraphicBuffer(28658): unregister, handle(0x7f49169460) (w:360 h:640 s:368 f:0x2 u:0x000300) I/[MALI][Gralloc](28658): [-]r_hnd(0x7f49169460), client(109), share_fd(264) I/org.webrtc.Logging(28658): EglRenderer: Releasing. I/org.webrtc.Logging(28658): EglRenderer: eglBase detach and release. D/Surface (28658): Surface::disconnect(this=0x7f5fb5ea00,api=1) I/BufferQueueProducer(28658): [SurfaceTexture-0-28658-20](this:0x7f4d569400,id:20,api:1,p:-1,c:28658) disconnect(P): api 1 I/BufferQueueConsumer(28658): [SurfaceTexture-0-28658-20](this:0x7f4d569400,id:20,api:1,p:-1,c:28658) getReleasedBuffers: returning mask 0xffffffffffffffff D/Surface (28658): Surface::disconnect(this=0x7f5fb5ea00,api=1) I/BufferQueueProducer(28658): [SurfaceTexture-0-28658-20](this:0x7f4d569400,id:20,api:1,p:-1,c:28658) disconnect(P): api 1 I/org.webrtc.Logging(28658): EglRenderer: Quitting render thread. I/org.webrtc.Logging(28658): EglRenderer: Releasing done. I/BufferQueueConsumer(28658): [SurfaceTexture-0-28658-20](this:0x7f4d569400,id:20,api:1,p:-1,c:-1) disconnect(C)

@benyamin218118
Copy link

check your ice servers list @cuijinfeng68
make sure you are using a valid and ok turn server if you are running on global internet.

@stale
Copy link

stale bot commented Apr 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 19, 2021
@stale stale bot closed this as completed Apr 26, 2021
@elizaan
Copy link

elizaan commented Jun 21, 2021

Maybe you forgot to call RTCVideoRenderer.dispose?

Where to call this?

evdokimovs pushed a commit to evdokimovs/flutter-webrtc that referenced this issue Jun 6, 2024
- build OpenAL in release mode
- build OpenAL as universal lib with both x64 and arm64 arches for MacOS

Co-authored-by: alexlapa <lapa.alex@ex.ua>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❔question Further information is requested wontfix
Projects
None yet
Development

No branches or pull requests