Single Player bugs and crashes v35 plus (SVN) - After the 18th of August 2014

I'll look at the crashes when I can but time is crunched a bit so I beg some more patience.

@Sparth: Many of the animals are looking whacked out with what I presume are textures that are sized too small for them so don't fit them correctly. Elephants are a prime example. There are many more. Just something to look into.

Ok Ill check animals too.
 
Two repeatable CTDs that may or may not be related. Using SVN Build 8224 (at least, that's what it was internally labelled - pretty sure the commit is only two days old).

No error messages that I could find, no minidumps generated. For both saves, a crash can be reliably repeated by hitting 'End Turn', regardless of what the human player does.

In both cases, I was able to continue play by going into WorldBuilder and deleting all units belonging to one civ (Carthage/Team 5 in Crash 1, America/Team 2 in Crash 2), since I noted from the logs that it was in the midst of their turns that the crash was reliably happening. Fortunately, this isn't at all a serious game, so I can keep pressing ahead and maybe generating more crash data.

I've made two XML modifications, though I doubt they're particularly relevant:
- Butchery has been modified to produce Lard in addition to Raw Meat.
- Grand Fire Festival has been modified to be active on Krakatoa in addition to Active and Dormant Volcanoes.

I retested both using the latest commit (as of about thirty minutes ago); no changes to either crash.

I'll look at the crashes when I can but time is crunched a bit so I beg some more patience.

@Sparth: Many of the animals are looking whacked out with what I presume are textures that are sized too small for them so don't fit them correctly. Elephants are a prime example. There are many more. Just something to look into.


I just had the same crash it comes from the new BuildUp feature.
Code:
void CvUnit::setBuildUpType(PromotionLineTypes ePromotionLine, bool bRemove)
{
	int iBestValue = 0;
	int iValue = 0;
	PromotionLineTypes eOldBuildUpType = getBuildUpType();
	if (ePromotionLine == NO_PROMOTIONLINE && !bRemove)
	{
		//if human then send popup to select promotionline type
		if (isHuman())
		{
			//here we go with popup
			setFortifyTurns(0);
			CvPopupInfo* pInfo = new CvPopupInfo(BUTTONPOPUP_CHOOSE_BUILDUP);
			pInfo->setData1(getID());
			gDLL->getInterfaceIFace()->addPopup(pInfo, getOwner());
		}
		//else Here is were we can implement some AI selection methodology.
		else
		{
			bool bFound = false;
			PromotionLineTypes eAssignPromotionLine = NO_PROMOTIONLINE;
			for (std::map<PromotionLineTypes, PromotionLineKeyedInfo>::const_iterator it = m_promotionLineKeyedInfo.begin(), end = m_promotionLineKeyedInfo.end(); it != end; ++it)
			{
				if(it->second.m_bValidBuildUp)
				{
					PromotionLineTypes ePotentialPromotionLine = it->first;
					for (int iI = 0; iI < GC.getPromotionLineInfo(ePotentialPromotionLine).getNumPromotions(); iI++)
					{
						PromotionTypes ePromotion = (PromotionTypes)GC.getPromotionLineInfo(ePotentialPromotionLine).getPromotion(iI);
						if (GC.getPromotionInfo(ePromotion).getLinePriority() == 1 && canAcquirePromotion(ePromotion, false, false, false, false, false, false, true, true))
						{
							iValue = GET_PLAYER(getOwnerINLINE()).AI_promotionValue(ePromotion, getUnitType(), this, AI_getUnitAIType(), true);
							if (iValue >= 5 && iValue >iBestValue)
							{
								iBestValue = iValue;
								eAssignPromotionLine = ePotentialPromotionLine;
							}
							bFound = true;
						}
					}
				}
			}
[B][COLOR="Red"]			if (!bFound && isBuildUpable())
			{
				establishBuildups();
				setBuildUpType(NO_PROMOTIONLINE, false);
			}[/COLOR][/B]
			if (eOldBuildUpType != eAssignPromotionLine)
			{
				setFortifyTurns(0);
			}
			m_eCurrentBuildUpType = eAssignPromotionLine;
		}	
	}
	else
	{
		//the underlying build up type variable is established as ePromotionLine
		m_eCurrentBuildUpType = ePromotionLine;
	}
}

The setBuildUpType(NO_PROMOTIONLINE, false); call causes an Stack overflow. I'am not sure what happens but that code is just trouble in case there are no valid PromotionLines for a unit. Because in that case you can have an infinite loop 'Stack overflow'.
 
hey guys as of the latest svn update that i did, i dont remember what it came out to, and i dont remember what the previous one i had was as well. But their is no UI when i try to start a game I've tried an earth2 map with default settings and a small size but to no avail. I've got the main game updated so i dont know what it could be though.
 
The abundance of Specialists in C2C make it very difficult to specialise a city. I have tried to make cities specialise in science, doctor and spy buy all end up producing Great Prophets or Merchants because those are the specialists available in abundance from early in the game.

City Free Specialists come too early in the game. They need to be pushed up the tech tree. Should not have a "Free" Citizen, Priest, or Merchant before Sed Life. They should show up around the same time as Artists, Scientists, and Spy specialists. For some time now it's been this way, you will have a Free Citizen Specialist in the 1st 10 turns of the game. been meaning to say something about it for the past 2 years. :p

JosEPh
 
I just had the same crash it comes from the new BuildUp feature.
Code:
void CvUnit::setBuildUpType(PromotionLineTypes ePromotionLine, bool bRemove)
{
	int iBestValue = 0;
	int iValue = 0;
	PromotionLineTypes eOldBuildUpType = getBuildUpType();
	if (ePromotionLine == NO_PROMOTIONLINE && !bRemove)
	{
		//if human then send popup to select promotionline type
		if (isHuman())
		{
			//here we go with popup
			setFortifyTurns(0);
			CvPopupInfo* pInfo = new CvPopupInfo(BUTTONPOPUP_CHOOSE_BUILDUP);
			pInfo->setData1(getID());
			gDLL->getInterfaceIFace()->addPopup(pInfo, getOwner());
		}
		//else Here is were we can implement some AI selection methodology.
		else
		{
			bool bFound = false;
			PromotionLineTypes eAssignPromotionLine = NO_PROMOTIONLINE;
			for (std::map<PromotionLineTypes, PromotionLineKeyedInfo>::const_iterator it = m_promotionLineKeyedInfo.begin(), end = m_promotionLineKeyedInfo.end(); it != end; ++it)
			{
				if(it->second.m_bValidBuildUp)
				{
					PromotionLineTypes ePotentialPromotionLine = it->first;
					for (int iI = 0; iI < GC.getPromotionLineInfo(ePotentialPromotionLine).getNumPromotions(); iI++)
					{
						PromotionTypes ePromotion = (PromotionTypes)GC.getPromotionLineInfo(ePotentialPromotionLine).getPromotion(iI);
						if (GC.getPromotionInfo(ePromotion).getLinePriority() == 1 && canAcquirePromotion(ePromotion, false, false, false, false, false, false, true, true))
						{
							iValue = GET_PLAYER(getOwnerINLINE()).AI_promotionValue(ePromotion, getUnitType(), this, AI_getUnitAIType(), true);
							if (iValue >= 5 && iValue >iBestValue)
							{
								iBestValue = iValue;
								eAssignPromotionLine = ePotentialPromotionLine;
							}
							bFound = true;
						}
					}
				}
			}
[B][COLOR="Red"]			if (!bFound && isBuildUpable())
			{
				establishBuildups();
				setBuildUpType(NO_PROMOTIONLINE, false);
			}[/COLOR][/B]
			if (eOldBuildUpType != eAssignPromotionLine)
			{
				setFortifyTurns(0);
			}
			m_eCurrentBuildUpType = eAssignPromotionLine;
		}	
	}
	else
	{
		//the underlying build up type variable is established as ePromotionLine
		m_eCurrentBuildUpType = ePromotionLine;
	}
}

The setBuildUpType(NO_PROMOTIONLINE, false); call causes an Stack overflow. I'am not sure what happens but that code is just trouble in case there are no valid PromotionLines for a unit. Because in that case you can have an infinite loop 'Stack overflow'.
Ok... I see the problem but I don't have time to fix and commit. The issue would be twofold. I assumed that if they were known to be valid by the system to take a build up then the problem with them not taking one would be that they didn't find one to take so there would be an issue with the caching. There WAS an issue with that at a point but I think it's been found and repaired now anyhow. So this is a little different. What needs to be changed is this this:
Code:
                                                        if ([B][COLOR="Red"][S]iValue >= 5 && [/S][/COLOR][/B]iValue >iBestValue)
							{
								iBestValue = iValue;
								eAssignPromotionLine = ePotentialPromotionLine;
							}
							bFound = true;
						}
					}
				}
			}
			if (!bFound && isBuildUpable())
			{
				establishBuildups();
                                [B][COLOR="Red"]if (isBuildUpable())
                                {
			              setBuildUpType(NO_PROMOTIONLINE, false);
                                }
                                else
                                {
                                      setBuildUpType(NO_PROMOTIONLINE, true);
                                }[/COLOR][/B]
			}
That oughta take care of any possible situations leading to such a crash here.
 
City Free Specialists come too early in the game. They need to be pushed up the tech tree. Should not have a "Free" Citizen, Priest, or Merchant before Sed Life. They should show up around the same time as Artists, Scientists, and Spy specialists. For some time now it's been this way, you will have a Free Citizen Specialist in the 1st 10 turns of the game. been meaning to say something about it for the past 2 years. :p

JosEPh

These were coming from education levels - at this point unless you're playing on a very easy setting they shouldn't be so forthcoming.
 
alright its the 8245 svn version of the mod and its not giving me a user interface ill try again
and take a screenshot of what it looks like but i cant settle my settler or anything.
 
City Free Specialists come too early in the game. They need to be pushed up the tech tree. Should not have a "Free" Citizen, Priest, or Merchant before Sed Life. They should show up around the same time as Artists, Scientists, and Spy specialists. For some time now it's been this way, you will have a Free Citizen Specialist in the 1st 10 turns of the game. been meaning to say something about it for the past 2 years. :p

JosEPh

As I think I said elsewhere, there should be no specialists available until the Specialisation tech.

alright its the 8245 svn version of the mod and its not giving me a user interface ill try again
and take a screenshot of what it looks like but i cant settle my settler or anything.

This usually means that something is wrong with the python code somewhere. I don't think we have changed any of it recently. Do you have some ciustomised python code?
 
As I think I said elsewhere, there should be no specialists available until the Specialisation tech.



This usually means that something is wrong with the python code somewhere. I don't think we have changed any of it recently. Do you have some ciustomised python code?

ran the base game as administrator and then went through that and it worked again and i dont know how to customize the python code. I barely know how to customize the xml data through c++
 
Ok... I see the problem but I don't have time to fix and commit. The issue would be twofold. I assumed that if they were known to be valid by the system to take a build up then the problem with them not taking one would be that they didn't find one to take so there would be an issue with the caching. There WAS an issue with that at a point but I think it's been found and repaired now anyhow. So this is a little different. What needs to be changed is this this:
Code:
                                                        if ([B][COLOR="Red"][S]iValue >= 5 && [/S][/COLOR][/B]iValue >iBestValue)
							{
								iBestValue = iValue;
								eAssignPromotionLine = ePotentialPromotionLine;
							}
							bFound = true;
						}
					}
				}
			}
			if (!bFound && isBuildUpable())
			{
				establishBuildups();
                                [B][COLOR="Red"]if (isBuildUpable())
                                {
			              setBuildUpType(NO_PROMOTIONLINE, false);
                                }
                                else
                                {
                                      setBuildUpType(NO_PROMOTIONLINE, true);
                                }[/COLOR][/B]
			}
That oughta take care of any possible situations leading to such a crash here.

Nope this doesn't fix it.
 
ran the base game as administrator and then went through that and it worked again and i dont know how to customize the python code. I barely know how to customize the xml data through c++

I had this issue when I had installed the base game in a non-english languae. Or if you don't upgrade to version 3.19 auf the base game. Or maybe even if you run C2C is a different language.
 
Ok... I'll need to evaluate those crashes further then.

I'am busy with other stuff at the moment so i can't really do much here. The BuildUp code has some possible issues and some parts don't really makes sense to me. I think those could be done another way, maybe i have some time in the next days.
 
As I think I said elsewhere, there should be no specialists available until the Specialisation tech.



<snip>

Does that take into consideration the buildings that allow Specialist to appear/ be available? The ones that say things like, "allows unlimited priest, or engineers, etc".

My Current game was started from SVN build 8161, iirc. So when you get Specialists has been changed since then to a New tech called Specialization? Am I understanding this correctly?

JosEPh
 
I'am busy with other stuff at the moment so i can't really do much here. The BuildUp code has some possible issues and some parts don't really makes sense to me. I think those could be done another way, maybe i have some time in the next days.

Ok, I've sorted it out (along with a number of other problems I found and addressed.) I'm sure there are a few things that could be improved but be VERY careful... it's taken a lot of repetitive testing to get the processes and all the tiniest little innuendos of it functioning properly.

I believe I may have resolved a few things that may have been giving a false indication that the buildups were a problem too. One major issue here was that I'd assumed any valid promotion would have at least some evaluation value - that was painfully incorrect and even led to a discovery of a critical error in the design of the property control promotion values. Another issue was a red herring one could think was due to the build ups - many of the same units or types of units were having problems with hitting infinite update loops... this actually proved to have nothing to do with buildups... it was a problem in the recent AI designs (which was a major breakthrough that showed me how we can most likely find and fix the same issue that comes up at times in the Naval Assault AI! I'll be looking to seek and destroy that problem now armed with this new knowledge of an identified mistake.)

So if you do see some things about the buildups that could be done BETTER I would not be surprised with your degree of experience and skill. I'd just ask you to show me the coding you believe could be done in an improved fashion and confer on the matter so I can explain anything that doesn't immediately make sense. There's lots of pitfalls I've stepped into and had to work my way around here that could easily be reawakened.
 
Does that take into consideration the buildings that allow Specialist to appear/ be available? The ones that say things like, "allows unlimited priest, or engineers, etc".

My Current game was started from SVN build 8161, iirc. So when you get Specialists has been changed since then to a New tech called Specialization? Am I understanding this correctly?

JosEPh

Nothing has happened, I am suggesting something should.
 
So apparently it was such a simple file pathing issue. I had forgot to change the name of the mod back to Caveman2Cosmos and still had it as C2C. I changed the folder name back to Caveman2Cosmos and now it works perfectly. lmao
 
Small bugs: oil lamps dont appear when i turn on the hammer filter.

When i turn the crime filter the button don't flash out.
 
Back
Top Bottom