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

../src/pjsua2/media.cpp:1523: void pj::VideoPreview::updateDevId(): assertion "w->type == PJSUA_WND_TYPE_PREVIEW" failed #4232

Open
kazimdsaidul opened this issue Dec 24, 2024 · 1 comment

Comments

@kazimdsaidul
Copy link

Describe the bug

../src/pjsua2/media.cpp:1523: void pj::VideoPreview::updateDevId(): assertion "w->type == PJSUA_WND_TYPE_PREVIEW" failed

Steps to reproduce

hangupCall multiple video call but audio call no problem

PJSIP version

2.13

Context

hangupCall multiple video call but audio call no problem

Log, call stack, etc

2024-12-24 15:54:57.436 23614-23771 hw-BpHwBinder           com.nex.sip.debug                    I  onLastStrongRef automatically unlinking death recipients
2024-12-24 15:54:57.438 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.437             vid_conf.c  Port 3 (Front camera) stop transmitting to port 7 (vstenc0xb4000072089bd298)
2024-12-24 15:54:57.438 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.438             vid_conf.c  Removed port 3 (Front camera)
2024-12-24 15:54:57.521 23614-23614 PjCamera2               com.nex.sip.debug                    D  Wait thread..
2024-12-24 15:54:57.521 23614-23777 PjCamera2               com.nex.sip.debug                    I  CameraDevice.StateCallback.onClosed
2024-12-24 15:54:57.521 23614-23614 PjCamera2               com.nex.sip.debug                    D  Wait thread done
2024-12-24 15:54:57.521 23614-23614 PjCamera2               com.nex.sip.debug                    D  Stopped.
2024-12-24 15:54:57.521 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.521             vid_port.c !.....Destroy request on Front camera..
2024-12-24 15:54:57.521 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.521             vid_port.c  .....Destroying Front camera..
2024-12-24 15:54:57.521 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.521          android_dev.c  .....Android camera stream destroyed
2024-12-24 15:54:57.521 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.521             vid_conf.c  .....Video port 4 remove queued
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522     android_opengl.cpp  .....Stopping Android opengl stream
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522             vid_port.c  .....Destroy request on OpenGL renderer..
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522            pjsua_vid.c  ....Call 1 media 1: Preview video window released
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522            pjsua_vid.c  ....Window 2: destroying..
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522             vid_conf.c  .....Video port 5 remove queued
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522     android_opengl.cpp  .....Stopping Android opengl stream
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522             vid_port.c  .....Destroy request on OpenGL renderer..
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522            pjsua_vid.c  ....Call 1 media 1: Stream video window released
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522             vid_conf.c  ....Video port 7 remove queued
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522             vid_conf.c  ....Video port 6 remove queued
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522           vid_stream.c  ....Destroy request on vstrm0xb4000072089bd298..
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522          pjsua_media.c  ...Media stream call01:1 is destroyed
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522                icetp00  ..Stopping ICE, reason=media stop requested
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522 srtp0xb4000072f8a6bea0  ..Destroying SRTP transport
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522                icetp00  ..Destroying ICE transport
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522          ice_session.c  ..ICE session 0xb40000724898e828 destroyed
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522                icetp00  ..ICE stream transport 0xb4000071c94964d8 destroyed
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522                icetp00  ..ICE transport destroyed
2024-12-24 15:54:57.522 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.522 srtp0xb4000072f8a6bea0  ..SRTP transport destroyed
2024-12-24 15:54:57.523 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.523 strm0xb400007298ae4058  ..Stream destroyed
2024-12-24 15:54:57.523 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.523                icetp01  ..Stopping ICE, reason=media stop requested
2024-12-24 15:54:57.523 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.523 srtp0xb4000072f8a67550  ..Destroying SRTP transport
2024-12-24 15:54:57.523 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.523                icetp01  ..Destroying ICE transport
2024-12-24 15:54:57.523 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.523          ice_session.c  ..ICE session 0xb4000072489915b8 destroyed
2024-12-24 15:54:57.523 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.523                icetp01  ..ICE stream transport 0xb4000071c94954c8 destroyed
2024-12-24 15:54:57.523 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.523                icetp01  ..ICE transport destroyed
2024-12-24 15:54:57.523 23614-23614 System.out              com.nex.sip.debug                    I  15:54:57.523 srtp0xb4000072f8a67550  ..SRTP transport destroyed
2024-12-24 15:54:57.523 23614-23614 libc                    com.nex.sip.debug                    A  ../src/pjsua2/media.cpp:1523: void pj::VideoPreview::updateDevId(): assertion "w->type == PJSUA_WND_TYPE_PREVIEW" failed
2024-12-24 15:54:57.524 23614-23614 libc                    com.nex.sip.debug                    A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 23614 (m.nex.sip.debug), pid 23614 (m.nex.sip.debug)
2024-12-24 15:54:57.538 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.537             vid_conf.c !Removed port 4 (OpenGL renderer)
2024-12-24 15:54:57.538 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.538             vid_port.c  Destroying OpenGL renderer..
2024-12-24 15:54:57.539 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.538     android_opengl.cpp  Stopping Android opengl stream
2024-12-24 15:54:57.548 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.548             vid_conf.c  Port 6 (vstdec0xb4000072089bd298) stop transmitting to port 5 (OpenGL renderer)
2024-12-24 15:54:57.548 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.548             vid_conf.c  Removed port 5 (OpenGL renderer)
2024-12-24 15:54:57.548 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.548             vid_port.c  Destroying OpenGL renderer..
2024-12-24 15:54:57.548 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.548     android_opengl.cpp  Stopping Android opengl stream
2024-12-24 15:54:57.587 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.566             vid_conf.c  Removed port 7 (vstenc0xb4000072089bd298)
2024-12-24 15:54:57.588 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.588             vid_conf.c  Removed port 6 (vstdec0xb4000072089bd298)
2024-12-24 15:54:57.589 23614-23775 System.out              com.nex.sip.debug                    I  15:54:57.589           vid_stream.c  Destroying vstrm0xb4000072089bd298..
2024-12-24 15:54:57.589 23614-24065 CCodecBufferChannel     com.nex.sip.debug                    D  [c2.android.avc.encoder#770] MediaCodec discarded an unknown buffer
2024-12-24 15:54:57.590 23614-24065 CCodecBufferChannel     com.nex.sip.debug                    D  [c2.android.avc.encoder#770] MediaCodec discarded an unknown buffer
2024-12-24 15:54:57.590 23614-24065 CCodecBufferChannel     com.nex.sip.debug                    D  [c2.android.avc.encoder#770] MediaCodec discarded an unknown buffer
2024-12-24 15:54:57.590 23614-24065 CCodecBufferChannel     com.nex.sip.debug                    D  [c2.android.avc.encoder#770] MediaCodec discarded an unknown buffer
2024-12-24 15:54:57.590 23614-24065 CCodecBufferChannel     com.nex.sip.debug                    D  [c2.android.avc.encoder#770] MediaCodec discarded an unknown buffer
2024-12-24 15:54:57.590 23614-24065 CCodecBufferChannel     com.nex.sip.debug                    D  [c2.android.avc.encoder#770] MediaCodec discarded an unknown buffer
@sauwming
Copy link
Member

First of all, try with the latest version 2.15.1.

Next, get a stack trace when the assertion occurred. From the log, it seems that the preview window has been released.

pjsua_vid.c ....Call 1 media 1: Preview video window released
2024-12-24 15:54:57.522 23614-23614 System.out com.nex.sip.debug I 15:54:57.522 pjsua_vid.c ....Window 2: destroying..

So the stack trace still determine who caused VideoPreview::updateDevId() to be invoked. If it's application then it's likely app's bug, otherwise it could be library's bug.

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