XML error results in segfault (local game)

Bug #402870 reported by Kyle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Armagetron Advanced
Fix Committed
Undecided
Unassigned

Bug Description

this happens on the latest trunk reversion 922 and some previous versions

XML parsing will cause a segmentation fault if there are errors in the code on a local game
for this situation a comment tag was closed with ---> it also applies to mismatches tags

game output:
XML validation error in kyle/wildfort/corner-0.0.1.aamap.xml:

:72: parser error : Comment not terminated
<!--<Wall height="50">
                                        <Point x="1472" y="-784"/>
                                </Wall>--->
                                       ^
:79: parser error : Comment not terminated
<!--<Wall height="50">
                                        <Point x="1472" y="-784"/>
                                <!--<Wall height="50">
                                  ^
Failed to parse
Segmentation fault

Traceback:
#0 0x00000000006691ee in tXmlParserNamespace::tXmlParser::ValidateXml (
    this=0x17a0dd0, docfd=0x18a8c00, uri=0x714525 "",
    filepath=0x18b6568 "kyle/wildfort/corner-0.0.1.aamap.xml")
    at tools/tXmlParser.cpp:445
#1 0x000000000067fa07 in tResource::ValidateXml (this=0x17a0dd0,
    docfd=0x18a8c00, uri=0x714525 "",
    filepath=0x18b6568 "kyle/wildfort/corner-0.0.1.aamap.xml")
    at resource/tResource.cpp:37
#2 0x0000000000669704 in tXmlParserNamespace::tXmlParser::LoadWithoutParsing (
    this=0x17a0dd0, filename=0x18b6568 "kyle/wildfort/corner-0.0.1.aamap.xml",
    uri=0x714525 "") at tools/tXmlParser.cpp:268
#3 0x0000000000465b9b in sg_ParseMap (aParser=0x17a0dd0, mapfile=
          {<std::basic_string<char, std::char_traits<char>, std::allocator<char> >> = {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7fff0a32d330 "he\213\001"}}, <No data fields>}) at tron/gGame.cpp:2387
#4 0x0000000000465e4d in sg_ParseMap (aParser=0x17a0dd0)
    at tron/gGame.cpp:2412
#5 0x000000000046e6b1 in gGame::Verify (this=0x177ed30) at tron/gGame.cpp:2418
#6 0x000000000046ec33 in gGame::StateUpdate (this=0x177ed30)
    at tron/gGame.cpp:2695
#7 0x0000000000464dc7 in GameLoop (input=true) at tron/gGame.cpp:4150
#8 0x000000000046d4af in sg_EnterGameCore (enter_state=nSTANDALONE)

dlh (dlh)
Changed in armagetronad:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.