Eador. Masters of the Broken World

Eador. Masters of the Broken World

View Stats:
LightnIn Jun 13, 2021 @ 3:57am
"Access Violation" error and the memory usage
I have noticed that when MotBW uses more than 1.6GB memory, then "Access Violation" error will appear.
When I started a new shard, the game used 500Mb+ memory and I could play several hours without the error. But when I reloaded a save which had been played for 500+ turns, the initial memory usage was 1.3GB+, I got the error soon.
I also play Sacred2 and it has a similar memory leak issue, when the game hits the 1.5GB limit, it crashes.
Last edited by LightnIn; Jun 13, 2021 @ 4:39am
< >
Showing 1-11 of 11 comments
LightnIn Jun 13, 2021 @ 4:14am 
I believe a part of the code was rewritten in Eador Imperium. It manages memory in a more effective way. The game only ate 600MB+ when I reloaded a save which had been played for 400+ turns, and the memory increased more slowly than that of MotBW. So I almost never got the "Access Violation" error, I guess because it will take days to reach the 1.6GB threshold.
But Imperium has tons of other issues so I think MotBW is a better game especially with Jagulars's fixes.

I hope the devs could fix it someday, they can do it in Imperium, then they can also fix the error in MotBW if they like.
Last edited by LightnIn; Jun 13, 2021 @ 4:40am
Jagulars Jun 13, 2021 @ 4:50am 
The amount of memory used largely depends on the size of the map and progress made as most memory is used by game objects. Pretty much everything you see is a separate game object. More game objects = more memory usage.

Also, try to reload a save, see how much memory is consumed, then reload it again. You'll probably see that on the second reload, more memory is used even though everything should be identical. Also, players seem to report less Access Violations when they reload less. It's possible that there's something wrong with the loading code, which would be unfortunate because it is engine code, and apparently even Snowbird does not have access to the engine's source code.

It's also possible that the errors are caused by generally faulty memory management. Every time you open an interface window, construct a building, enter a battle or shoot an arrow, new objects are created. And when you close that window, destroy the building, finish the battle or watch the arrow reach its target, those objects are deleted, and removed from memory. If, for whatever reason, that memory is not allocated or deallocated correctly, it will eventually cause Access Violation. To test this, I've been working on a workaround that would minimize the creation and destruction of objects by storing and reusing them whenever they're needed or not needed. This is, however, an enormous task, involving hundreds of game script files. We will see how it works out.
Last edited by Jagulars; Jun 13, 2021 @ 5:31am
LightnIn Jun 13, 2021 @ 7:44am 
Originally posted by Jagulars:
The amount of memory used largely depends on the size of the map and progress made as most memory is used by game objects. Pretty much everything you see is a separate game object. More game objects = more memory usage.

Also, try to reload a save, see how much memory is consumed, then reload it again. You'll probably see that on the second reload, more memory is used even though everything should be identical. Also, players seem to report less Access Violations when they reload less. It's possible that there's something wrong with the loading code, which would be unfortunate because it is engine code, and apparently even Snowbird does not have access to the engine's source code.

It's also possible that the errors are caused by generally faulty memory management. Every time you open an interface window, construct a building, enter a battle or shoot an arrow, new objects are created. And when you close that window, destroy the building, finish the battle or watch the arrow reach its target, those objects are deleted, and removed from memory. If, for whatever reason, that memory is not allocated or deallocated correctly, it will eventually cause Access Violation. To test this, I've been working on a workaround that would minimize the creation and destruction of objects by storing and reusing them whenever they're needed or not needed. This is, however, an enormous task, involving hundreds of game script files. We will see how it works out.

Yeah, there is also something wrong with the loading code.
I believe that the game cannot clean up loaded resource in time and properly either on reloading or normal playing is a very possible reason which causes the error. Eador is a 32-bit game and it cannot handle more than 2GB memory in theory, 1.6GB in fact.

Your mod and fixes are highly appreciated, the devs should pay your awesome work!
Last edited by LightnIn; Jun 13, 2021 @ 7:45am
Jagulars Jun 13, 2021 @ 8:00am 
Any compensation would be much appreciated but judging from the latest blog post, the devs are currently too tight on money. Let's hope the new Eador game will be successful. Either way, I'm happy that they're still maintaining the official multiplayer server.
Last edited by Jagulars; Jun 13, 2021 @ 8:03am
wolfypagan74 Jun 14, 2021 @ 3:02pm 
I'm personally getting tired of building my world, finally collecting the buildings to make my mage worth a damn, and then it just doesn't want to load.... someone needs to fix it then! As it stands the game is unplayable.... this is how something ends up being uninstalled from a hard drive...
General Frost Jun 16, 2021 @ 4:42pm 
Originally posted by wolfypagan74:
I'm personally getting tired of building my world, finally collecting the buildings to make my mage worth a damn, and then it just doesn't want to load.... someone needs to fix it then! As it stands the game is unplayable.... this is how something ends up being uninstalled from a hard drive...
Yeah its ridiculous that somehow they got away with making a new game and leaving this one a buggy mess to then leave that next one a buggy mess to start another. They really need to fix these games if they want fans to hold confidence that the new one would be good or if they will even fix the bugs or just move on again.

I have the first one which apparently had bugs to but has the new horizon mod which fixes a bunch and is at least playable with minimal issue. Was eye balling the two 3d games but after finding out that BOTH have game breaking bugs that happen to pretty much everyone i lost interest. I see that Jagulars is trying to fix this game but it still has the bug mentioned in this post which to me sounds game breaking even if you can just do something different and then pray it works. I like to concept and systems of this 4x game but i have zero confidence that the devs will pull anything together in the future and hearing they lack funding does not help.
Hlalakar Jun 16, 2021 @ 11:32pm 
I love what I can play of MotBW, but it's too broken to finish the campaign or even just a single large map. I'm not going to buy their new game if they won't even finish their old ones.
LightnIn Jun 17, 2021 @ 1:29am 
It seems there are still many people playing Eador. I'm also not interested in the new game.
Regardless of the remaining game breaking bugs, I'm not impressed by their talent at all. 90% of the new units in Imperium are lazily and poorly designed, from the portraits to the skills, and most of the changes they made only hurt the gameplay.
Last edited by LightnIn; Jun 17, 2021 @ 1:34am
Jagulars Jun 17, 2021 @ 1:54am 
Most of the changes made that deviated from Bokulev's design in Genesis actually hurt the balance of the game. They have, however, replaced the development team after Imperium..
LightnIn Jun 17, 2021 @ 2:03am 
Originally posted by Jagulars:
Most of the changes made that deviated from Bokulev's design in Genesis actually hurt the balance of the game. They have, however, replaced the development team after Imperium..

Glad to hear.
Eador Genesis is a masterpiece.
Jagulars Jun 17, 2021 @ 2:04am 
I agree. Bokulev is a genius.

Check out his Steam Workshop: https://steamcommunity.com/profiles/76561198035603355

He has made some high-quality mods for other games.
Last edited by Jagulars; Jun 17, 2021 @ 2:05am
< >
Showing 1-11 of 11 comments
Per page: 1530 50