--- crash 1 (single client disconnection) ---

On the client:

$ gst-launch-0.10 rtspsrc protocols=4 location=rtsp://127.0.0.1:8554/test ! decodebin2 ! alsasink &
[..]
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 10764155656 ns.
[..]
$



$ gdb --args .libs/test-launch  "( audiotestsrc ! lame ! mpegaudioparse ! rtpgstpay name=pay0 pt=96 )"
[..]
stream ready at rtsp://127.0.0.1:8554/test
[New Thread 0xb7470b40 (LWP 24956)]
[New Thread 0xb6affb40 (LWP 24957)]
[New Thread 0xb60ffb40 (LWP 24958)]
[New Thread 0xb56ffb40 (LWP 24959)]
[New Thread 0xb4cffb40 (LWP 24960)]
[New Thread 0xb42ffb40 (LWP 24961)]
[New Thread 0xb38ffb40 (LWP 24963)]
kill client 0x8227428 now ..	sending data to watch 0x8227428->0x8227c00 (0)..done
kill client 0x8227428 now ..	sending data to watch 0x8227428->0x8227c00 (0)..done
kill client 0x8227428 now ..	sending data to watch 0x8227428->0x8227c00 (0)..
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb56ffb40 (LWP 24959)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0xb7d7195c in handle_new_buffer (sink=0x825a038, user_data=0x8246238) at rtsp-media.c:1244
#2  0xb79a458b in gst_app_sink_render_common (psink=0x825a038, data=0xb4d03528, is_list=0) at gstappsink.c:793
#3  0xb7922639 in gst_base_sink_render_object (basesink=basesink@entry=0x825a038, obj_type=obj_type@entry=2 '\002', 
    obj=obj@entry=0xb4d03528, pad=0x8252198) at gstbasesink.c:3014
#4  0xb792650b in gst_base_sink_queue_object_unlocked (basesink=basesink@entry=0x825a038, obj_type=obj_type@entry=2 '\002', 
    obj=obj@entry=0xb4d03528, prerollable=prerollable@entry=1, pad=0x8252198) at gstbasesink.c:3295
#5  0xb7926b90 in gst_base_sink_chain_unlocked (basesink=basesink@entry=0x825a038, obj_type=obj_type@entry=2 '\002', 
    obj=obj@entry=0xb4d03528, pad=0x8252198) at gstbasesink.c:3677
#6  0xb7926fee in gst_base_sink_chain_main (basesink=0x825a038, pad=0x8252198, obj_type=2 '\002', obj=0xb4d03528) at gstbasesink.c:3715
#7  0xb7f320c8 in gst_pad_push (pad=pad@entry=0x82654b8, buffer=0xb4d03528) at gstpad.c:4710
#8  0xb62e8223 in gst_tee_do_push (is_list=0, data=0xb4d03528, pad=0x82654b8, tee=0x8269848) at gsttee.c:675
#9  gst_tee_handle_data (tee=tee@entry=0x8269848, data=data@entry=0xb4d03528, is_list=is_list@entry=0) at gsttee.c:754
#10 0xb62e87d9 in gst_tee_chain (pad=0x8265328, buffer=0xb4d03528) at gsttee.c:828
#11 0xb7f320c8 in gst_pad_push (pad=0x82492a0, buffer=buffer@entry=0xb4d03528) at gstpad.c:4710
#12 0xb7f1b774 in gst_proxy_pad_chain_default (pad=0x8245aa0, buffer=0xb4d03528) at gstghostpad.c:261
#13 0xb7f320c8 in gst_pad_push (pad=pad@entry=0x8252648, buffer=buffer@entry=0xb4d03528) at gstpad.c:4710
#14 0xb6c5cbdf in gst_rtp_session_send_rtp (sess=0x825e030, src=0x8262078, data=0xb4d03528, user_data=0x8242248)
    at gstrtpsession.c:1079
#15 0xb6c4d4f0 in source_push_rtp (source=0x8262078, data=0xb4d03528, session=0x825e030) at rtpsession.c:1216
#16 0xb6c59181 in rtp_source_send_rtp (src=src@entry=0x8262078, data=data@entry=0xb4d03528, is_list=is_list@entry=0, 
    running_time=52244897) at rtpsource.c:1288
#17 0xb6c540f1 in rtp_session_send_rtp (sess=0x825e030, data=data@entry=0xb4d03528, is_list=is_list@entry=0, 
    current_time=10351100324015, running_time=52244897) at rtpsession.c:2512
#18 0xb6c5f656 in gst_rtp_session_chain_send_rtp_common (pad=<optimised out>, data=0xb4d03528, is_list=0) at gstrtpsession.c:1847
#19 0xb7f320c8 in gst_pad_push (pad=0x82459d0, buffer=buffer@entry=0xb4d03528) at gstpad.c:4710
#20 0xb7f1b774 in gst_proxy_pad_chain_default (pad=0x82491c0, buffer=0xb4d03528) at gstghostpad.c:261
#21 0xb7f320c8 in gst_pad_push (pad=0x8249000, buffer=buffer@entry=0xb4d03528) at gstpad.c:4710
#22 0xb7f1b774 in gst_proxy_pad_chain_default (pad=0x8245900, buffer=0xb4d03528) at gstghostpad.c:261
#23 0xb7f320c8 in gst_pad_push (pad=0x8232bf0, buffer=buffer@entry=0xb4d03528) at gstpad.c:4710
#24 0xb747ffa8 in gst_basertppayload_push (payload=payload@entry=0x82420c8, buffer=0xb4d03528) at gstbasertppayload.c:904
#25 0xb74b1d76 in gst_rtp_gst_pay_handle_buffer (basepayload=0x82420c8, buffer=0xb4d03060) at gstrtpgstpay.c:212
#26 0xb747e1e5 in gst_basertppayload_chain (pad=0x8232cb8, buffer=0xb4d03060) at gstbasertppayload.c:458
#27 0xb7f320c8 in gst_pad_push (pad=0x8232b28, buffer=buffer@entry=0xb4d03060) at gstpad.c:4710
#28 0xb7910d87 in gst_base_parse_push_frame (parse=parse@entry=0x823b2e0, frame=frame@entry=0x823b86c) at gstbaseparse.c:1988
#29 0xb7912487 in gst_base_parse_handle_and_push_frame (parse=parse@entry=0x823b2e0, frame=frame@entry=0x823b86c, klass=0x8237b70)
    at gstbaseparse.c:1765
#30 0xb791379c in gst_base_parse_chain (pad=0x8232a60, buffer=0xb4d03060) at gstbaseparse.c:2487
#31 0xb7f320c8 in gst_pad_push (pad=0x8232998, buffer=0xb4d03060) at gstpad.c:4710
#32 0xb7642dea in gst_audio_encoder_finish_frame (enc=0x8238070, buf=0xb4d03060, samples=1152) at gstaudioencoder.c:678
#33 0xb76e7e42 in ?? () from /usr/lib/i386-linux-gnu/gstreamer-0.10/libgstlame.so
#34 0xb7643d75 in gst_audio_encoder_push_buffers (enc=enc@entry=0x8238070, force=force@entry=0) at gstaudioencoder.c:789
#35 0xb76456da in gst_audio_encoder_chain (pad=0x82328d0, buffer=0xb4d032a0) at gstaudioencoder.c:991
#36 0xb7f320c8 in gst_pad_push (pad=pad@entry=0x8232808, buffer=0xb4d032a0) at gstpad.c:4710
#37 0xb792dfdb in gst_base_src_loop (pad=0x8232808) at gstbasesrc.c:2559
#38 0xb7f5be10 in gst_task_func (task=task@entry=0x824ead8) at gsttask.c:327
#39 0xb7f5cfb8 in default_func (tdata=0x8199730, pool=0x805b808) at gsttaskpool.c:70
#40 0xb7df8ce8 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#41 0xb7df8303 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#42 0xb7d53d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#43 0xb7c91d3e in clone () from /lib/i386-linux-gnu/libc.so.6
(gdb) f 1
#1  0xb7d7195c in handle_new_buffer (sink=0x825a038, user_data=0x8246238) at rtsp-media.c:1244
1244	        tr->send_rtp (buffer, tr->transport->interleaved.min, tr->user_data);
(gdb) l
1239	      if (tr->send_rtp)
1240	      {
1241	    	fprintf(stderr, "kill client %p now ..", client);
1242	    	sleep(5);
1243	    	fprintf(stderr, "\tsending data to watch %p->%p (%d)..", client, client->watch, i++);
1244	        tr->send_rtp (buffer, tr->transport->interleaved.min, tr->user_data);
1245	        fprintf(stderr, "done\n");
1246	      }
1247	    } else {
1248	      if (tr->send_rtcp)
(gdb) p *((GstRTSPMediaTrans*) walk->data)
$1 = {idx = 135786592, send_rtp = 0x0, send_rtcp = 0x0, send_rtp_list = 0x0, send_rtcp_list = 0x817dd80, user_data = 0x0, 
  notify = 0x1, keep_alive = 0x0, ka_user_data = 0x826c0b0, ka_notify = 0x0, active = 0, timeout = 0, transport = 0x817ddb0, 
  rtpsource = 0x0}





--- crash 2 (second client disconnects) ---

On the client:

~$ gst-launch-0.10 rtspsrc protocols=4 location=rtsp://127.0.0.1:8554/test ! decodebin2 ! alsasink &
[1] 25184
$ gst-launch-0.10 rtspsrc protocols=4 location=rtsp://127.0.0.1:8554/test ! decodebin2 ! alsasink 
[..]
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 13766273507 ns.
[..]
$


On the server:
$ gdb --args .libs/test-launch  "( audiotestsrc ! lame ! mpegaudioparse ! rtpgstpay name=pay0 pt=96 )"
[..]
stream ready at rtsp://127.0.0.1:8554/test
[New Thread 0xb7470b40 (LWP 25206)]
[New Thread 0xb6affb40 (LWP 25207)]
[New Thread 0xb60ffb40 (LWP 25208)]
[New Thread 0xb56ffb40 (LWP 25209)]
[New Thread 0xb4cffb40 (LWP 25210)]
[New Thread 0xb42ffb40 (LWP 25211)]
[New Thread 0xb38ffb40 (LWP 25213)]
kill client 0x8227428 now ..	sending data to watch 0x8227428->0x8227c00 (0)..done
kill client 0x8227428 now ..	sending data to watch 0x8227428->0x8227c00 (0)..done
kill client 0x82672a8 now ..	sending data to watch 0x82672a8->0x8272008 (0)..done
kill client 0x8227428 now ..	sending data to watch 0x8227428->0x8227c00 (1)..done
kill client 0x82672a8 now ..*******client->watch destroyed 0x82672a8->0x8272008
	sending data to watch 0x82672a8->(nil) (0)..
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb56ffb40 (LWP 25209)]
0xb7d7194a in handle_new_buffer (sink=0x825a038, user_data=0x8246238) at rtsp-media.c:1244
1244	        tr->send_rtp (buffer, tr->transport->interleaved.min, tr->user_data);
(gdb) bt
#0  0xb7d7194a in handle_new_buffer (sink=0x825a038, user_data=0x8246238) at rtsp-media.c:1244
#1  0xb79a458b in gst_app_sink_render_common (psink=0x825a038, data=0xb4d030c0, is_list=0) at gstappsink.c:793
#2  0xb7922639 in gst_base_sink_render_object (basesink=basesink@entry=0x825a038, obj_type=obj_type@entry=2 '\002', 
    obj=obj@entry=0xb4d030c0, pad=0x8252198) at gstbasesink.c:3014
#3  0xb792650b in gst_base_sink_queue_object_unlocked (basesink=basesink@entry=0x825a038, obj_type=obj_type@entry=2 '\002', 
    obj=obj@entry=0xb4d030c0, prerollable=prerollable@entry=1, pad=0x8252198) at gstbasesink.c:3295
#4  0xb7926b90 in gst_base_sink_chain_unlocked (basesink=basesink@entry=0x825a038, obj_type=obj_type@entry=2 '\002', 
    obj=obj@entry=0xb4d030c0, pad=0x8252198) at gstbasesink.c:3677
#5  0xb7926fee in gst_base_sink_chain_main (basesink=0x825a038, pad=0x8252198, obj_type=2 '\002', obj=0xb4d030c0) at gstbasesink.c:3715
#6  0xb7f320c8 in gst_pad_push (pad=pad@entry=0x82654b8, buffer=0xb4d030c0) at gstpad.c:4710
#7  0xb62e8223 in gst_tee_do_push (is_list=0, data=0xb4d030c0, pad=0x82654b8, tee=0x8269848) at gsttee.c:675
#8  gst_tee_handle_data (tee=tee@entry=0x8269848, data=data@entry=0xb4d030c0, is_list=is_list@entry=0) at gsttee.c:754
#9  0xb62e87d9 in gst_tee_chain (pad=0x8265328, buffer=0xb4d030c0) at gsttee.c:828
#10 0xb7f320c8 in gst_pad_push (pad=0x82492a0, buffer=buffer@entry=0xb4d030c0) at gstpad.c:4710
#11 0xb7f1b774 in gst_proxy_pad_chain_default (pad=0x8245aa0, buffer=0xb4d030c0) at gstghostpad.c:261
#12 0xb7f320c8 in gst_pad_push (pad=pad@entry=0x8252648, buffer=buffer@entry=0xb4d030c0) at gstpad.c:4710
#13 0xb6c5cbdf in gst_rtp_session_send_rtp (sess=0x825e030, src=0x8262078, data=0xb4d030c0, user_data=0x8242248)
    at gstrtpsession.c:1079
#14 0xb6c4d4f0 in source_push_rtp (source=0x8262078, data=0xb4d030c0, session=0x825e030) at rtpsession.c:1216
#15 0xb6c59181 in rtp_source_send_rtp (src=src@entry=0x8262078, data=data@entry=0xb4d030c0, is_list=is_list@entry=0, 
    running_time=78367346) at rtpsource.c:1288
#16 0xb6c540f1 in rtp_session_send_rtp (sess=0x825e030, data=data@entry=0xb4d030c0, is_list=is_list@entry=0, 
    current_time=10811978860294, running_time=78367346) at rtpsession.c:2512
#17 0xb6c5f656 in gst_rtp_session_chain_send_rtp_common (pad=<optimised out>, data=0xb4d030c0, is_list=0) at gstrtpsession.c:1847
#18 0xb7f320c8 in gst_pad_push (pad=0x82459d0, buffer=buffer@entry=0xb4d030c0) at gstpad.c:4710
#19 0xb7f1b774 in gst_proxy_pad_chain_default (pad=0x82491c0, buffer=0xb4d030c0) at gstghostpad.c:261
#20 0xb7f320c8 in gst_pad_push (pad=0x8249000, buffer=buffer@entry=0xb4d030c0) at gstpad.c:4710
#21 0xb7f1b774 in gst_proxy_pad_chain_default (pad=0x8245900, buffer=0xb4d030c0) at gstghostpad.c:261
#22 0xb7f320c8 in gst_pad_push (pad=0x8232bf0, buffer=buffer@entry=0xb4d030c0) at gstpad.c:4710
#23 0xb747ffa8 in gst_basertppayload_push (payload=payload@entry=0x82420c8, buffer=0xb4d030c0) at gstbasertppayload.c:904
---Type <return> to continue, or q <return> to quit---
#24 0xb74b1d76 in gst_rtp_gst_pay_handle_buffer (basepayload=0x82420c8, buffer=0xb4d031e0) at gstrtpgstpay.c:212
#25 0xb747e1e5 in gst_basertppayload_chain (pad=0x8232cb8, buffer=0xb4d031e0) at gstbasertppayload.c:458
#26 0xb7f320c8 in gst_pad_push (pad=0x8232b28, buffer=buffer@entry=0xb4d031e0) at gstpad.c:4710
#27 0xb7910d87 in gst_base_parse_push_frame (parse=parse@entry=0x823b2e0, frame=frame@entry=0x823b86c) at gstbaseparse.c:1988
#28 0xb7912487 in gst_base_parse_handle_and_push_frame (parse=parse@entry=0x823b2e0, frame=frame@entry=0x823b86c, klass=0x8237b70)
    at gstbaseparse.c:1765
#29 0xb791379c in gst_base_parse_chain (pad=0x8232a60, buffer=0xb4d031e0) at gstbaseparse.c:2487
#30 0xb7f320c8 in gst_pad_push (pad=0x8232998, buffer=0xb4d031e0) at gstpad.c:4710
#31 0xb7642dea in gst_audio_encoder_finish_frame (enc=0x8238070, buf=0xb4d031e0, samples=1152) at gstaudioencoder.c:678
#32 0xb76e7e42 in ?? () from /usr/lib/i386-linux-gnu/gstreamer-0.10/libgstlame.so
#33 0xb7643d75 in gst_audio_encoder_push_buffers (enc=enc@entry=0x8238070, force=force@entry=0) at gstaudioencoder.c:789
#34 0xb76456da in gst_audio_encoder_chain (pad=0x82328d0, buffer=0xb4d03180) at gstaudioencoder.c:991
#35 0xb7f320c8 in gst_pad_push (pad=pad@entry=0x8232808, buffer=0xb4d03180) at gstpad.c:4710
#36 0xb792dfdb in gst_base_src_loop (pad=0x8232808) at gstbasesrc.c:2559
#37 0xb7f5be10 in gst_task_func (task=task@entry=0x824ea50) at gsttask.c:327
#38 0xb7f5cfb8 in default_func (tdata=0x8199708, pool=0x805b808) at gsttaskpool.c:70
#39 0xb7df8ce8 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#40 0xb7df8303 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#41 0xb7d53d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#42 0xb7c91d3e in clone () from /lib/i386-linux-gnu/libc.so.6

