flyskyosg / libcitygml

Automatically exported from code.google.com/p/libcitygml
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Crash when parsing RoadNoise_Levkreuz.xml #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download 
http://www.citygml.org/fileadmin/count.php?f=fileadmin%2Fcitygml%2Fdocs%2FKreuz_
Leverkusen_2008-03-05.zip from the citygml example page (CityGML V0.4.0 (Noise 
ADE) ZIP archive, 7.7 MB.)
2. Convert RoadNoise_Levkreuz.xml

What is the expected output? What do you see instead?
I expect that the xml file will be parsed; instead it crashes. See below for 
the details.

What version of the product are you using? On what operating system?
Windows 7, trunk rev.

Please provide any additional information below.
The crash is inside the inline void popObject( void ) function inside parser.h. 
This popObject is called when the CityModel endtag is encountered. At that 
time, the CityModel is popped from the object stack. The stack is then empty 
after which it crashes on looking at the top of the stack at '_currentObject = 
objectStack.top();'.

I tried debugging the code but I don't really get it. I would expect the 
pushObject() and popObject() functions to be symetrical; ie be called when an 
opening respectively closing tag of a function is called. This however is not 
the case.

I would also expect that after a popObject the stack could be empty, as all 
pushes before could be matches. I would thus expect the following very small 
xml file to be just fine, but it produces exactly the same stack trace as the 
pop:
==========
<?xml version="1.0" encoding="UTF-8"?>
<core:CityModel>
</core:CityModel>
==========

Original issue reported on code.google.com by w.ya...@cebra.eu on 23 Nov 2011 at 4:27

GoogleCodeExporter commented 9 years ago
oh by the way, I am willing to help on solving this potential bug, but I don't 
have enough understanding of the internal workings (yet) it seems.. Any help 
would be appreciated!

Original comment by w.ya...@cebra.eu on 23 Nov 2011 at 4:28

GoogleCodeExporter commented 9 years ago
Thanks a lot for your detailed report. I will work on it ASAP on tomorrow. 
Best regards,
J.

Original comment by jpouder...@gmail.com on 23 Nov 2011 at 5:44

GoogleCodeExporter commented 9 years ago

Original comment by jpouder...@gmail.com on 30 Nov 2011 at 2:23

GoogleCodeExporter commented 9 years ago
Finally fixed in revisoon 126!
No more crash detected.
Regards,
Joachim

Original comment by jpouder...@gmail.com on 13 Jan 2012 at 10:59

GoogleCodeExporter commented 9 years ago

Original comment by jpouder...@gmail.com on 13 Jan 2012 at 10:59