<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<br><span style="font-size: 10pt; ">> </span><br><div>> > but, In void MatroskaFileParser::continueParsing() call, the "if (fOnEndFunc != NULL) (*fOnEndFunc)(fOnEndClientData);" will call, then will call "void MatroskaFile::handleEndOfTrackHeaderParsing()", and this time the "fParserForInitialization" is a invalid pointer, delete the invalid pointer will crash.<br>> <br>> Unfortunately you're still describing the *symptoms* of an apparent bug, but I'm not seeing the *cause* of the bug. There are only two possible ways that the "fParserForInitialization" pointer could become invalid:<br>> 1/ "handleEndOfTrackHeaderParsing()" is being called on a "MatroskaFile" object after its destructor has already been called, or<br>> 2/ Something is (somehow) writing over the "fParserForInitialization" field in (what would otherwise be) a still-valid "MatroskaFile" object.<br>> <br>> So I now need to know which of these is happening, and why.<br>> <br><br></div><div><br></div><div><div>The reason is destructor "fParserForInitialization" before its Init complete, If "MatroskaFile" is not exist.</div><div><br></div><div>see following setps.</div><div><br></div><div>1. "MatroskaFile" construct function</div><div><br></div><div>{</div><div><br></div><div> 2. fParserForInitialization = new MatroskaFileParser()</div><div><br></div><div> {</div><div> 3. call MatroskaFileParser's construct funciton</div><div><br></div><div> 4. call MatroskaFileParser's member function "continueParsing" (when MatroskaFile is not exist, the fInputSource is NULL, but fOnEndFunc is not NULL, so continue next setup.)</div><div><br></div><div> 5. call MatroskaFile's member function "handleEndOfTrackHeaderParsing"</div><div><br></div><div> 6. call delete fParserForInitialization. (but this time fParserForInitialization Initialize is not completed, the MatroskaFileParser's construct function is not return, so fParserForInitialization is a invalid pointer)</div><div> }</div><div><br></div><div>}</div></div> </div></body>
</html>