"A new guard page for the stack cannot be created" Error & Crash - One Possible Fix
Just putting this out there:
I got the "A new guard page for the stack cannot be created" error when I got a wanted level. It was instant, one star, one crash
I had been working on changing how the dispatch works so knew it had something to do with that but had changed MANY files.
I googled http://bfy.tw/F8da but didn't find anything of use so decided to have a mess around with the files I had been working on.
Turns out it was a syntax error in one of the handling.meta files I had been working on.
<Item type="NULL" /> <Item type="NULL" /> </SubHandlingData> </Item> </Item> <Item type="CHandlingData"> <handlingName>ADDER</handlingName> <fMass value="1800.000000" /> <fInitialDragCoeff value="7.800000" /> <fPercentSubmerged value="85.00000
Notice the second </Item>, it should NOT be there. Given the research I had done online, no way did I expect THAT to be the fix but sure enough the game works perfectly with the correct syntax & when I put the second </Item> back in the file & loaded the game, one star, one crash again.
The easiest way to look for syntax errors like this in a file is using Notepad++ (https://notepad-plus-plus.org/download/v7.5.1.html) & it's XML Tools Plugin (https://sourceforge.net/projects/npp-plugins/files/XML Tools/).
Once you install Notepad++ & then install the XML Tools plugin (instructions in download above), you open the file/s with Notepad++ & go to 'Plugins' > 'XML Tools' > 'Check xml syntax now' & this will highlight any errors it finds. It will point you in the right direction anyway, it does help to know a little about how syntax works. Think of it like different parts sectioned off in their own brackets. They need to start & they need to finish.
Example of correct syntax:
(Main thing here opening
(some stuff here)
(some other stuff here(with a little bit here))
Main thing here closing)
That's the very basics anyway.
So if you get this error, it's definitely worth checking syntax before reinstalling your mods folder/game. Get into the game files using OpenIV (http://openiv.com/), search for any newly installed/changed files that may have had errors sneak into them, extract them & check with XML Tools.
Hope it helps, best of luck.
@JonaQ Very useful tutorial, as I am constantly making edits to various files myself. Never encountered this error before, but now I will know where to look to get to the root of the matter.
Thanks, I try to document everything I find. I very much believe in an open-source community that documents & shares information freely being the best thing for modding.
Ah. Actually never seen this particular msg just yet.
If eg you skip a closing statement in handling.meta the game just simply crashes with a generic error msg
@JonaQ DUDE!!!! I revisited this topic because I too had lately been getting this same crash/same error. It turns out after validating XML with notepad++, it found a single syntax error - very first line had a couple spaces before it - <?xml version="1.0" encoding="UTF-8"?> so I pilled it over all the way to the left, and saved! I just knew someday this would come handy.
@JonaQ My game is having this issue even after removing my mods folder I tried to repair the install but nothing works the method you've provided is way too complex for an idiot like me
@SLY95ZER remove any scripts
@Reacon Done that still nothing