The crashes are very consistent. Not the frequency, but the location. When they occur, 602 is always the last message printed. I've attached an output example. Judging by the callstack it almost looks to me like the printf would be the cause, but the same thing happens if I remove the debug output, i.e. 602, and 601 etc.
This however makes no sense at all. What is causing the sudden app crash? I see no explanation at all in the code. I suspect that a 'memory smash' - i.e., a write through a bad pointer (caused by a bug in the code) - is to blame. If that happens, then a pointer somewhere else might be getting corrupted, which could lead to an error like this that occurs in an unexpected place in the code. I suggest that you run a 'memory debugger' on your application. See http://en.wikipedia.org/wiki/Memory_debugger Some tools that I've seen recommended are - "Dr. Memory": http://code.google.com/p/drmemory/ - "OllyDbg": http://ollydbg.de/ Thanks. Never heard of those two, but will look into. I would also suspect threads going havoc, but as liveMedia is single-threaded that shouldn't be the case. Correct - provided, of course, that your *application* uses only a single thread (that calls LIVE555 code). Well, "our app" uses multiple threads outside the liveMedia library, but I've lately only been testing with the modified testRTSPClient that I attached. It definitely seems like the server matters. How can that be? Perhaps it's because the different servers (streams) use different codecs (and thus our RTSP client code uses different classes to receive/process the incoming packets)? I see (from the SDP descriptions returned in response to "DESCRIBE") that the stream(s) that are causing your crash are using motion JPEG. What about the "Axis 243q" streams (the ones that you think do not cause the crash)? What codec do they use? (Please post a SDP description from those streams.) That makes sense. I was planning on setting up some Cisco VMS streams using mpeg4, but wasn't sure how/if that affected the client. The Axis 243q always outputs mpeg4 while using rtsp. I've attached output from Axis 243q mpeg4-streams which includes the SDP. Now when you point it out it seems fairly safe to say jpeg is the source of the issue. btw. I know you discourage mjpeg, and I can agree on that, but there are legacy reasons for us still using it and bandwidth isn't an issue in our case. Thanks! /Claes Ross Finlayson Live Networks, Inc. http://www.live555.com/
e:\projects\live\Release>testRTSPClient.exe rtsp://192.168.1.102/mpeg4/media.amp rtsp://192.168.1.110/mpeg4/media.amp 100 0Entering RTSPClient::connectToServer() Opening connection to 192.168.1.102, port 554... 1 2 3 4 124 a1a3a0 554 10035 5 101 103 10 11 20 21 22 23 24 26 ...remote connection opened 27 28 Sending request: DESCRIBE rtsp://192.168.1.102/mpeg4/media.amp RTSP/1.0 CSeq: 2 User-Agent: Test (LIVE555 Streaming Media v2013.01.15) Accept: application/sdp 400 401 402 403 29 200 201 Received 837 new bytes of response data. Received a complete DESCRIBE response: RTSP/1.0 200 OK CSeq: 2 Content-Base: rtsp://192.168.1.102:554/mpeg4/media.amp/ Content-Type: application/sdp Content-Length: 700 v=0 o=- 719747360261394 719747360261404 IN IP4 192.168.1.102 s=Media Presentation e=NONE c=IN IP4 0.0.0.0 b=AS:8000 t=0 0 a=control:* a=range:npt=now- a=mpeg4-iod: "data:application/mpeg4-iod;base64,AoDUAE8BAf/1AQOAbwABQFBkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCx UjBCR3dVZkF4Y0F5U1FBWlFRTklCRUVrK0FBZWhJQUFIb1NBQVlCQkE9PQQNAQUABAAAAAAAAAAAAAYJAQAAAAAAAAAAAzoAAkA2ZGF0YTphcHBsaWNhdGl bi9tcGVnNC1iaWZzLWF1O2Jhc2U2NCx3QkFTWVFTSVVFVUZQd0E9BBICDQAAAgAAAAAAAAAABQMAAEAGCQEAAAAAAAAAAA==" m=video 0 RTP/AVP 96 b=AS:8000 a=framerate:30.0 a=control:trackID=1 a=rtpmap:96 MP4V-ES/90000 a=fmtp:96 profile-level-id=245; config=000001B0F5000001B509000001000000012008D49D88032516043C14440F a=mpeg4-esid:201 [URL:"rtsp://192.168.1.102:554/mpeg4/media.amp/"]: Got a SDP description: v=0 o=- 719747360261394 719747360261404 IN IP4 192.168.1.102 s=Media Presentation e=NONE c=IN IP4 0.0.0.0 b=AS:8000 t=0 0 a=control:* a=range:npt=now- a=mpeg4-iod: "data:application/mpeg4-iod;base64,AoDUAE8BAf/1AQOAbwABQFBkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCx UjBCR3dVZkF4Y0F5U1FBWlFRTklCRUVrK0FBZWhJQUFIb1NBQVlCQkE9PQQNAQUABAAAAAAAAAAAAAYJAQAAAAAAAAAAAzoAAkA2ZGF0YTphcHBsaWNhdGl bi9tcGVnNC1iaWZzLWF1O2Jhc2U2NCx3QkFTWVFTSVVFVUZQd0E9BBICDQAAAgAAAAAAAAAABQMAAEAGCQEAAAAAAAAAAA==" m=video 0 RTP/AVP 96 b=AS:8000 a=framerate:30.0 a=control:trackID=1 a=rtpmap:96 MP4V-ES/90000 a=fmtp:96 profile-level-id=245; config=000001B0F5000001B509000001000000012008D49D88032516043C14440F a=mpeg4-esid:201 [URL:"rtsp://192.168.1.102:554/mpeg4/media.amp/"]: Initiated the "video/MP4V-ES" subsession (client ports 61820-61821) Sending request: SETUP rtsp://192.168.1.102:554/mpeg4/media.amp/trackID=1 RTSP/1.0 CSeq: 3 User-Agent: Test (LIVE555 Streaming Media v2013.01.15) Transport: RTP/AVP;unicast;client_port=61820-61821 400 401 402 403 202 200 201 Received 162 new bytes of response data. Received a complete SETUP response: RTSP/1.0 200 OK CSeq: 3 Session: 2012301759;timeout=60 Transport: RTP/AVP;unicast;client_port=61820-61821;server_port=50464-50465;ssrc=70016FBD;mode="PLAY" [URL:"rtsp://192.168.1.102:554/mpeg4/media.amp/"]: Set up the "video/MP4V-ES" subsession (client ports 61820-61821) [URL:"rtsp://192.168.1.102:554/mpeg4/media.amp/"]: Created a data sink for the "video/MP4V-ES" subsession 701 702 703 Sending request: PLAY rtsp://192.168.1.102:554/mpeg4/media.amp/ RTSP/1.0 CSeq: 4 User-Agent: Test (LIVE555 Streaming Media v2013.01.15) Session: 2012301759 Range: npt=0.000- 400 401 402 403 202 200 201 Received 119 new bytes of response data. Received a complete PLAY response: RTSP/1.0 200 OK CSeq: 4 Session: 2012301759 Range: npt=now- RTP-Info: url=trackID=1;seq=52458;rtptime=915496813 [URL:"rtsp://192.168.1.102:554/mpeg4/media.amp/"]: Started playing session... 202 500 501 601 29005 0 1358979829 984140 602 701 702 703 603 502 500 501 601 6726 0 1358979830 50773 602 701 702 703 603 502 500 501 601 7455 0 1358979830 84095 602 701 702 703 603 502 500 501 601 6499 0 1358 79830 117417 602 701 702 703 603 502 500 501 601 7087 0 1358979830 150728 602 701 702 703 603 502 500 01 601 6517 0 1358979830 184050 602 701 702 703 603 502 500 501 601 5759 0 1358979830 217372 602 701 702 03 603 502 500 501 601 6135 0 1358979830 284016 602 701 702 703 603 502 500 501 601 5807 0 1358979830 317 49 602 701 702 703 603 502 500 501 601 5721 0 1358979830 383971 602 701 702 703 603 502 500 501 601 6 38 0 1358979830 417293 602 701 702 703 603 502 500 501 601 4930 0 1358979830 483926 602 701 702 703 603 02 500 501 601 5544 0 1358979830 517248 602 701 702 703 603 502 500 501 601 6199 0 1358979830 583892 602 01 702 703 603 502 500 501 601 5862 0 1358979830 617203 602 701 702 703 603 502 500 501 601 6873 0 1358 79830 683847 602 701 702 703 603 502 500 501 601 7217 0 1358979830 717169 602 701 702 703 603 502 500 01 601 7548 0 1358979830 750480 602 701 702 703 603 502 500 501 601 6982 0 1358979830 783813 602 701 702 03 603 502 500 501 601 6302 0 1358979830 817124 602 701 702 703 603 502 500 501 601 5934 0 1358979830 850 46 602 701 702 703 603 502 500 501 601 6538 0 1358979830 917090 602 701 702 703 603 502 500 501 601 6 76 0 1358979830 950423 602 701 702 703 603 502 500 501 601 6992 0 1358979830 983734 602 701 702 703 603 02 500 501 601 6263 0 1358979831 17056 602 701 702 703 603 502 500 501 601 7622 0 1358979831 83689 602 70 702 703 603 502 500 501 601 6766 0 1358979831 117011 602 701 702 703 603 502 500 501 601 6499 0 135897 831 183644 602 701 702 703 603 502 500 501 601 7391 0 1358979831 216966 602 701 702 703 603 502 500 50 601 6926 0 1358979831 283610 602 701 702 703 603 502 500 501 601 6401 0 1358979831 316932 602 701 702 70 603 502 500 501 601 6643 0 1358979831 383576 602 701 702 703 603 502 500 501 601 6824 0 1358979831 41689 602 701 702 703 603 502 500 501 601 6521 0 1358979831 450198 602 701 702 703 603 502 500 501 601 651 0 1358979831 516853 602 701 702 703 603 502 500 501 601 5804 0 1358979831 550164 602 701 702 703 603 50 500 501 601 6615 0 1358979831 583497 602 701 702 703 603 502 500 501 601 6645 0 1358979831 616808 602 70 702 703 603 502 500 501 601 6596 0 1358979831 683441 602 701 702 703 603 502 500 501 601 6783 0 135897 831 716763 602 701 702 703 603 502 500 501 601 28583 0 1358979831 750085 602 701 702 703 603 502 500 5 1 601 6040 0 1358979831 783418 602 701 702 703 603 502 500 501 601 6500 0 1358979831 816729 602 701 702 7 3 603 502 500 501 601 5866 0 1358979831 850051 602 701 702 703 603 502 500 501 601 6267 0 1358979831 9166 5 602 701 702 703 603 502 500 501 601 5689 0 1358979831 950006 602 701 702 703 603 502 500 501 601 66 2 0 1358979831 983339 602 701 702 703 603 502 500 501 601 6849 0 1358979832 49983 602 701 702 703 603 50 500 501 601 6876 0 1358979832 116616 602 701 702 703 603 502 500 501 601 6217 0 1358979832 149938 602 70 702 703 603 502 500 501 601 6772 0 1358979832 216582 602 701 702 703 603 502 500 501 601 29007 0 13589 9832 249893 602 701 702 703 603 502 500 501 601 6438 0 1358979832 283226 602 701 702 703 603 502 500 5 1 601 6417 0 1358979832 316559 602 701 702 703 603 502 500 501 601 5688 0 1358979832 349870 602 701 702 7 3 603 502 500 501 601 5793 0 1358979832 416503 602 701 702 703 603 502 500 501 601 5547 0 1358979832 4498 5 602 701 702 703 603 502 500 501 601 5954 0 1358979832 483147 602 701 702 703 603 502 500 501 601 57 4 0 1358979832 549791 602 701 702 703 603 502 500 501 601 6808 0 1358979832 583113 602 701 702 703 603 5 2 500 501 601 6088 0 1358979832 649757 602 701 702 703 603 502 500 501 601 6232 0 1358979832 683079 602 7 1 702 703 603 502 500 501 601 5609 0 1358979832 716390 602 701 702 703 603 502 500 501 601 6326 0 16660 0 796811 602 701 702 703 603 502 500 501 601 6114 0 1666000 830133 602 701 702 703 603 502 500 501 60 6116 0 1666000 863466 602 701 702 703 603 502 500 501 601 5490 0 1666000 896788 602 701 702 703 603 502 500 501 601 6091 0 1666000 963432 602 701 702 703 603 502 500 501 601 5821 0 1666000 996743 602 701 702 703 603 502 500 501 601 5681 0 1666001 30098 602 701 702 703 603 502 500 501 601 6358 0 1666001 63398 60 701 702 703 603 502 500 501 601 6698 0 1666001 130109 602 701 702 703 603 502 500 501 601 6124 0 1666 01 163353 602 701 702 703 603 502 500 501 601 6622 0 1666001 196675 602 701 702 703 603 502 500 501 6 1 6210 0 1666001 230008 602 701 702 703 603 502 500 501 601 6210 0 1666001 263319 602 701 702 703 603 50 500 501 601 6088 0 1666001 329963 602 701 702 703 603 502 500 501 601 5910 0 1666001 363285 602 701 702 703 603 502 500 501 601 6789 0 1666001 429929 602 701 702 703 603 502 500 501 601 6590 0 1666001 463251 602 701 702 703 603 502 500 501 601 6035 0 1666001 529895 602 701 702 703 603 502 500 501 601 6566 0 1 66001 563217 602 701 702 703 603 502 500 501 601 6786 0 1666001 629861 602 701 702 703 603 502 500 501 601 6279 0 1666001 663183 602 701 702 703 603 502 500 501 601 6270 0 1666001 729827 602 701 702 703 603 502 500 501 601 6372 0 1666001 763149 602 701 702 703 603 502 500 501 601 6063 0 1666001 829782 602 701 02 703 603 502 500 501 601 6365 0 1666001 863104 602 701 702 703 603 502 500 501 601 6426 0 1666001 9297 8 602 701 702 703 603 502 500 501 601 5809 0 1666001 963081 602 701 702 703 603 502 500 501 601 5905 1666002 29725 602 701 702 703 603 502 500 501 601 28122 0 1666002 63047 602 701 702 703 603 502 500 5 1 601 7478 0 1666002 96380 602 701 702 703 603 502 500 501 601 6484 0 1666002 129691 602 701 702 703 603 502 500 501 601 5919 0 1666002 163013 602 701 702 703 603 502 500 501 601 6003 0 1666002 196335 602 701 702 703 603 502 500 501 601 6001 0 1666002 229657 602 701 702 703 603 502 500 501 601 5859 0 1666002 262 79 602 701 702 703 603 502 500 501 601 5646 0 1666002 296301 602 701 702 703 603 502 500 501 601 5949 0 1666002 362945 602 701 702 703 603 502 500 501 601 5790 0 1666002 396278 602 701 702 703 603 502 500 501 601 5815 0 1666002 429600 602 701 702 703 603 502 500 501 601 5944 0 1666002 496244 602 701 702 703 03 502 500 501 601 6417 0 1666002 529566 602 701 702 703 603 502 500 501 601 5671 0 1666002 562888 602 7 1 702 703 603 502 500 501 601 5886 0 1666002 629521 602 701 702 703 603 502 500 501 601 6038 0 1666002 62854 602 701 702 703 603 502 500 501 601 6370 0 1666002 696176 602 701 702 703 603 502 500 501 601 5 34 0 1666002 762809 602 701 702 703 603 502 500 501 601 5587 0 1666002 796142 602 701 702 703 603 502 5 0 501 601 5721 0 1666002 862797 602 701 702 703 603 502 500 501 601 5820 0 1666002 896108 602 701 702 70 603 502 Sending request: TEARDOWN rtsp://192.168.1.102:554/mpeg4/media.amp/ RTSP/1.0 CSeq: 5 User-Agent: Test (LIVE555 Streaming Media v2013.01.15) Session: 2012301759 400 401 402 403 100 0Entering RTSPClient::connectToServer() Opening connection to 192.168.1.110, port 554... 1 2 3 4 368 a1a3a0 554 10035 5 101 103 10 11 20 21 22 23 24 26 ...remote connection opened 27 28 Sending request: DESCRIBE rtsp://192.168.1.110/mpeg4/media.amp RTSP/1.0 CSeq: 2 User-Agent: Test (LIVE555 Streaming Media v2013.01.15) Accept: application/sdp 400 401 402 403 29 200 201 Received 49 new bytes of response data. Received a complete TEARDOWN response: RTSP/1.0 200 OK CSeq: 5 Session: 2012301759 [URL:"rtsp://192.168.1.102:554/mpeg4/media.amp/"]: Closing the stream. 202 200 201 Received 862 new bytes of response data. Received a complete DESCRIBE response: RTSP/1.0 200 OK CSeq: 2 Content-Base: rtsp://192.168.1.110:554/mpeg4/media.amp/ Content-Type: application/sdp Content-Length: 725 v=0 o=- 1358961812830863 1358961812830871 IN IP4 192.168.1.110 s=Media Presentation e=NONE c=IN IP4 0.0.0.0 b=AS:768 t=0 0 a=control:* a=range:npt=now- a=mpeg4-iod: "data:application/mpeg4-iod;base64,AoDUAE8BAf/zAQOAbwABQFBkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCx UjBCR3dVZkF4Y0F5U1FBWlFRTklCRUVrK0FBQzdnQUFBdTRBQVlCQkE9PQQNAQUABAAAAAAAAAAAAAYJAQAAAAAAAAAAAzoAAkA2ZGF0YTphcHBsaWNhdGl bi9tcGVnNC1iaWZzLWF1O2Jhc2U2NCx3QkFTWVFTSVVFVUZQd0E9BBICDQAAAgAAAAAAAAAABQMAAEAGCQEAAAAAAAAAAA==" a=isma-compliance:1,1.0,1 m=video 0 RTP/AVP 96 b=AS:768 a=framerate:6.0 a=control:trackID=1 a=rtpmap:96 MP4V-ES/90000 a=fmtp:96 profile-level-id=243; config=000001B0F3000001B509000001000000012008D49D88032516043C14440F a=mpeg4-esid:201 [URL:"rtsp://192.168.1.110:554/mpeg4/media.amp/"]: Got a SDP description: v=0 o=- 1358961812830863 1358961812830871 IN IP4 192.168.1.110 s=Media Presentation e=NONE c=IN IP4 0.0.0.0 b=AS:768 t=0 0 a=control:* a=range:npt=now- a=mpeg4-iod: "data:application/mpeg4-iod;base64,AoDUAE8BAf/zAQOAbwABQFBkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCx UjBCR3dVZkF4Y0F5U1FBWlFRTklCRUVrK0FBQzdnQUFBdTRBQVlCQkE9PQQNAQUABAAAAAAAAAAAAAYJAQAAAAAAAAAAAzoAAkA2ZGF0YTphcHBsaWNhdGl bi9tcGVnNC1iaWZzLWF1O2Jhc2U2NCx3QkFTWVFTSVVFVUZQd0E9BBICDQAAAgAAAAAAAAAABQMAAEAGCQEAAAAAAAAAAA==" a=isma-compliance:1,1.0,1 m=video 0 RTP/AVP 96 b=AS:768 a=framerate:6.0 a=control:trackID=1 a=rtpmap:96 MP4V-ES/90000 a=fmtp:96 profile-level-id=243; config=000001B0F3000001B509000001000000012008D49D88032516043C14440F a=mpeg4-esid:201 [URL:"rtsp://192.168.1.110:554/mpeg4/media.amp/"]: Initiated the "video/MP4V-ES" subsession (client ports 61826-61827) Sending request: SETUP rtsp://192.168.1.110:554/mpeg4/media.amp/trackID=1 RTSP/1.0 CSeq: 3 User-Agent: Test (LIVE555 Streaming Media v2013.01.15) Transport: RTP/AVP;unicast;client_port=61826-61827 400 401 402 403 202 200 201 Received 162 new bytes of response data. Received a complete SETUP response: RTSP/1.0 200 OK CSeq: 3 Session: 0715760535;timeout=60 Transport: RTP/AVP;unicast;client_port=61826-61827;server_port=50816-50817;ssrc=6D9FBEC1;mode="PLAY" [URL:"rtsp://192.168.1.110:554/mpeg4/media.amp/"]: Set up the "video/MP4V-ES" subsession (client ports 61826-61827) [URL:"rtsp://192.168.1.110:554/mpeg4/media.amp/"]: Created a data sink for the "video/MP4V-ES" subsession 701 702 703 Sending request: PLAY rtsp://192.168.1.110:554/mpeg4/media.amp/ RTSP/1.0 CSeq: 4 User-Agent: Test (LIVE555 Streaming Media v2013.01.15) Session: 0715760535 Range: npt=0.000- 400 401 402 403 202 200 201 Received 120 new bytes of response data. Received a complete PLAY response: RTSP/1.0 200 OK CSeq: 4 Session: 0715760535 Range: npt=now- RTP-Info: url=trackID=1;seq=47680;rtptime=4004363579 [URL:"rtsp://192.168.1.110:554/mpeg4/media.amp/"]: Started playing session... 202 500 501 601 56370 0 1358979835 144818 602 701 702 703 603 502 500 501 601 14736 0 1358979835 478462 60 701 702 703 603 502 500 501 601 14417 0 1358979835 812117 602 701 702 703 603 502 500 501 601 12386 0 1358979835 978950 602 701 702 703 603 502 500 501 601 12106 0 1358979836 145772 602 701 702 703 603 502 500 501 601 12551 0 1358979836 312594 602 701 702 703 603 502 500 501 601 11905 0 1358979836 479427 602 70 702 703 603 502 500 501 601 12157 0 1358979836 646260 602 701 702 703 603 502 500 501 601 8704 0 13589 9836 813071 602 701 702 703 603 502 500 501 601 8754 0 1358979836 979915 602 701 702 703 603 502 500 5 1 601 8651 0 1358979837 146726 602 701 702 703 603 502 500 501 601 8678 0 3799811 625296 602 701 702 703 603 502 500 501 601 56155 0 3799811 958951 602 701 702 703 603 502 500 501 601 18573 0 3799812 125773 602 701 702 703 603 502 500 501 601 16688 0 3799812 292606 602 701 702 703 603 502 ^C e:\projects\live\Release>
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel