Opened 10 years ago
Last modified 10 years ago
#5571 closed defect
OGR Driver GML : bug with gmlReader multiple instanciation/deletion ( using xerces) — at Version 2
Reported by: | ibibah | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.11.1 |
Component: | default | Version: | 1.11.0 |
Severity: | major | Keywords: | Driver, GML, xerces |
Cc: |
Description (last modified by )
there is a bug in the gmlReader object here:
209 if( m_nInstanceCount == 0 && m_bXercesInitialized > 0 ) 210 { 211 XMLPlatformUtils::Terminate(); 212 m_bXercesInitialized = FALSE; <----- here 213 }
he's using two global variables to manage xerces initialisation. If, in one session, you're allocate a object , delete them, and reallocate another, m_bXercesInitialized = FALSE instead of -1 like the global initialisation. This result in a crash when whe call NextFeatureXerces() because, SetupParser() and then SetupParserXerces() doesn't allocate the reader and m_poSAXReader == NULL in the code below :
555 while( m_poCompleteFeature == NULL 556 && !m_bStopParsing 557 && m_poSAXReader->parseNext( m_oToFill ) ) {}
The correction is :
209 if( m_nInstanceCount == 0 && m_bXercesInitialized > 0 ) 210 { 211 XMLPlatformUtils::Terminate(); 212 m_bXercesInitialized = -1; <----- correction 213 }
Please correct this.
thanks.
Change History (2)
comment:1 by , 10 years ago
Milestone: | → 1.11.1 |
---|
comment:2 by , 10 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.