[Live-devel] Access violation crash in rtspclient

Ross Finlayson finlayson at live555.com
Sun Nov 20 15:13:23 PST 2011


> It built and ran first time. Now for the other issue, the one that is “my fault”. I am not sure how to fix that issue. my shutdown() function calls medium::close().  This is where the first crash was noticed in onReceive that you fixed. But it also calls MediaLookupTable::remove and that calls delete medium so I still get to the crash of delete[] fResultString  (unless I comment it out)

As I said before, you shouldn't be calling your shutdown() function directly from within your "BYE" handler, because of the possibility of the "BYE" handler being called while you're still in a synchronous "RTSPClient" operation.

Instead, your "BYE" handler routine should just set a Boolean flag (but not call "shutdown()").  Then, keep testing this flag elsewhere (i.e., outside the synchronous "RTSPClient" calls), and only then - if the flag is True - call shutdown().

As always, you should be able to do this without making any changes to the supplied code.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111120/e8fa129b/attachment.html>


More information about the live-devel mailing list