Single Player bugs and crashes v40 plus (SVN) - After Oct 2019

Is anyone else running into a memory error in the city build menu? Sometimes when I select a building, a small window pops up saying something about a memory error. Clicking on it causes a CTD.

I'm assuming I just ran out of memory, but perhaps something else is afoot? I was going to use viewports, but they really mess up the graphics (for example, forests in water, fog of war where I have already been, and no city center or improvements in one city). I also set city centers to not show buildings on the map. Any other tips for this?
 
Is anyone else running into a memory error in the city build menu? Sometimes when I select a building, a small window pops up saying something about a memory error. Clicking on it causes a CTD.

I'm assuming I just ran out of memory, but perhaps something else is afoot? I was going to use viewports, but they really mess up the graphics (for example, forests in water, fog of war where I have already been, and no city center or improvements in one city). I also set city centers to not show buildings on the map. Any other tips for this?
How far into the game are you? How large a map? Is it saying it's a Memory Allocation Failure? Sometimes it will give a popup to say that when it happens and it's just a notification rather than anything you can avoid at that point - it's not causing the game to crash, just courteously telling you why it's now going to.
 
How far into the game are you? How large a map? Is it saying it's a Memory Allocation Failure? Sometimes it will give a popup to say that when it happens and it's just a notification rather than anything you can avoid at that point - it's not causing the game to crash, just courteously telling you why it's now going to.

I'm in the early renaissance, about 30% in a 4000 turn game. Large map... I've played further before in an earlier version with no problem, on the same size map. And yeah, it's a memory allocation error. I suppose "cause" wasn't a good word choice, but I meant one preceded the other. Regardless, I suppose it's time for a new game.

Any idea what's up with the viewport bugs? Is that a common experience?
 
I'm in the early renaissance, about 30% in a 4000 turn game. Large map... I've played further before in an earlier version with no problem, on the same size map. And yeah, it's a memory allocation error. I suppose "cause" wasn't a good word choice, but I meant one preceded the other. Regardless, I suppose it's time for a new game.

Any idea what's up with the viewport bugs? Is that a common experience?
Upload save.

Its very likely to get MAF if you play 5 - 10 hours continuously.
 
I'm in the early renaissance, about 30% in a 4000 turn game. Large map... I've played further before in an earlier version with no problem, on the same size map. And yeah, it's a memory allocation error. I suppose "cause" wasn't a good word choice, but I meant one preceded the other. Regardless, I suppose it's time for a new game.

Any idea what's up with the viewport bugs? Is that a common experience?
MAFs are unavoidable after a long period of play time but if you're having it happen regularly on a round after round basis, are you on the latest assets?

As for the viewport bugs, yes, it's still an issue that we somehow need to sort out before we can really advance to multimaps I think. It's a heightmap issue mostly though forests in water... sounds like there's some issues with feature graphics not resetting properly as well somehow.
 
MAFs are unavoidable after a long period of play time but if you're having it happen regularly on a round after round basis, are you on the latest assets?

As for the viewport bugs, yes, it's still an issue that we somehow need to sort out before we can really advance to multimaps I think. It's a heightmap issue mostly though forests in water... sounds like there's some issues with feature graphics not resetting properly as well somehow.

I just updated to recent svn, but the problem persists. I was not up to date earlier though.
 
Interesting. I would have to imagine that there would be a special case here for someone to see, some unit overload or something taking place that's very unusual that's eating up resources.
 
Volcanoes should not just disappear:mad:. I can find only one volcano on my map currently, Klyuchevskaya Sopka. I'd hope the other wonder ones are there somewhere, but I can't be sure. Volcanoes are needed for buildings and at least one wonder.

On my LEM Earth maps ( I am currently playing) tiles I have set to be active volcanoes do eventually disappear and give either Obsidian or Sulphur that you can collect. But they do reappear later in the game and then later disappear again etc. I have had this happen at least 4 times in my current game (now in early Renaisence,).

I am sure it does not apply to Natural Wonders. Though they can give the resource.
 
I got the same error just a few turns after loading the save.
That save takes 1100 MB on load, play on medium render quality and without high resolution textures.
Also enable memsaver in INI file in C:\Users\<USERNAME>\Documents\My Games\Beyond the Sword

Its not even 7000 tiles and map is mostly water.
Sounds like there is serious memory leak.

Got python assert:
Code:
File:        D:\Modstuff\Caveman2Cosmos_GIT\Sources\CvGlobals.cpp
Line:        3287
Expression:  stricmp(szType, "NONE")==0 || strcmp(szType, "")==0
====================================================================
MESSAGE:
---------------------------------------------------------------------------------------------------------------------------
info type 'NO_UNIT' not found, Current XML file is: modules\Natural_Wonders\Reef_Shark_CIV4SpawnInfos.xml
====================================================================
PYTHON CALLSTACK:
---------------------------------------------------------------------------------------------------------------------------
CvEventInterface.py (32): onEvent
BugEventManager.py (296): handleEvent
BugEventManager.py (301): _dispatchEvent
BugEventManager.py (307): _handleDefaultEvent
CvEventManager.py (2217): onUnitKilled
====================================================================
DLL CALLSTACK:
---------------------------------------------------------------------------------------------------------------------------
git\sources\cvglobals.cpp (3287): cvInternalGlobals::getInfoTypeForString
git\sources\cyglobalcontext.cpp (474): CyGlobalContext::getInfoTypeForString
git\build\deps\boost-1.32.0\include\boost\python\detail\caller.hpp (199): boost::python::detail::caller_arity<2>::impl<int (__thiscall CyGlobalContext::*)(char const *)const ,boost::python::default_call_policies,boost::mpl::vector3<int,CyGlobalContext &,char const *> >::operator()
1000EA8D (boost_python-vc71-mt-1_32): (filename not available): boost::python::objects::function::call
1E1AE378 (python24): (filename not available): PyTuple_Type

Beastmaster thing causes this in CvEventManager
Code:
        # Beastmaster
        iLeaderUnit = CyUnit.getLeaderUnitType()
        if iLeaderUnit != -1 and iLeaderUnit in (self.UNIT_BEASTMASTER, self.UNIT_FEMALE_BEASTMASTER):
            # This will prevent a 'beastmaster lost' message when the unit is killed.
            CyUnit.setLeaderUnitType(GC.getInfoTypeForString("NO_UNIT"))

I played for 10 turns and game didn't crash for me.
 
Last edited:
That save takes 1100 MB on load, play on medium render quality and without high resolution textures.
Also enable memsaver in INI file in C:\Users\<USERNAME>\Documents\My Games\Beyond the Sword

Its not even 7000 tiles and map is mostly water.
Sounds like there is serious memory leak.

Got python assert:
Code:
File:        D:\Modstuff\Caveman2Cosmos_GIT\Sources\CvGlobals.cpp
Line:        3287
Expression:  stricmp(szType, "NONE")==0 || strcmp(szType, "")==0
====================================================================
MESSAGE:
---------------------------------------------------------------------------------------------------------------------------
info type 'NO_UNIT' not found, Current XML file is: modules\Natural_Wonders\Reef_Shark_CIV4SpawnInfos.xml
====================================================================
PYTHON CALLSTACK:
---------------------------------------------------------------------------------------------------------------------------
CvEventInterface.py (32): onEvent
BugEventManager.py (296): handleEvent
BugEventManager.py (301): _dispatchEvent
BugEventManager.py (307): _handleDefaultEvent
CvEventManager.py (2217): onUnitKilled
====================================================================
DLL CALLSTACK:
---------------------------------------------------------------------------------------------------------------------------
git\sources\cvglobals.cpp (3287): cvInternalGlobals::getInfoTypeForString
git\sources\cyglobalcontext.cpp (474): CyGlobalContext::getInfoTypeForString
git\build\deps\boost-1.32.0\include\boost\python\detail\caller.hpp (199): boost::python::detail::caller_arity<2>::impl<int (__thiscall CyGlobalContext::*)(char const *)const ,boost::python::default_call_policies,boost::mpl::vector3<int,CyGlobalContext &,char const *> >::operator()
1000EA8D (boost_python-vc71-mt-1_32): (filename not available): boost::python::objects::function::call
1E1AE378 (python24): (filename not available): PyTuple_Type

Beastmaster thing causes this in CvEventManager
Code:
        # Beastmaster
        iLeaderUnit = CyUnit.getLeaderUnitType()
        if iLeaderUnit != -1 and iLeaderUnit in (self.UNIT_BEASTMASTER, self.UNIT_FEMALE_BEASTMASTER):
            # This will prevent a 'beastmaster lost' message when the unit is killed.
            CyUnit.setLeaderUnitType(GC.getInfoTypeForString("NO_UNIT"))

I played for 10 turns and game didn't crash for me.

I was actually on low graphics settings; would medium be better, for some reason?

Did you do anything other than end turn? I get the MAF (when I get it) when selecting a building to build in a city.

What exactly is memory leak, and what can I do? Would it help to save as a scenario, and load the scenario?
 
I was actually on low graphics settings; would medium be better, for some reason?
Very possible that given that low graphics causes problems there may have been some optimizations done that might make it a bigger problem still if left on.

A memory failure happens when the game runs out of memory, usually, could be a memory storage failure issue as well.

Normally what you can do is anything to simplify the game. But what Raxo is finding is that it's already a pretty simple gamestate so it makes it all the more unusual. Are you running on a severely old system?
 
I was actually on low graphics settings; would medium be better, for some reason?

Did you do anything other than end turn? I get the MAF (when I get it) when selecting a building to build in a city.

What exactly is memory leak, and what can I do? Would it help to save as a scenario, and load the scenario?
Low render quality, low resolution textures and animation frozen cause graphical glitches.

I didn't do things except ending turn.

Memory leak is when program uses up memory without freeing it, essentially piling up trash in office room :p
 
What exactly is memory leak, and what can I do? Would it help to save as a scenario, and load the scenario?
Memory leak is when the software code stores data to memory and forgets to clean it up when it is no longer needed, in some cases it may restore the same data to a new memory address each time it is needed instead of reusing the old data.

Sometimes the leak is connected to doing something specific with the software, so if the user know what causes a memory leak then it can be avoided by not using that specific software function.
Hypothetical C2C examples: never open pedia, or never build a city, or never upgrade units, or never board units into ships, etc. The AI might still cause a leak when doing whatever it is so sometimes it may not be avoidable even when the cause is known.
I'm not saying there are memory leaks in C2C like that, just trying to make you understand memory leaks better.

Memory leaks are gradual so the memory used builds up the longer a software with a leak is used, meaning the only thing the user can do about it when it exist is to restart the software once in a while, the OS will clean up all memory assigned by that process as soon as its terminated.

P.S. Saving the game as a scenario just to load it up again and play it is not recommended as a lot of game data is lost in that transition, it might actually help against some crashes but it is a last stretch attempt to play further in the game, and the cause of the previous crash will eventually return anyway.
e.g. all diplomatic trade deals will be cancelled/lost, city found dates will be reset to the date the scenario was created, same with building build dates (Affects double culture after 1000 years), etc.
 
Last edited:
Very possible that given that low graphics causes problems there may have been some optimizations done that might make it a bigger problem still if left on.

A memory failure happens when the game runs out of memory, usually, could be a memory storage failure issue as well.

Normally what you can do is anything to simplify the game. But what Raxo is finding is that it's already a pretty simple gamestate so it makes it all the more unusual. Are you running on a severely old system?

I think Raxo got it on the dot, but for what it's worth, I'm using a custom built PC that's about 5 years old. I selected the parts back then, and even upgraded my GPU since then.
 
I think Raxo got it on the dot, but for what it's worth, I'm using a custom built PC that's about 5 years old. I selected the parts back then, and even upgraded my GPU since then.
Well... that should be good I'd think. hmm...
 
Well... that should be good I'd think. hmm...
@MattCA found issue probably.
I got a crash that came from a groupCycleNode. Just before that I got a FAssert about a CvSelectionGroup.
The code around where the crash happened is already full of extra debug stuff. The exact spot was actually some code that is only in _DEBUG dll. I think because I was using debug dll, the bad CvSelectionGroup that was detected got deleted but the groupCycleNode it was in did not. I'm not 100% sure.
 
Guerrillas are "Carries Captives Special Type", but I have automated planes regularly rebasing onto guerrillas. They (guerrillas) can also transport Felis Superiors. Something is seriously wrong with "Carries Captives Special Type".

While I'm here, a reminder that the issue of how warlord units interact with forts (and wider issues around HN interactions with cities) was referred to Bill just before he left. I guess it's somewhere down Tbrd's to-do list now, but I just wanted to make sure it wasn't forgotten.
 
Back
Top Bottom