We-the-People-civ4col-mod / Mod

This is the repository where the mod resides.
90 stars 37 forks source link

Memory allocation failure and graphical issues #1040

Open andushow opened 3 months ago

andushow commented 3 months ago

Game is unplayable. Specs: Windows 11 running on i9-13th Gen, 32 GB RAM, RTX 4080, playing WTP 4.1 (most recently published version: since 2023.10 no news updates tough). Saving the game, loading it: after 6-9 successful game loads, it fails with this message. image

Map is "Americas Gigantic".

Nightinggale commented 3 months ago

Saving the game, loading it: after 6-9 successful game loads, it fails with this message.

Does this mean that you encounter this issue only if you reload many times or is it something, which happens once in a while or is it something, which makes it hard or impossible to play?

andushow commented 3 months ago

The issue appears when I reload the savegame after (not so many times) 5-6 times, hence the saving, to make sure I don't lose some progress when (not if!) the game crashes. It looks like GC fault to me. The only workaround I have so far is to "accept" the error and start the game exe anew.

andushow commented 3 months ago

Sample graphic glitch (happening before the "memory allocation" error, actual gameplay: image

Nightinggale commented 3 months ago

I have a few ideas of what might be wrong:

andushow commented 3 months ago

(1) Updated the graphics driver to the most recent version. (2) Steam thingy does not apply to me, I'm using a standalone installation. (3) Updated the BIOS and Intel Management Engine (released 02/08/2024). Game still fails, sometimes silently. I turned ON debugging (CivilizationIV.ini - parameters values set to 1: GenerateCrashDumps, LoggingEnabled, MessageLog). Once I encountered the same "memory allocation failure", a dump file was created (2GB size). I attach the full log files - something interesting in LSystem.log at the end. Logs.zip

Nightinggale commented 3 months ago

3) Updated the BIOS and Intel Management Engine (released 02/08/2024). Game still fails, sometimes silently.

0x129 came out on the 9th, so you haven't updated. See Intel's annoucement. Also if the CPU had crashes prior to updating, then the CPU is already dead. It's something with over voltage on the data bus or something like that and it actually kills part of the CPU and once the hardware is dead, no amount of software or firmware updates can fix it. You should probably look into RMA under the extended warranty.

Also I checked the log. Whatever is going on, the game decided to not mentioning it in the log, so it's useless for this issue.

It's also worth adding that this is the first time I see this problem. Colonization was last patched in 2009 (so 15 years ago) so we pretty much know the critical bugs by now. The last screenshot strongly indicates a problem with something mods can't affect.

andushow commented 3 months ago

For what is worth, I own a laptop, so I'm not affected by the RaportLake Intel desktop CPU voltage issue.

MrZorG33 commented 3 months ago

In that case, I will close this question.

andushow commented 3 months ago

why close it ?

Nightinggale commented 3 months ago

I disagree with closing. Right now it seems nobody has a clue to what has gone wrong meaning it's still a valid bug report. I'm still not sure it's caused by the mod through. Seems like an engine level issue.

MrZorG33 commented 3 months ago

The problem is not in the fashion, but in the processor, as far as I understand from the correspondence.

and there is no need to open new tasks if you do not agree. You can re-open the old one. don't spam.

well, if @Nightinggale is sure that the question should be open, let's open it again. and close the new one that was created. there is no need to create many similar tasks.

Nightinggale commented 3 months ago

The problem is not in the fashion, but in the processor, as far as I understand from the correspondence.

The processor is only to blame in desktop CPUs, not mobile. That is unless the Intel issue is affecting mobile too, but Intel isn't admitting that part.

It would be worth testing if unmodded Colonization works as well as other DirectX 9 games just to be sure that the issue is actually specific to the mod.

MrZorG33 commented 3 months ago

Unfortunately, my laptop has a Tiger Lake processor and I can't help because I haven't seen any such problems. for now)

andushow commented 3 months ago

New error message, hope it's more useful to troubleshoot: image

andushow commented 3 months ago

For info, these are the graphic settings causing "bad allocation" image

MrZorG33 commented 3 months ago

hmm.. it seems that I have already seen a similar problem somewhere. and Win11 was also installed. I'll try to look for this information in the chat of my group.

MrZorG33 commented 3 months ago

I haven't found what I started looking for yet. but I found a message about the same error dated May 23, 2023 (mod version 4.0.2). Most likely, this was written about in the work chat and it’s not a fact that this correspondence will be found... but the fact is: the game was played for a very long time (almost a whole day), there were a lot of saves and loadings of saved games. image

Nightinggale commented 3 months ago

the game was played for a very long time (almost a whole day), there were a lot of saves and loadings of saved games.

That sounds like memory fragmentation and is something we can't really avoid. The fix for that is using a 64 bit application, but we can't change the exe, so we just have to accept that the game is unlikely to be able to run for days without being restarted. Ok technically there are coding solutions to reduce this problem, but they are far from trivial.

However memory fragmentation can't explain memory allocation errors at startup. This is a different problem. I haven't seen reports of windows 11 issues, but I suppose you can try to set some compatibility mode, through I think it was windows 8 compatibility mode, which has been reported to causing issues.

New error message, hope it's more useful to troubleshoot

That refers to a source code, which is compiled into the exe file. In other words we don't know what it contains and we can't fix any bugs in it. We do however know that it has been unchanged since at least 2009 and this seems to be a new problem. It does however mention 3D textures, so the errors are consistent with 3D graphics.

You could try to delete the mod entirely and download it again, possibly also reinstalling Colonization itself. That way if there is a corrupted graphics file somewhere, it should get fixed.

grandgeorgegg commented 2 months ago

I had the same error. I already followed all the requirements you described but the error keeps coming up. I have already played 4 games, but errors do not allow me to finish playing even on a normal map.

andushow commented 2 months ago

Maybe it's high time to finally admit that - despite bringing new features and interesting concepts - the new MOD paired with an old, python-based game engine has reached its limit and a new game engine is needed to play such complex mechanics. I, for one, have stopped playing it. It's time to move on, as much as I enjoyed the game released way back in 2008.

grandgeorgegg commented 2 months ago

I tried running the game in Windows Vista compatibility mode, that helped a bit, but now I can't get rid of the first screen that says "Sid Meyers Civilization 4 Colonization" with a loading progress bar. Then launched in full screen mode at a resolution of 1920*1080. And finished the move successfully!!! Will I be able to finish at least one game!? :)

Nightinggale commented 2 months ago

I wonder if windows 11 is the issue. People have complained about low frame rate on the steam forum, also pointing to windows 11. I'm still on windows 10 and have never seen any such issues.

I can't get rid of the first screen that says "Sid Meyers Civilization 4 Colonization" with a loading progress bar. Then launched in full screen mode at a resolution of 1920*1080. And finished the move successfully!!!

I wonder if it tried to make a window, which is bigger than the screen resolution. You can edit the ini file and write whatever resolution you want in window mode. 1000x800 should work just fine. I mean it will likely look odd, but the game shouldn't reject it.

grandgeorgegg commented 2 months ago

Now I continue the game and everything looks like before. I don't see any problems, except for "pixel artifacts" in the upper part of the Europe F2 screen. (I have Windows 11)

Nightinggale commented 2 months ago

Pixel artifacts?

grandgeorgegg commented 2 months ago

Pixel artifacts? image

grandgeorgegg commented 2 months ago

image

Nightinggale commented 2 months ago

Never seen that before. The file GameFont.tga contains custom characters like the pile of money after the amount of money owned in the top left. Why the game would display the entire file as the background on this screen is beyond me. Seems really weird.

At least it's not a game stopping issue, but ideally it should be fixed.... if possible.

MrZorG33 commented 2 months ago

@grandgeorgegg try playing with different screen resolutions.

Atom735 commented 1 month ago

I encountered a similar problem with a crash due to multiple loading in Civilization 4, in all versions, not just colonization... (definitely in BTS with the DoC mod) But I didn't catch any graphical problems...

grandgeorgegg commented 1 month ago

I can offer my solution to the problem:

  1. Roll back the version in Steam as the authors of the mod say.
  2. Specify the screen resolution of 1024 by 768 in the configuration file. Save the configuration file.
  3. Switch the compatibility mode for all .exe files of the game for Windows Vista.
  4. Launch the game via Steam, wait for the game to load, then switch the screen resolution in the settings to the one you like (you will have to do this after each launch).
  5. Play.

PS. With these settings I was able to get to 2087 on a large map with the mod and no issues.