> 
> > 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.
> 
> 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:
> 1/ "handleEndOfTrackHeaderParsing()" is being called on a "MatroskaFile" 
> object after its destructor has already been called, or
> 2/ Something is (somehow) writing over the "fParserForInitialization" field 
> in (what would otherwise be) a still-valid "MatroskaFile" object.
> 
> So I now need to know which of these is happening, and why.
> 


The reason is destructor "fParserForInitialization" before its Init complete, 
If "MatroskaFile" is not exist.
see following setps.
1. "MatroskaFile" construct function
{
       2. fParserForInitialization = new MatroskaFileParser()
       {             3. call MatroskaFileParser's construct funciton
             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.)
            5. call MatroskaFile's member function 
"handleEndOfTrackHeaderParsing"
            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)       }
}                                         
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to