Hi I have a repeatable issue with pjsua crashing when I receive or make a video call. It appears to happen as soon as the call state moves to CONFIRMED (see log below). Something to do with an invalid pointer in free(). I downloaded and built the latest version of FFmpeg (ffmpeg version N-74802-gbd70303) maybe this is the problem? Here's a backtrace from the resulting core file: Program terminated with signal SIGABRT, Aborted. #0 0x00007f8b6b7b3cc9 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007f8b6b7b3cc9 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007f8b6b7b70d8 in __GI_abort () at abort.c:89 #2 0x00007f8b6b7f0394 in __libc_message (do_abort=do_abort at entry=1, fmt=fmt at entry=0x7f8b6b8feb28 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007f8b6b7fc66e in malloc_printerr (ptr=<optimized out>, str=0x7f8b6b8fac19 "free(): invalid pointer", action=1) at malloc.c:4996 #4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840 #5 0x00007f8b6bd6014c in av_freep () from /usr/lib/x86_64-linux-gnu/libavutil.so.52 #6 0x00007f8b6c51c6c3 in avcodec_get_frame_defaults () from /usr/lib/x86_64-linux-gnu/libavcodec.so.54 #7 0x0000000000479136 in ffmpeg_codec_decode_whole () #8 0x0000000000479736 in ffmpeg_codec_decode () #9 0x00000000004a199f in decode_frame () #10 0x00000000004a2046 in on_rx_rtp () #11 0x000000000049bab0 in srtp_rtp_cb () #12 0x000000000049c456 in on_rx_rtp () #13 0x0000000000519512 in ioqueue_dispatch_read_event () #14 0x000000000051ad2e in pj_ioqueue_poll () #15 0x0000000000486a58 in worker_proc () #16 0x000000000051be6a in thread_main () #17 0x00007f8b6d833182 in start_thread (arg=0x7f8b5e542700) at pthread_create.c:312 #18 0x00007f8b6b87747d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 >From here is the output from the command line app... You have 0 active call >>> vid enable 13:09:33.184 pjsua_app_lega !Video will be enabled in next offer/answer >>> 13:10:14.307 pjsua_core.c .RX 1370 bytes Request msg INVITE/cseq=102 (rdata0x7f8b50001538) from UDP 192.168.42.50:5060: INVITE sip:1000 at 192.168.42.150:5060;ob SIP/2.0 Via: SIP/2.0/UDP 192.168.42.50:5060;branch=z9hG4bK3327cd40;rport Max-Forwards: 70 From: "Bob" <sip:1001@192.168.42.50>;tag=as71e7e1ce To: <sip:1000 at 192.168.42.150:5060;ob> Contact: <sip:1001 at 192.168.42.50:5060> Call-ID: 3a31574e276f622223ac6e1d29668064 at 192.168.42.50:5060 CSeq: 102 INVITE User-Agent: FPBX-12.0.76(11.17.1) Date: Thu, 03 Sep 2015 14:53:11 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer P-Asserted-Identity: "Bob" <sip:1001 at 192.168.42.50> Content-Type: application/sdp Content-Length: 727 v=0 o=root 920379499 920379499 IN IP4 192.168.42.50 s=Asterisk PBX 11.17.1 c=IN IP4 192.168.42.50 b=CT:384 t=0 0 m=audio 11774 RTP/AVP 8 0 3 111 18 110 9 101 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:111 G726-32/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:110 speex/8000 a=rtpmap:9 G722/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv m=video 11468 RTP/AVP 99 104 98 34 a=rtpmap:99 H264/90000 a=fmtp:99 profile-level-id=42E01E;packetization-mode=1 a=rtpmap:104 MP4V-ES/90000 a=rtpmap:98 H263-1998/90000 a=fmtp:98 F=0;I=0;J=0;T=0;K=0;N=0;BPP=0;HRD=0 a=rtpmap:34 H263/90000 a=fmtp:34 F=0;I=0;J=0;T=0;K=0;N=0;BPP=0;HRD=0 a=sendrecv --end msg-- 13:10:14.308 pjsua_call.c .Incoming Request msg INVITE/cseq=102 (rdata0x7f8b50001538) 13:10:14.308 pjsua_media.c ..Call 0: initializing media.. 13:10:14.309 pjsua_media.c ...RTP socket reachable at 192.168.42.150:4000 13:10:14.309 pjsua_media.c ...RTCP socket reachable at 192.168.42.150:4001 13:10:14.309 pjsua_media.c ...RTP socket reachable at 192.168.42.150:4002 13:10:14.309 pjsua_media.c ...RTCP socket reachable at 192.168.42.150:4003 13:10:14.309 pjsua_media.c ...Media index 0 selected for audio call 0 13:10:14.310 pjsua_core.c .....TX 303 bytes Response msg 100/INVITE/cseq=102 (tdta0x7f8b5001aa70) to UDP 192.168.42.50:5060: SIP/2.0 100 Trying Via: SIP/2.0/UDP 192.168.42.50:5060;rport=5060;received=192.168.42.50;branch=z9hG4bK3327c d40 Call-ID: 3a31574e276f622223ac6e1d29668064 at 192.168.42.50:5060 From: "Bob" <sip:1001@192.168.42.50>;tag=as71e7e1ce To: <sip:1000 at 192.168.42.150;ob> CSeq: 102 INVITE Content-Length: 0 --end msg-- 13:10:14.310 pjsua_aud.c ..Conf connect: 2 --> 0 13:10:14.310 pjsua_aud.c ...Set sound device: capture=-1, playback=-2 13:10:14.310 pjsua_app.c ....Turning sound device ON 13:10:14.310 pjsua_aud.c ....Opening sound device PCM at 16000/1/20ms Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294 Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1873 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994 Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294 Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1873 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994 13:10:14.312 pjsua_app.c ....Turning sound device ON 13:10:14.312 pjsua_aud.c ....Opening sound device PCM at 44100/1/20ms 13:10:14.315 ec0x7f8b50020f .....AEC created, clock_rate=44100, channel=1, samples per frame=882, tail length=200 ms, latency=0 ms 13:10:14.370 conference.c ...Port 2 (ring) transmitting to port 0 (Ensoniq AudioPCI: ES1371 DAC2/ADC (hw:0,0) (44KHz)) 13:10:14.370 pjsua_app.c ..Incoming call for account 0! Media count: 1 audio & 1 video To reject the video, type "vid disable" first, before answering the call! From: "Bob" <sip:1001@192.168.42.50> To: <sip:1000 at 192.168.42.150;ob> Press a to answer or h to reject call 13:10:14.372 os_core_unix.c Info: possibly re-registering existing thread a Answer with code (100-699) (empty to cancel): 200 13:10:17.711 pjsua_call.c !Answering call 0: code=200 13:10:17.711 pjsua_media.c ...Call 0: updating media.. 13:10:17.711 pjsua_aud.c ....Audio channel update.. 13:10:17.711 strm0x10469d8 .....VAD temporarily disabled 13:10:17.711 strm0x10469d8 .....Encoder stream started 13:10:17.711 strm0x10469d8 .....Decoder stream started 13:10:17.711 pjsua_media.c ....Audio updated, stream #0: PCMA (sendrecv) 13:10:17.711 pjsua_vid.c ....Video channel update.. 13:10:17.749 vstenc0x104c33 .....Encoder stream started 13:10:17.749 vstdec0x104c33 .....Decoder stream started 13:10:17.749 pjsua_vid.c .....Setting up RX.. 13:10:17.749 pjsua_vid.c ......Creating video window: type=stream, cap_id=-1, rend_id=1 13:10:17.749 vid_port.c .......Opening device SDL renderer [SDL] for render: format=I420, size=656x656 @22:1 fps 13:10:17.783 vid_port.c .......Device SDL renderer [SDL] opened: format=I420, size=656x656 @22:1 fps 13:10:17.784 pjsua_vid.c .......stream window id 0 created for cap_dev=-1 rend_dev=1 13:10:17.784 pjsua_vid.c .......Window 0 created 13:10:17.784 sdl_dev.c ......Starting sdl video stream 13:10:17.784 pjsua_vid.c .....Setting up TX.. 13:10:17.784 pjsua_vid.c ......Creating video window: type=preview, cap_id=0, rend_id=1 13:10:17.784 vid_port.c .......Opening device Dummy video device (0x0000) [v4l2] for capture: format=I420, size=720x480 @15:1 fps 13:10:17.785 vid_port.c .......Device Dummy video device (0x0000) [v4l2] opened: format=I420, size=320x240 @15:1 fps 13:10:17.786 vid_port.c .......Opening device SDL renderer [SDL] for render: format=I420, size=720x480 @15:1 fps 13:10:17.798 vid_port.c .......Device SDL renderer [SDL] opened: format=I420, size=720x480 @15:1 fps 13:10:17.798 pjsua_vid.c .......preview window id 1 created for cap_dev=0 rend_dev=1 13:10:17.798 pjsua_vid.c .......Window 1 created 13:10:17.798 v4l2_dev.c ......Starting v4l2 video stream Dummy video device (0x0000) 13:10:17.799 vstenc0x104c33 .....Encoder stream paused 13:10:17.799 pjsua_media.c ....Video updated, stream #1: H264 (sendrecv) 13:10:17.799 pjsua_app.c ...Call 0 media 0 [type=audio], status is Active 13:10:17.799 pjsua_aud.c ...Conf disconnect: 2 -x- 0 13:10:17.799 conference.c ....Port 2 (ring) stop transmitting to port 0 (Ensoniq AudioPCI: ES1371 DAC2/ADC (hw:0,0) (44KHz)) 13:10:17.799 pjsua_aud.c ...Conf connect: 3 --> 0 13:10:17.799 conference.c ....Port 3 (sip:1001 at 192.168.42.50) transmitting to port 0 (Ensoniq AudioPCI: ES1371 DAC2/ADC (hw:0,0) (44KHz)) 13:10:17.799 pjsua_aud.c ...Conf connect: 0 --> 3 13:10:17.799 conference.c ....Port 0 (Ensoniq AudioPCI: ES1371 DAC2/ADC (hw:0,0) (44KHz)) transmitting to port 3 (sip:1001 at 192.168.42.50) 13:10:17.799 pjsua_app.c ...Call 0 media 1 [type=video], status is Active 13:10:17.827 pjsua_core.c ....TX 1026 bytes Response msg 200/INVITE/cseq=102 (tdta0x7f8b5001aa70) to UDP 192.168.42.50:5060: SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.42.50:5060;rport=5060;received=192.168.42.50;branch=z9hG4bK3327c d40 Call-ID: 3a31574e276f622223ac6e1d29668064 at 192.168.42.50:5060 From: "Bob" <sip:1001@192.168.42.50>;tag=as71e7e1ce To: <sip:1000 at 192.168.42.150;ob>;tag=oYlu7xs8szouXOWTfwmxIGQesSOCY7rr CSeq: 102 INVITE Contact: <sip:192.168.42.150:5060> Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Content-Type: application/sdp Content-Length: 474 v=0 o=- 3650271014 3650271015 IN IP4 192.168.42.150 s=pjmedia b=AS:352 t=0 0 a=X-nat:0 m=audio 4000 RTP/AVP 8 101 c=IN IP4 192.168.42.150 b=TIAS:64000 a=rtcp:4001 IN IP4 192.168.42.150 a=sendrecv a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 m=video 4002 RTP/AVP 99 c=IN IP4 192.168.42.150 b=TIAS:256000 a=rtcp:4003 IN IP4 192.168.42.150 a=sendrecv a=rtpmap:99 H264/90000 a=fmtp:99 profile-level-id=42e01e; packetization-mode=1 --end msg-- 13:10:17.827 pjsua_app.c .......Call 0 state changed to CONNECTING >>> 13:10:17.835 pjsua_core.c .RX 423 bytes Request msg ACK/cseq=102 (rdata0x7f8b50001538) from UDP 192.168.42.50:5060: ACK sip:192.168.42.150:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.42.50:5060;branch=z9hG4bK786a0fbd;rport Max-Forwards: 70 From: "Bob" <sip:1001@192.168.42.50>;tag=as71e7e1ce To: <sip:1000 at 192.168.42.150:5060;ob>;tag=oYlu7xs8szouXOWTfwmxIGQesSOCY7rr Contact: <sip:1001 at 192.168.42.50:5060> Call-ID: 3a31574e276f622223ac6e1d29668064 at 192.168.42.50:5060 CSeq: 102 ACK User-Agent: FPBX-12.0.76(11.17.1) Content-Length: 0 --end msg-- 13:10:17.835 pjsua_app.c ...Call 0 state changed to CONFIRMED *** Error in `./pjsua-x86_64-unknown-linux-gnu': free(): invalid pointer: 0x00007f8b500089b8 *** Aborted (core dumped) Regards Gary Metalle Embedded Software Engineer Raster Vision Ltd. Tel: 01892 722228 / +44 1892 722228. www.rastervision.co.uk <http://www.rastervision.co.uk/> Raster Vision Ltd is a company registered in England and Wales, number: 02753356. Registered office: Unit 1, Crundalls, Gedges Hill, Matfield, Kent, TN12 7EA, UK. C2- Restricted -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20150903/1bc0cd93/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 2357 bytes Desc: image001.jpg URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20150903/1bc0cd93/attachment.jpg>