Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash when using a 'less than' sign within the unitDied section of scenario xml #266

Open
andy5995 opened this issue Mar 14, 2023 · 0 comments

Comments

@andy5995
Copy link
Contributor

If using a less than sign (<) within the unitDied section of scenario xml, MG crashes when attempting to load the scenario.

I encountered this bug while working on a custom scenario, then confirmed it by altering L173 of the Amazones Pro scenario by swapping the sign ('elseif enemyCount<=3 then`)

$ ./MegaGlest-x86_64.AppImage 
MegaGlest-x86_64.AppImage v3.13-dev
Compiled using: GNUC: 70500 [64bit] platform: Linux-X64 endianness: little
GIT: [Rev: $5608.a3c8464$] - using STREFLOP [SSE] - [no-denormals]
*ERROR* [2023-03-14 11:37:42] In [window.cpp::handleEvent Line: 485] (a2) Couldn't process event: [Error loading XML: /home/andy/.megaglest/scenarios/egypt_has_fallen/egypt_has_fallen.xml
Message: expected element name] codeLocation = h
Error saved to logfile [/home/andy/.megaglest/error.log]
*ERROR* [2023-03-14 11:37:42] In [/__w/megaglest-source/megaglest-source/source/glest_game/main/main.cpp::handleRuntimeError Line: 649] [Error loading XML: /home/andy/.megaglest/scenarios/egypt_has_fallen/egypt_has_fallen.xml
Message: expected element name
Stack Trace:
./MegaGlest-x86_64.AppImage:()address [0x556ab6c01a7c] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab6c11d89] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab67fb218] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab67ffd01] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab67ffefd] line: 0
/usr/lib/libc.so.6:()address [0x7f008363c790] line: 0
/usr/lib/libc.so.6:__libc_start_main()address [0x7f008363c84a] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab662efba] line: 0
] gameInitialized = 1, program = 0x556ab873cfe0
*ERROR* [2023-03-14 11:37:42] In [window.cpp::handleEvent Line: 485] (a2) Couldn't process event: [Error loading XML: /home/andy/.megaglest/scenarios/egypt_has_fallen/egypt_has_fallen.xml
Message: expected element name] codeLocation = h
terminate called after throwing an instance of 'Shared::Platform::megaglest_runtime_error'
  what():  Error loading XML: /home/andy/.megaglest/scenarios/egypt_has_fallen/egypt_has_fallen.xml
Message: expected element name
Stack Trace:
./MegaGlest-x86_64.AppImage:()address [0x556ab6c01a7c] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab6c11d89] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab67e7d1a] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab67e7fc4] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab67f55fd] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab67ffd01] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab67ffefd] line: 0
/usr/lib/libc.so.6:()address [0x7f008363c790] line: 0
/usr/lib/libc.so.6:__libc_start_main()address [0x7f008363c84a] line: 0
./MegaGlest-x86_64.AppImage:()address [0x556ab662efba] line: 0

Aborted (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant