Single Player bugs and crashes - After the 24th of February 2014

Dunno if it has been reported or not, but Eje Song/Tengri Song do not give promotions to mounted as supposed to (Tengriism state religion, tried building Bandit Riders and Shang chariots so far), latest SVN

Something along those lines was reported. But we thought it was because the player may have been on an older SVN version before a recent change to make religious promos assigned in this manner ignore the restriction that you be on the same state religion. If it's not working either way then yeah, something needs to be looked into there.

By chance can anyone tell me if martial arts promos are having the same problem at the moment?
 
Can Bandit units have a Religious promo? I didn't think they could. :dunno:

JosEPh
 
A couple of little specific bugs I've noticed in my latest playthrough:

Thor Altar does not seem to be granting the Mjolnir promotion, at least not to melee troops.
Progressist is not allowing me to upgrade my units outside of my own territory.
 
Can Bandit units have a Religious promo? I didn't think they could. :dunno:

JosEPh
I don't think there's anything to say they can't but I can see why they shouldn't.

Latest SVN CTD
7782 one game
7782.1 different game
Looking into it.

A couple of little specific bugs I've noticed in my latest playthrough:

Thor Altar does not seem to be granting the Mjolnir promotion, at least not to melee troops.
Progressist is not allowing me to upgrade my units outside of my own territory.
That Mjolnir point seems to correlate with the above noted issues but I'm looking at the code and the problem is definitely NOT jumping out at me at the moment. I MAY need a save to evaluate. On my game I've noticed the Pankraton promotion being given out but I'm not sure if it 'requires' the religion or is just assigned by the building. I should be getting Mjolnir as well and haven't noticed if I'm getting it... problem is its a multiplayer game so much harder to evaluate.

I may yet find the issue in the code though - I've still got a theory or two to look into.

Interesting point about the Progressist upgrade too... my wife just verified she's been having trouble with that as well and hadn't mentioned it. Odd since that section of code hasn't been messed with lately so far as I know.



EDIT: It did occur to me that those playing with Religious Disabling would find the buildings that are handing out free promos like the Tengri ones and the Asatru ones are not going to be doing so when you're not using that religion as the state religion. Could be a possible explanation I suppose... I'll keep looking though. Again, a save showing a situation where a unit is built that round that should pick up a religious building promo that isn't doing so would be helpful.


EDIT: I think I figured out the upgrade thing and how it interacts with Progressist. The code looks straight but I think it's overlooking one or two elements I'm not sure it accounts for. I had a hunter I wanted to upgrade to a warden. I did not have Progressist. I had it in a city and was wondering why it couldn't upgrade. I ran it back to the capital and it could then upgrade. Reason: the Master Hunter building was a prereq for the Warden unit.

I don't think Progressist currently is setup to bypass the prereq of being in building vicinity, nor perhaps the prereq that you have at least some access along a valid trade route to any prerequisite resources. This last part explains why sometimes (on Progressist) you can upgrade your kayaks in the field and sometimes you can't.

This means units with a building prereq like hunters and siege weapons probably can't upgrade in the field even with Progressist. I'll work on that eventually but would like to make it a separate effect for when I finally get traits setup in tiered layers under Developing Leaders.
 
Not sure if this has been posted before but there's an annoying City Screen issue that has existed for a very long time.

Spoiler :
[/IMG]


The extra specialists seem to be glitched and show up way above where they should.
 
Yes it has been reported, often. I will get to it sometime. I am in the process of understanding and taking apart that code module because I think that if I understand it I may be able to support all sorts of things, eg multi maps and nomadic "cities". However it is and will take a long time.
 
That Mjolnir point seems to correlate with the above noted issues but I'm looking at the code and the problem is definitely NOT jumping out at me at the moment. I MAY need a save to evaluate.
You might see it now:

<PromotionInfo>
<Type>PROMOTION_MJOLNIR</Type>
<Description>Mojlnir</Description>
<Sound>AS2D_IF_LEVELUP</Sound>
<LayerAnimationPath>NONE</LayerAnimationPath>
<PromotionPrereq>NONE</PromotionPrereq>
<PromotionPrereqOr1>NONE</PromotionPrereqOr1>
<PromotionPrereqOr2>NONE</PromotionPrereqOr2>
<TechPrereq>NONE</TechPrereq>
<StateReligionPrereq>RELIGION_ASATRU</StateReligionPrereq>
<bLeader>1</bLeader>

</PromotionInfo>
 
You might see it now:

<PromotionInfo>
<Type>PROMOTION_MJOLNIR</Type>
<Description>Mojlnir</Description>
<Sound>AS2D_IF_LEVELUP</Sound>
<LayerAnimationPath>NONE</LayerAnimationPath>
<PromotionPrereq>NONE</PromotionPrereq>
<PromotionPrereqOr1>NONE</PromotionPrereqOr1>
<PromotionPrereqOr2>NONE</PromotionPrereqOr2>
<TechPrereq>NONE</TechPrereq>
<StateReligionPrereq>RELIGION_ASATRU</StateReligionPrereq>
<bLeader>1</bLeader>

</PromotionInfo>
I never do look directly at the xml... that would explain it though. Why the hell? Ok so that pretty much explains THAT. Thanks! I'd say that should be immediately adjusted but why did someone set it like that in the first place?
 
Latest SVN CTD
7782 one game
7782.1 different game

hmph... was expecting a save but the minis do show what may be different problems but could also be the same.

I'll explain:
The first one shows an exe crash and nothing more which is classically often a missing graphics problem.

The second shows a breakdown in the dll but particularly in a graphics initialization sequence for a unit. I don't understand it all that much and therefore you can be very sure I've never manipulated any code anywhere along those lines. However, it could well mean that it's the same basic issue just running up against the problem in different spots.

So unless Alberts2 can at least explain how to find missing graphic references, my usefulness in debugging the problem ends here. Doesn't appear to be a code problem I don't think.
 
hmph... was expecting a save but the minis do show what may be different problems but could also be the same.

I'll explain:
The first one shows an exe crash and nothing more which is classically often a missing graphics problem.

The second shows a breakdown in the dll but particularly in a graphics initialization sequence for a unit. I don't understand it all that much and therefore you can be very sure I've never manipulated any code anywhere along those lines. However, it could well mean that it's the same basic issue just running up against the problem in different spots.

So unless Alberts2 can at least explain how to find missing graphic references, my usefulness in debugging the problem ends here. Doesn't appear to be a code problem I don't think.

OK, i got the 1st one working ok, with 25-30 civs.

I havent tried the 2nd one.

So dont worry about either one, but thx.
 
hmph... was expecting a save but the minis do show what may be different problems but could also be the same.

I'll explain:
The first one shows an exe crash and nothing more which is classically often a missing graphics problem.

The second shows a breakdown in the dll but particularly in a graphics initialization sequence for a unit. I don't understand it all that much and therefore you can be very sure I've never manipulated any code anywhere along those lines. However, it could well mean that it's the same basic issue just running up against the problem in different spots.

So unless Alberts2 can at least explain how to find missing graphic references, my usefulness in debugging the problem ends here. Doesn't appear to be a code problem I don't think.

You can check the resmgr.log for missing files, sometimes they can lead to crashes.

In case the whole ArtInfo is missing the Debug dll shows a error message before crashing. We also had that error message in the Final Release but i removed it again because displaying that kind of errors is apparently ruining the game:crazyeye:.
 
You can check the resmgr.log for missing files, sometimes they can lead to crashes.

In case the whole ArtInfo is missing the Debug dll shows a error message before crashing. We also had that error message in the Final Release but i removed it again because displaying that kind of errors is apparently ruining the game:crazyeye:.

No, what happened was that a whole bunch of error messages were added, a subset of which broke WoC. So instead of just removing that subset all the error messages were removed.

WoC was written to rely on the fact that Building Class Infos can exist without a Building Infos instance. Instead of checking to see if the Building Infos had been turned off by WoC the error says that no BI exists. It does, it is in the file. It is just not active for the options in use for this particular game session.

Basically if you are going to test the integrity of the XML files you need to separate the reading and testing from the WoC processing.
 
No, what happened was that a whole bunch of error messages were added, a subset of which broke WoC. So instead of just removing that subset all the error messages were removed.

WoC was written to rely on the fact that Building Class Infos can exist without a Building Infos instance. Instead of checking to see if the Building Infos had been turned off by WoC the error says that no BI exists. It does, it is in the file. It is just not active for the options in use for this particular game session.

Basically if you are going to test the integrity of the XML files you need to separate the reading and testing from the WoC processing.

I recall that in case a error was always shown by the debug dll why is that???
If like you say it is possible by design why didn't the creators of WoC hide that error message???
The loading code has been merged from WoC a few years ago and there are a few differences.
All i can say about this now is i don't have the time and energy to fix and improve all the loading code in a perfect way. There is no need to separate reading and testing if it is done in the right way so must be the xml. I think there was a reason for the AndDependencyTypes don't you think???

EDIT:
Here is the original code from WoC Lite that was what was merged into ROM.
Code:
	int iTextDefault = -1;
	int iSize = m_aszExtraXMLforPass3.size();	
	for ( int i = 0; i < iSize; i++ )
	{ 
		if ( GC.getInfoTypeForString(m_aszExtraXMLforPass3[iSize - ( i + 1)]) != iTextDefault)
		{
			m_iDefaultBuildingIndex = GC.getInfoTypeForString(m_aszExtraXMLforPass3[iSize - ( i + 1)]);	
			break;
		}
	}
In case of a missing Building Info a error is shown because getInfoTypeForString has a second parameter to hide the assert and i don't see it used there.
Code:
DllExport int getInfoTypeForString(const char* szType, bool hideAssert = false) const;
Code:
int CvGlobals::getInfoTypeForString(const char* szType, bool hideAssert) const
	{
	FAssertMsg(szType, "null info type string");
	InfosMap::const_iterator it = m_infosMap.find(szType);
	if (it!=m_infosMap.end())
	{
		return it->second;
	}

	if(!hideAssert)
	{
		CvString szError;
		szError.Format("info type %s not found, Current XML file is: %s", szType, GC.getCurrentXMLFile().GetCString());
		FAssertMsg(strcmp(szType, "NONE")==0 || strcmp(szType, "")==0, szError.c_str());
		gDLL->logMsg("xml.log", szError);
	}

	return -1;
}


About ArtInfos, they can be defined inside a module and if the module is turned of it's possible they are missing somewhere else. Missing ArtInfos lead to CTD's in some cases and that was why i put in the error message.
 
CTD When try to raze the city in the save.

SVN 7797.
 

Attachments

  • Mansa Musa BC-22375.rar
    1.7 MB · Views: 42
The debug dll shows 2 missing ArtInfos.

Code:
Assert Failed

File:  CvGlobals.cpp
Line:  5245
SVN-Rev:  7788
Expression:  stricmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message:  info type 'ART_DEF_UNIT_CANNON_INDIAN' not found, Current XML file is: xml\Civilizations\CIV4UnitArtStyleTypeInfos.xml

----------------------------------------------------------
Code:
Assert Failed

File:  CvGlobals.cpp
Line:  5245
SVN-Rev:  7788
Expression:  stricmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message:  info type 'ART_DEF_UNIT_AFRICAN_SETTLER_BOY' not found, Current XML file is: xml\Civilizations\CIV4UnitArtStyleTypeInfos.xml

----------------------------------------------------------
 
CTD When try to raze the city in the save.

SVN 7797.
This plays through for me just fine on the debugger but it's a very good example of numerous asserts taking place when cities are razed and captured. I've been wondering about what's causing these and it's a very complex situation that may well be beyond my skills to resolve. But they didn't cause a crash. (Might have something to do with the supercity bug that's lurking around the code somewhere though since it certainly suggests something isn't being done quite right there.)

So I'm thinking that since they it didn't cause a crash for me but it does produce a citizen slave for your nation then the following problem may explain it (as I haven't updated recently enough to have picked up these issues):
The debug dll shows 2 missing ArtInfos.

Code:
Assert Failed

File:  CvGlobals.cpp
Line:  5245
SVN-Rev:  7788
Expression:  stricmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message:  info type 'ART_DEF_UNIT_CANNON_INDIAN' not found, Current XML file is: xml\Civilizations\CIV4UnitArtStyleTypeInfos.xml

----------------------------------------------------------
Code:
Assert Failed

File:  CvGlobals.cpp
Line:  5245
SVN-Rev:  7788
Expression:  stricmp(szType, "NONE")==0 || strcmp(szType, "")==0
Message:  info type 'ART_DEF_UNIT_AFRICAN_SETTLER_BOY' not found, Current XML file is: xml\Civilizations\CIV4UnitArtStyleTypeInfos.xml

----------------------------------------------------------
Quite possible that second one is being called for in your crash scenario so at that point with it missing it creates a collapse. That's my going theory anyhow.
 
This plays through for me just fine on the debugger but it's a very good example of numerous asserts taking place when cities are razed and captured. I've been wondering about what's causing these and it's a very complex situation that may well be beyond my skills to resolve. But they didn't cause a crash. (Might have something to do with the supercity bug that's lurking around the code somewhere though since it certainly suggests something isn't being done quite right there.)

So I'm thinking that since they it didn't cause a crash for me but it does produce a citizen slave for your nation then the following problem may explain it (as I haven't updated recently enough to have picked up these issues):

There is a old Crash in that situation but it was never reproducible.

Quite possible that second one is being called for in your crash scenario so at that point with it missing it creates a collapse. That's my going theory anyhow.

Yes it is.
Thats why i really want to reactivate the UnitArtStyle checking and the error message in case a missing ArtInfo is called in the Final Release build. But if that is not wanted we need to put the Debug dll back into the svn for error checking even if it is pointless because nobody uses it.
 
Yes it is.
Thats why i really want to reactivate the UnitArtStyle checking and the error message in case a missing ArtInfo is called in the Final Release build. But if that is not wanted we need to put the Debug dll back into the svn for error checking even if it is pointless because nobody uses it.

Checking UnitArtStyle errors before v35 is crucial if we want avert fatal bug like in v34.
Anyway tnx Alberts for finding these bugs.
 
Top Bottom