1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

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

Discussion in 'Bugs and Crashes' started by Dancing Hoskuld, Feb 22, 2014.

  1. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,896
    Gender:
    Male
    Location:
    Las Vegas
    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?
     
  2. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,243
    Gender:
    Male
    Location:
    Western IL. cornfields
    Can Bandit units have a Religious promo? I didn't think they could. :dunno:

    JosEPh
     
  3. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,571
    Gender:
    Male
    Location:
    MN
    Latest SVN CTD
    7782 one game
    7782.1 different game
     
  4. Arkenor

    Arkenor Warlord

    Joined:
    Aug 18, 2010
    Messages:
    173
    Location:
    Norwich, UK
    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.
     
  5. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,896
    Gender:
    Male
    Location:
    Las Vegas
    I don't think there's anything to say they can't but I can see why they shouldn't.

    Looking into it.

    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.
     
  6. KMRblue1027

    KMRblue1027 The Crown!

    Joined:
    Mar 4, 2010
    Messages:
    2,235
    Location:
    Hamilton, NJ
    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 :
    " align="" border="0" />


    The extra specialists seem to be glitched and show up way above where they should.
     
  7. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,540
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  8. Flinx

    Flinx Prince

    Joined:
    Dec 8, 2005
    Messages:
    455
    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>
     
  9. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,896
    Gender:
    Male
    Location:
    Las Vegas
    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?
     
  10. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,896
    Gender:
    Male
    Location:
    Las Vegas
    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.
     
  11. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,571
    Gender:
    Male
    Location:
    MN
    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.
     
  12. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,947
    Gender:
    Male
    Location:
    Germany
    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:.
     
  13. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,540
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  14. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,947
    Gender:
    Male
    Location:
    Germany
    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.
     
  15. dan1ell1ma

    dan1ell1ma Warlord

    Joined:
    May 5, 2014
    Messages:
    106
    CTD When try to raze the city in the save.

    SVN 7797.
     

    Attached Files:

  16. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,947
    Gender:
    Male
    Location:
    Germany
    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
    
    ----------------------------------------------------------
     
  17. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,896
    Gender:
    Male
    Location:
    Las Vegas
    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):
    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.
     
  18. Sparth

    Sparth C2C Team Member

    Joined:
    Oct 6, 2013
    Messages:
    2,311
    fixed both missing art_defs
     
  19. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,947
    Gender:
    Male
    Location:
    Germany
    There is a old Crash in that situation but it was never reproducible.

    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.
     
  20. Sparth

    Sparth C2C Team Member

    Joined:
    Oct 6, 2013
    Messages:
    2,311
    Checking UnitArtStyle errors before v35 is crucial if we want avert fatal bug like in v34.
    Anyway tnx Alberts for finding these bugs.
     

Share This Page