MengeCrowdSim / Menge

The source code for the Menge crowd simulation framework
Apache License 2.0
138 stars 64 forks source link

Running demo file #33

Open chraibi opened 7 years ago

chraibi commented 7 years ago

Why running

    ./menge -p ../examples/core/headon.xml

yields

** Demo doc read from disk: ** 

** Printing via doc.Print **
<?xml version="1.0" standalone="no" ?>
<!-- Our to do list data -->
<ToDo>
    <!-- Do I need a secure PDA? -->
    <Item priority="1" distance="close">Go to the
        <bold>Toy store!</bold>
    </Item>
    <Item priority="2" distance="none">Do bills</Item>
    <Item priority="2" distance="far &amp; back">Look for Evil Dinosaurs!</Item>
</ToDo>
** Printing via TiXmlPrinter **
<?xml version="1.0" standalone="no" ?>
<!-- Our to do list data -->
<ToDo>
    <!-- Do I need a secure PDA? -->
    <Item priority="1" distance="close">
        Go to the
        <bold>Toy store!</bold>
    </Item>
    <Item priority="2" distance="none">Do bills</Item>
    <Item priority="2" distance="far &amp; back">Look for Evil Dinosaurs!</Item>
</ToDo>
** Printing via operator<< **
<?xml version="1.0" standalone="no" ?><!-- Our to do list data --><ToDo><!-- Do I need a secure PDA? --><Item priority="1" distance="close">Go to the<bold>Toy store!</bold></Item><Item priority="2" distance="none">Do bills</Item><Item priority="2" distance="far &amp; back">Look for Evil Dinosaurs!</Item></ToDo>
** Demo doc processed: ** 

<?xml version="1.0" standalone="no" ?>
<!-- Our to do list data -->
<ToDo>
    <!-- Do I need a secure PDA? -->
    <Item priority="2" distance="close">Go to the
        <bold>Toy store!</bold>
    </Item>
    <Item priority="1" distance="far">Talk to:
        <Meeting where="School">
            <Attendee name="Marple" position="teacher" />
            <Attendee name="Voel" position="counselor" />
        </Meeting>
        <Meeting where="Lunch" />
    </Item>
    <Item priority="2" distance="here">Do bills</Item>
</ToDo>
** Demo doc processed to stream: ** 

<?xml version="1.0" standalone="no" ?><!-- Our to do list data --><ToDo><!-- Do I need a secure PDA? --><Item priority="2" distance="close">Go to the<bold>Toy store!</bold></Item><Item priority="1" distance="far">Talk to:<Meeting where="School"><Attendee name="Marple" position="teacher" /><Attendee name="Voel" position="counselor" /></Meeting><Meeting where="Lunch" /></Item><Item priority="2" distance="here">Do bills</Item></ToDo>

** Basic structure. **
[pass] Output stream correct.
[pass] Root element exists. [1][1]
[pass] Root element value is 'ToDo'. [ToDo][ToDo]
[pass] First child exists & is a comment. [1][1]
[pass] Sibling element exists & is an element. [1][1]
[pass] Value is 'Item'. [Item][Item]
[pass] First child exists. [1][1]
[pass] Value is 'Go to the'. [Go to the][Go to the]

** Iterators. **
[pass] Top level nodes, using First / Next. [3][3]
[pass] Top level nodes, using Last / Previous. [3][3]
[pass] Top level nodes, using IterateChildren. [3][3]
[pass] Children of the 'ToDo' element, using First / Next. [3][3]
[pass] 'Item' children of the 'ToDo' element, using First/Next. [3][3]
[pass] 'Item' children of the 'ToDo' element, using Last/Previous. [3][3]

** Parsing. **
[pass] Element parsed, value is 'Element0'. [Element0][Element0]
[pass] Reads attribute 'attribute0="foo0"'. [foo0][foo0]
[pass] Reads incorrectly formatted 'attribute1=noquotes'. [noquotes][noquotes]
[pass] Read attribute with entity value '>'. [>][>]
[pass] Error row [3][3]
[pass] Error column [17][17]

** Streaming. **
[pass] Stream round trip correct.
[pass] String printing correct.
[pass] Query attribute: int as double [0][0]
[pass] Query attribute: int as double [1][1]
[pass] Query attribute: double as double [2][2]
[pass] Query attribute: double as int [0][0]
[pass] Query attribute: double as int [2][2]
[pass] Query attribute: not a number [2][2]
[pass] Query attribute: does not exist [1][1]
[pass] Location tracking: Tab 8: room row [1][1]
[pass] Location tracking: Tab 8: room col [49][49]
[pass] Location tracking: Tab 8: doors row [1][1]
[pass] Location tracking: Tab 8: doors col [55][55]
[pass] Location tracking: Declaration row [1][1]
[pass] Location tracking: Declaration col [5][5]
[pass] Location tracking: room row [1][1]
[pass] Location tracking: room col [45][45]
[pass] Location tracking: doors row [1][1]
[pass] Location tracking: doors col [51][51]
[pass] Location tracking: Comment row [2][2]
[pass] Location tracking: Comment col [3][3]
[pass] Location tracking: text row [3][3]
[pass] Location tracking: text col [24][24]
[pass] Location tracking: door0 row [3][3]
[pass] Location tracking: door0 col [5][5]
[pass] Location tracking: door1 row [4][4]
[pass] Location tracking: door1 col [5][5]

** UTF-8 **
WARNING: File 'utf8test.xml' not found.
(Are you running the test from the wrong directory?)
Could not test UTF-8 functionality.

** Copy and Assignment **
[pass] Copy/Assign: element copy #1. [element][element]
[pass] Copy/Assign: element copy #2. [value][value]
[pass] Copy/Assign: element assign #1. [element][element]
[pass] Copy/Assign: element assign #2. [value][value]
[pass] Copy/Assign: element assign #3. [1][1]
[pass] Copy/Assign: comment copy. [comment][comment]
[pass] Copy/Assign: comment assign. [comment][comment]
[pass] Copy/Assign: unknown copy. [[unknown]][[unknown]]
[pass] Copy/Assign: unknown assign. [[unknown]][[unknown]]
[pass] Copy/Assign: text copy. [TextNode][TextNode]
[pass] Copy/Assign: text assign. [TextNode][TextNode]
[pass] Copy/Assign: declaration copy. [UTF-8][UTF-8]
[pass] Copy/Assign: text assign. [UTF-8][UTF-8]
[pass] Copy/Assign: document copy.
[pass] Copy/Assign: document assign.

** Parsing, no Condense Whitespace **
[pass] Condense white space OFF.
[pass] GetText() normal use. [This is text][This is text]
[pass] GetText() contained element. [1][1]
[pass] GetText() partial. [This is ][This is ]
<xmlElement>
    <![CDATA[I am > the rules!
...since I make symbolic puns]]>
</xmlElement>
[pass] CDATA parse.
[pass] CDATA stream.
[pass] CDATA copy.
[pass] CDATA with all bytes #1.
[pass] CDATA with all bytes #2.
<xmlElement>
    <![CDATA[<b>I am > the rules!</b>
...since I make symbolic puns]]>
</xmlElement>
[pass] CDATA parse. [ 1480107 ]
[pass] CDATA stream. [ 1480107 ]
[pass] CDATA copy. [ 1480107 ]

** Fuzzing... **
** Fuzzing Complete. **

** Bug regression tests **
[pass] Test InsertBeforeChild on empty node. [1][1]
[pass] Test InsertAfterChild on empty node.  [1][1]
[pass] Entity transformation: read. 
[pass] Entity transformation: write. 
[pass] dot in element attributes and names [0][0]
[pass] Entity with one digit. [1][1]
[pass] Entity with one digit. [1.1 Start easy ignore fin thickness
][1.1 Start easy ignore fin thickness
]
[pass] Correct value of unknown. [!DOCTYPE PLAY SYSTEM 'play.dtd'][!DOCTYPE PLAY SYSTEM 'play.dtd']
[pass] Correct streaming of unknown. [<!ELEMENT title (#PCDATA)>][<!ELEMENT title (#PCDATA)>]
[pass] Comment formatting. [ Somewhat<evil> ][ Somewhat<evil> ]
[pass] Comment streaming. [<!-- Somewhat<evil> -->][<!-- Somewhat<evil> -->]
[pass] White space kept. [ This has leading and trailing space ][ This has leading and trailing space ]
[pass] White space kept. [This has  internal space][This has  internal space]
[pass] White space kept. [ This has leading, trailing, and  internal space ][ This has leading, trailing, and  internal space ]
[pass] White space condensed. [This has leading and trailing space][This has leading and trailing space]
[pass] White space condensed. [This has internal space][This has internal space]
[pass] White space condensed. [This has leading, trailing, and internal space][This has leading, trailing, and internal space]
[pass] Parsing repeated attributes. [0][0]
[pass] Parsing repeated attributes. [blue][blue]
[pass] Embedded null throws error. [1][1]
[pass] Embedded null throws error. [1][1]
[pass] ISO-8859-1 Parsing. [C�nt�nt�������][C�nt�nt�������]
[pass] Empty document error TIXML_ERROR_DOCUMENT_EMPTY [13][13]
[pass] Test safe error return. [0][0]
[pass] Low entities. [][]
<test>&#x0E;</test>
[pass] Throw error with bad end quotes. [1][1]
[pass] QueryValueAttribute [0][0]
[pass] QueryValueAttribute [0][0]
[pass] QueryValueAttribute [0][0]
[pass] QueryValueAttribute [2][2]
[pass] QueryValueAttribute [1][1]
[pass] QueryValueAttribute [1][1]
[pass] QueryValueAttribute [1][1]
[pass] QueryValueAttribute [1][1]
[pass] Attribute [0][0]
[pass] Attribute [1][1]
[pass] Attribute [1][1]
[pass] Document only at top level. [1][1]
[pass] Document only at top level. [16][16]
[pass] Missing end tag at end of input [1][1]
[pass] Missing end tag with trailing whitespace [1][1]
[pass] Comments ignore entities.
[pass] Comments ignore entities.
[pass] Comments ignore entities.
[pass] Comments ignore entities.

Pass 119, Fail 0
Program ended with exit code: 0
MengeCrowdSim commented 7 years ago

My mind is blown on what would be causing this. THe XML files involved are:

https://github.com/MengeCrowdSim/Menge/blob/master/examples/core/headon.xml https://github.com/MengeCrowdSim/Menge/blob/master/examples/core/headon/headonB.xml https://github.com/MengeCrowdSim/Menge/blob/master/examples/core/headon/headonS.xml https://github.com/MengeCrowdSim/Menge/blob/master/examples/core/headon/headonV.xml

These XML files contain none of the XML displayed in the output and tinyxml has never printed that kind of verbose feedback on parsing in our experience.

From our perspective, this is completely untestable. Something locally on the machine must be really messed up.

chraibi commented 7 years ago

Just to tell that this problem did not disappear after upgrading to Sierra.

Maybe another Mac user can check..

russgayle commented 7 years ago

Yeah, this happened to me too. There's a int main() in Menge/tinyxml/xmltest.cpp that's getting called. I believe it's getting pulled in via libmengeCore.dylib (and, it's a valid entry point). You can either have cmake disregard this file or likely delete it completely. (I never looked into why this main() is getting called rather than the one in mengeMain)