LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
289 stars 160 forks source link

Memory issues and CTD link and display problems possibily due to memory #10848

Closed cidk2000 closed 5 months ago

cidk2000 commented 6 months ago

1. Mod Version (X.Y.Z). Current Version: 4.7.1

Vox Populi 4.7.1

2. DirectX Version

DX11

3. List of Other Mods

None

4. Describe the Issue

extra CTDS including the usual science screen now a lot from city screen and not enough memory always late game

small 6 players 12 city states communitas map (mostly set to random on settings)


5. Save Game From 1 Turn Before (ALWAYS ATTACH THIS IF POSSIBLE)

AutoSave_0367 AD-1947.zip

selecting a city to add International space station show Out of Memory on other Buildings

_6. Logs (ALWAYS ATTACH THESE IF PO

Logs.zip

7. CvMiniDump.dmp File (ATTACH IF REPORTING A GAME CRASH)

CvMiniDump.zip

8. Steps to reproduce the Issue (Optional)

CTD can occur from science screen/city or attempting to load a menu screen to either save

9. Screenshots of the Issue (Optional) error - from older game without logging new city from older game but without extra items in the build queue wierd issue this is from the uploaded latest game before a ctd the recycling centre has been invested and tried to add the international space station to the queue but nothing displays - display error

cidk2000 commented 6 months ago

additionally highlighting too many tooltips either too quickly or by reading too many can cause the Out of Memory Message on the city screen i didn't hang around on the city screen selecting and now Ive moved turn this has now happened at exactly the same place on both games prev game was on 4.6

*edit another crash to desktop a few turns later adding and investing those powerplants (14:19 -BST) caused a ctd after cycling through the city screen. Last 6 or so entries in the LUA log Memory Allocation Error

Log2.zip CvMiniDump.zip

cidk2000 commented 6 months ago

Debugging the Minidump using Microsoft tools Below is an excerpt: STACK_TEXT:
00000000 00000000 heap_corruption!CivilizationV_DX11.exe+0x0

STACK_COMMAND: Pseudo Context ManagedPseudo Value: ffffffff ; kb

SYMBOL_NAME: heap_corruption!CivilizationV_DX11.exe

MODULE_NAME: heap_corruption

IMAGE_NAME: heap_corruption

FAILURE_BUCKET_ID: HEAP_CORRUPTION_c0000005_heap_corruption!CivilizationV_DX11.exe

OSPLATFORM_TYPE: x86

OSNAME: Windows 8

FAILURE_ID_HASH: {cad8b1e0-94b6-1097-9c81-df67d77d66a5}

Followup: MachineOwner

axatin commented 6 months ago

See here: https://forums.civfanatics.com/threads/new-version-4-7-1-april-25-2024.689478/post-16598238

cidk2000 commented 6 months ago

i dont get early game crashes at all its always late game ive played about 5-6 games of the 4.6-4.7 and its always late game

azum4roll commented 6 months ago

I think there's a memory leak for the highlight function or something?

cidk2000 commented 6 months ago

this may be extra information that may or may not be relevant but im playing the game past the win and the 2050 mark (i won by conquest) but im not getting any ctd related to that particular issue its when im playing at that particular time (perhaps when the game is most demanding) late game with multiple ai,

still going into city screen to invest and build all buildings still no ctd i have noticed one or two wobbles in the buiilding queue often items are missing but pulling out the city screen quickly and waiting a moment or two (moving around the map/issue order) and returning to the city screen the building queue looks normal

theres 49 cities on the screen and lots of automation im expecting a ctd but its very solid so far (small map communitas)

RecursiveVision commented 6 months ago

Not really something we can fix.

cidk2000 commented 6 months ago

this occurs during play and I can reproduce it. I don't have this issue during vanilla its exactly when it comes to building Powerplants at alternative energy during a game, screenshots above

@Nu-Illasera - HW isnt an issue and the game is limited to 32-bit addressing as i have the latest AM5 Hardware and 6000 series graphics

@RecursiveVision thats disappointing considering this affects VP specifically not the EXE in my opinion

axatin commented 6 months ago

@cidk2000 please test if the issues also exists in the non-EUI version

cidk2000 commented 6 months ago

@axatin - will use non eui from the installer (ive just seen a new release so ill remove civ 5 from steam and reinstall and report back)

@Nu-Illasera thanks but as i said Hardware isnt an issue here i far exceed the requirements and the base civ 5 game does not crash at all

But just for reference AMD 7900X 12 core, 64GB RAM, 6700xt 12GB Vram NVME 1TB samsung 980evo board is: Asrock 670E PG Win 11 Pro

Pagefile is set automatically currently allocated 4GB

cidk2000 commented 6 months ago

@axatin issue is not present non-EUI version game played with no ctd i was in and out of the science screen city screens constantly

in fact i had no niggles at all with the game ZERO crashes. The EUI version is really buggy in comparison

azum4roll commented 6 months ago

It's something called by CityView.lua, or CityView.lua itself being too memory inefficient.

azum4roll commented 6 months ago

CvCity::GetPlotsBoostedByBuilding() creates four new sets on every call, but never deletes them.

Neither is the std::vector<int> aiPlotList created in CvLuaCity::lGetPlotsBoostedByBuilding().

They do add up to the memory used, I think.

EDIT: No it's not this; std containers do get cleaned up after they go out of scope.

cidk2000 commented 6 months ago

just seen an issue on non eui dont know if its linked at all w1

im meant to be building a wind power plant at murmansk but its showing SS Engine 1,180.9 production a turn 7 turns the city yakutks is building it buildw2 Catherine_0406 AD-1986.zip

uploaded another save log folder is too large to send breaking it up Lua.zip - contains all but below BuilderTaskingYieldLog.zip