Memory Allocation Failured

Interesting. I'm also having a MAF, I'm playing on the Ultimate Earth Map and SVN updated earlier this week. Now I know that the UEM is just a massive map that had MAF issues before around late medieval era, but I'm currently barely at the ancient era and I'm getting a very consistent MAF error. I recall playing larger size savegames, and later era games, without any MAF issues on this same machine, so something feels off software side. I've tried deleting the cache and updating SVN, also patched the BTS exe to use 4GB RAM, but that didn't help; recalculating gives a MAF error too.
Tried your save, did the recalc and used AI autoplay for 50 turns, after that I messed around with the interface for a while and moved the camera fast around, I also played three turns manually without minimize AI turns and quick combat + show enemy moves. As I though perhaps having the camera move around while AI is doing their turn could be a factor that the graphical paging system didn't cope well with.
I had no MAF's for those 53 turns. RAM usage went between 1.8 to 2.2 GB and VRAM usage was quite steady at 1.8 GB.

Are you on a laptop? How much VRAM do you have?
 

Attachments

Currently I'm playing on a laptop with a i7 7700HQ, 16GB of RAM and a 4GB VRAM GTX 1050, I'm really not too sure what is the issue. I feel like I really shouldn't get a MAF here. I also went and expanded the memory paging since it was limited to 200MB (I set it between 4GB and 8GB), but I still get MAFs every other turn at most. Could there be a BUG setting doing this? I'm not using viewports, animations are not frozen, global building view is disabled, quick movement and quick combat is enabled...
 
Currently I'm playing on a laptop with a i7 7700HQ, 16GB of RAM and a 4GB VRAM GTX 1050, I'm really not too sure what is the issue. I feel like I really shouldn't get a MAF here. I also went and expanded the memory paging since it was limited to 200MB (I set it between 4GB and 8GB), but I still get MAFs every other turn at most. Could there be a BUG setting doing this? I'm not using viewports, animations are not frozen, global building view is disabled, quick movement and quick combat is enabled...
The hardware is not the problem then. You shouldn't mess with the paging values in global xml btw.

You're on windows 10 without using any compatibility modes?
Playing on steam with beta version enabled? GoG, physical CD version?
Playing fullscreen or windowed?

Hmm, you're on SVN so youre using the finalRelease version of our dll, perhaps that has something to do with it.
I tested your save on a regular release dll with less optimizations; I'll attach the regular release dll, report back if it makes a difference please.
 

Attachments

Ah, I changed the Windows system pagefyle size, not the game's graphics paging one. I checked again with resource monitor superimposed on screen, my RAM usage was about 2GB, VRAM usage was about 0,7GB, and yet I got an error again. This time the error message was not the basic Civ4 MAF error though, I took a screenshot. It says something along the lines of failed to allocate video memory, please reduce your graphics settings, and then some strings about a DX9 file. But VRAM was barely at 0,7/4,0GB when this happened. I also double checked that the game is running on the dedicated Nvidia GPU and not the integrated Intel one, just in case.

To your questions, I'm playing on Steam with the beta version enabled; Windows 10 without any compatibility modes; fullscreen mode is enabled in the game graphics settings. Windows' own full screen mode optimization is enabled by default as well.

I'll test using this DLL now. Thank you for looking into this by the way :)
 

Attachments

  • error 2020-07-16 214924.jpg
    error 2020-07-16 214924.jpg
    583.8 KB · Views: 100
To your questions, I'm playing on Steam with the beta version enabled; Windows 10 without any compatibility modes; fullscreen mode is enabled in the game graphics settings. Windows' own full screen mode optimization is enabled by default as well.
All ok there, though I've no idea what the windows fullscreen optimization is about, probably harmless though.

0.7 GB VRAM... Right, my system was eating up a full gig in background usage while I tested.
 
Seems hopeless at the moment, still getting the error reliably using this dll. Just in case, I updated the GPU drivers, then I updated to the very latest SVN (properly of course) since I was two commits behind, I deleted the Civ cache folder again as well, but both with this this dll and the new one, the MAFs are still happening. Now I haven't seen that DX9 error again, just the standard CIV4 bad memory allocation error. I wouldn't be bothered too much either by this if not for the fact that I've played this mod just fine on this PC for years, I think I hadn't seen a MAF error since 2016 or so. I'm at my wits' end here :hammer2:
 
Seems hopeless at the moment, still getting the error reliably using this dll. Just in case, I updated the GPU drivers, then I updated to the very latest SVN (properly of course) since I was two commits behind, I deleted the Civ cache folder again as well, but both with this this dll and the new one, the MAFs are still happening. Now I haven't seen that DX9 error again, just the standard CIV4 bad memory allocation error. I wouldn't be bothered too much either by this if not for the fact that I've played this mod just fine on this PC for years, I think I hadn't seen a MAF error since 2016 or so. I'm at my wits' end here :hammer2:
Try running the directX runtime installer... https://www.microsoft.com/en-us/download/details.aspx?id=35
Other than that, I'm out of ideas.
 
I've learned to accept the MAFs and random closures of the game. I was told before it was nothing to worry about but now that he complains it is something to worry about.
 
I've learned to accept the MAFs and random closures of the game. I was told before it was nothing to worry about but now that he complains it is something to worry about.
Once in a while we have to look into wheter our MAF issues are getting worse or better, meaning looking into specific cases where systems can be compared and discussed, difference in experience and such.
But you're right, MAF's are to be expected and accepted with the terribly dated and closed source BtS engine.
He is on the enourmous UEM scenario, so MAF's there is not strange really.

The reason I suddenly took an interest today was actually your statement that you regularly get MAF on duel size maps with only two AI's...
I would think it should be pretty rare on that type of games...
 
I had tried that already actually, as well as the NET.framework installer, they both refuse to do anything because an equivalent or newer version is already installed. I remember these installers used to also verify and repair an existing installation but apparently that options isn't there anymore... sadly. I had also verified the game install in Steam. At this point I would consider a full game reinstall next... perhaps tomorrow I'll give that a shot.
 
I've been getting MAFs for a while now, I stopped reporting them. Now I keep getting closed to desktop. No error messages just crash to desktop.
 
Very repeatable, every time I try to turn a certain subdued animal into culture it crashes.
 
Here's the save, its the stellar sea eagle. Sorry for possible misspelling. I tried skipping its turn, that didn't working. So I had to delete it.
 

Attachments

Here's the save, its the stellar sea eagle. Sorry for possible misspelling. I tried skipping its turn, that didn't working. So I had to delete it.
Ok, CTD fixed and on its way to SVN now. Was a strange one, this code hasn't been changed in a long time, strange that it suddenly caused CTD's.
My theory is that perhaps general code perfomance improvements have caused a timing issue here when units are consumed by a unit mission, the code seemed to think the unit was still selected after it was removed.
 
Ok, CTD fixed and on its way to SVN now. Was a strange one, this code hasn't been changed in a long time, strange that it suddenly caused CTD's.
My theory is that perhaps general code perfomance improvements have caused a timing issue here when units are consumed by a unit mission, the code seemed to think the unit was still selected after it was removed.
I used to struggle a lot with ghosts in the system like this. Never did make much headway in figuring them out but guys like Alberts2 and Billw often found cures. Used to happen a lot during loops where something would be deleted during the loop and screw up when then referenced later before the loop was finished.
 
Unfortunately now I have a MAF every turn :sad:

Save svn 11199 are not compatible with current svn? If the problem is not in the computer, wait fix?

I started the current game in April 2019. It's a pity stop her :gripe:
 
You started in April 2019 and could continue with current SVN revisions until now? Rev 11132 (V40.1.1846) broke save compatibility and that was on March 18 2020.
 
Back
Top Bottom