[Live-devel] Corruption of the heap and Access violation reading errors at testRTSPClient.cpp [ on windows platform ]

Novalis Vapuru 6.45.vapuru at gmail.com
Sat Mar 24 06:02:41 PDT 2012


Here is my a "little modified"  testRTSPClient.cpp [ Check  PS for
full source code].


RTSPClient* rtspClient;// global handle
void Start()
{

// Begin by setting up our usage environment:
TaskScheduler* scheduler = BasicTaskScheduler::createNew();
UsageEnvironment* env = BasicUsageEnvironment::createNew(*scheduler);


char* programName ="Test";
char* rtpsURL = "rtsp://192.168.3.165/video.h264"; // This is an
local IP Camera
rtspClient = openURL(*env, programName,rtpsURL );

rtspClient->sendDescribeCommand(continueAfterDESCRIBE);

// All subsequent activity takes place within the event loop:
env->taskScheduler().doEventLoop(); // does not return

}

void Stop()
{
shutdownStream(rtspClient);
}
int main(int argc, char** argv)
{

boost::thread StartClientThread = boost::thread(Start);

boost::this_thread::sleep( boost::posix_time::seconds(10) ); //Try to
stop after 10 seconds

Stop();

int endMain;

std::cin >> endMain; // Just for not to exit main loop

return 0;
}

First: Why I modify the code?
MyMotivation: I want to test if i can able to shutdown the
OpenRTSPClient on my request.

Results:  when i call Stop

1. Sometimes I get heap corruption error on windows platform

Full Error:  HEAP[RTSPClientTest.exe]: HEAP: Free Heap block 1d4428
modified at 1d44e0 after it was freed
Windows has triggered a breakpoint in RTSPClientTest.exe.

This may be due to a corruption of the heap, which indicates a bug in
RTSPClientTest.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while RTSPClientTest.exe
has focus.

What may be the problem? Any ideas? Suggestions?

2. Sometimes i get   Access violation  errors at DummySink
afterGettingFrame function  at line if (fSubsession.rtpSource() !=
NULL && !fSubsession.rtpSource()->hasBeenSynchronizedUsingRTCP())
Full Error:
First-chance exception at 0x00212a85 in RTSPClientTest.exe:
0xC0000005: Access violation reading location 0xfeeeffd6.
Unhandled exception at 0x00212a85 in RTSPClientTest.exe: 0xC0000005:
Access violation reading location 0xfeeeffd6.


Has anybody can able to start and stop OpenRTSPClient sucessfully on
windows platform? what is wrong with my little test? what may cause
this?
Any ideas suggestions?

Best Wishes

Novalis


PS:  Can download file at
http://www.2shared.com/file/YknZUctR/testRTSPClientModified.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testRTSPClientModified.cpp
Type: text/x-c++src
Size: 20795 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120324/b0b41c8f/attachment-0001.bin>


More information about the live-devel mailing list