Strategic View Causing Crash to Desktop

sman1975

Emperor
Joined
Aug 27, 2016
Messages
1,370
Location
Dallas, TX
Hello,

Am working on a mod that adds a lot of units to the game. One problem I'm having is every time when I press on the "Strategic View" button or press F10, the game immediately CTD's.

Looking around, I found this thread:

https://forums.civfanatics.com/threads/bug-limit-with-strategicview-icons.568511/

It seems the OP had a similar problem which he traced to a mismatch between the SV file name entries in the ArtDefine_StrategicView table and the actual file names of the SV files (post #7).

Note: my mod doesn't add any new SV files - it reuses existing SV files for the various new units.

I reviewed the contents of the ArtDefine_StrategicView table, cross-walking the actual file names in Resources using Agent Ransack, and made sure all the file names matched. So, the solution in the post doesn't help.


Question: What other kinds of game mechanics might cause an instant CTD when entering the SV mode?



Appreciate any suggestions - Thanks!
 
sure you haven't inadvertnently forgotten to specify a SV icon for a unit ?

Other than that or the more-than-256 bug I dont' have any ideas on what would cause CTD on entering strategic view that would not also cause CTD in the normal view.

---------------------------------

if it were me and I had any other mods at all running, I'd disable my new mod and see if the CTD persists. If not, then the issue would have to be in my new mod and is likely related to something I did in the most-recnt version. If the CTD persists without my mod running then the problem has to be rooted elsewhere. Even though a bit PITA because you have to re-enable everything I'd clear the cache and then re-enable my mod and the others one at a time to see (a) which mod is resulting in CTD, and (b) as I combine the set of re-enabled mods does a combo of mods cause the CTD.

If you can trace to a root-cause mod at least you can attempt to determine what such a mod is doing to cause the CTD, or simply turn the mod off if it is not your mod and is not 100% necessary for your mod to function.
 
Last edited:
@LeeS - I figured out the issue....

I followed all of your recommendations - looking at the ArtDefine_StrategicView table with SQLiteSpy, cross checking entries there with the mod in ModBuddy and a "SV_*.dds" search in the Resources folder using Agent Ransack. I isolated the error to my mod, but unfortunately found absolutely no issues with any of the new units....

So..... I remembered I "borrowed" a file from thecrazyscotsman's Omnibus mod that added a few new luxury resources when a player completed various wonders. I checked the file and found several typos/missing ART_DEF_ entries. I corrected those, rebuilt the mod, and voila!

Now the StratView works just like it's supposed to!

Even though these new resources aren't on the map at all, the game seems to want them to have some kind of Strategic View entry. :crazyeye:

I guess I was only thinking about Units, but there are a few other things in the StratView that can cause these crashes. Now I know....

-----------------------------------------------

Now... Time to figure out why the game crashes during map generation after I use the "Advanced Setup" to select more than 3-4 specific civs.... :wallbash:
 
Last edited:
Well, shucks, not so fast.....

After "fixing" the problem in an earlier version of the mod, I must have made some changes somewhere else the game didn't like, and my error returned.

After a painstaking process of removing units a few at a time, I was able to isolate the unit - when it was in the mod, the game crashed on moving to Strategic View. Fair enough. But, looking at all the data, the unit is set up correctly.

I even built a new mod with just this unit in it, and of course, it works just fine...

So - I'm back to the point where if the unit is in the mod, we crash in Strategic. But the unit looks to be set up correctly in the mod and does in fact work in a different mod.

Does anyone have any "curve ball" suggestions on how to troubleshoot an error that isn't really an error but still crashes the game?



Edit: the unit in question is the V1 Rocket in this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1562440077


The model was originally this one: https://forums.civfanatics.com/resources/civ5-v1-flying-bomb.21331/


And the unit works perfectly - in the normal game. Animations, etc., no problem with the unit definition otherwise.



I'm starting to think the error is something completely different, but causing an externality that presents itself as this strat view crash.



Edit 2: Here is the defining code:

Code:
<GameData>

    <UnitClasses>
        <Row>
            <Type>UNITCLASS_WAW_WW2_NUKE_2</Type>
            <Description>TXT_KEY_UNIT_WAW_WW2_NUKE_2</Description>
            <DefaultUnit>UNIT_WAW_WW2_NUKE_2</DefaultUnit>
        </Row>
    </UnitClasses>

    <Units>
        <Row>
            <Type>UNIT_WAW_WW2_NUKE_2</Type>
            <Class>UNITCLASS_WAW_WW2_NUKE_2</Class>                      
            <Moves>2</Moves>
            <RangedCombat>50</RangedCombat>
            <Range>4</Range>
            <Cost>100</Cost>
           
            <PrereqTech>TECH_SMAN_SYNTHETICS</PrereqTech>
            <ObsoleteTech>TECH_SMAN_JET_ENGINES</ObsoleteTech>
           
            <Description>TXT_KEY_UNIT_WAW_WW2_NUKE_2</Description>
            <Civilopedia>TXT_KEY_UNIT_WAW_WW2_NUKE_2_PEDIA</Civilopedia>
            <Strategy>TXT_KEY_UNIT_WAW_WW2_NUKE_2_STRATEGY</Strategy>
            <Help>TXT_KEY_UNIT_WAW_WW2_NUKE_2_HELP</Help>

            <Immobile>true</Immobile>
            <NoMaintenance>true</NoMaintenance>
            <Special>SPECIALUNIT_MISSILE</Special>
            <Domain>DOMAIN_AIR</Domain>
            <DefaultUnitAI>UNITAI_MISSILE_AIR</DefaultUnitAI>
            <MilitarySupport>true</MilitarySupport>
            <MilitaryProduction>true</MilitaryProduction>
            <IgnoreBuildingDefense>true</IgnoreBuildingDefense>
            <Mechanized>true</Mechanized>
            <Suicide>true</Suicide>
            <AdvancedStartCost>40</AdvancedStartCost>
            <AirUnitCap>1</AirUnitCap>
            <RangedCombatLimit>100</RangedCombatLimit>
            <CombatLimit>0</CombatLimit>
            <XPValueDefense>2</XPValueDefense>          
            <MoveRate>AIR_REBASE</MoveRate>

            <UnitArtInfo>ART_DEF_UNIT_WAW_WW2_NUKE_2</UnitArtInfo>

            <IconAtlas>WAW_UNIT_ATLAS</IconAtlas>
            <PortraitIndex>47</PortraitIndex>
            <UnitFlagAtlas>WAW_UNIT_FLAG_ATLAS_B</UnitFlagAtlas>
            <UnitFlagIconOffset>8</UnitFlagIconOffset>
           
        </Row>
    </Units>

    <Civilization_UnitClassOverrides>
        <Row>
            <CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
            <UnitClassType>UNITCLASS_WAW_WW2_NUKE_2</UnitClassType>
            <UnitType/>
        </Row>
        <Row>
            <CivilizationType>CIVILIZATION_MINOR</CivilizationType>
            <UnitClassType>UNITCLASS_WAW_WW2_NUKE_2</UnitClassType>
            <UnitType/>
        </Row>
    </Civilization_UnitClassOverrides>

    <Unit_ClassUpgrades>
        <Row>
            <UnitType>UNIT_WAW_WW2_NUKE_2</UnitType>
            <UnitClassType>UNITCLASS_WAW_WW2_NUKE_3</UnitClassType>
        </Row>
    </Unit_ClassUpgrades>
       
    <Unit_AITypes>
        <Row>
            <UnitType>UNIT_WAW_WW2_NUKE_2</UnitType>
            <UnitAIType>UNITAI_MISSILE_AIR</UnitAIType>
        </Row>
    </Unit_AITypes>

    <Unit_Flavors>
        <Row>
            <UnitType>UNIT_WAW_WW2_NUKE_2</UnitType>
            <FlavorType>FLAVOR_OFFENSE</FlavorType>
            <Flavor>12</Flavor>
        </Row>
        <Row>
            <UnitType>UNIT_WAW_WW2_NUKE_2</UnitType>
            <FlavorType>FLAVOR_DEFENSE</FlavorType>
            <Flavor>1</Flavor>
        </Row>
        <Row>
            <UnitType>UNIT_WAW_WW2_NUKE_2</UnitType>
            <FlavorType>FLAVOR_NAVAL</FlavorType>
            <Flavor>4</Flavor>
        </Row>
        <Row>
            <UnitType>UNIT_WAW_WW2_NUKE_2</UnitType>
            <FlavorType>FLAVOR_AIR</FlavorType>
            <Flavor>1</Flavor>
        </Row>
    </Unit_Flavors>

    <Unit_FreePromotions>
        <Row>
            <UnitType>UNIT_WAW_WW2_NUKE_2</UnitType>
            <PromotionType>PROMOTION_EVASION_I</PromotionType>
        </Row>
    </Unit_FreePromotions>

   
   
    <ArtDefine_UnitInfos>
        <Row>
            <Type>ART_DEF_UNIT_WAW_WW2_NUKE_2</Type>
            <DamageStates>1</DamageStates>
            <Formation></Formation>
        </Row>
    </ArtDefine_UnitInfos>

    <ArtDefine_UnitInfoMemberInfos>
        <Row>
            <UnitInfoType>ART_DEF_UNIT_WAW_WW2_NUKE_2</UnitInfoType>
            <UnitMemberInfoType>ART_DEF_UNIT_MEMBER_WAW_WW2_NUKE_2</UnitMemberInfoType>
            <NumMembers>1</NumMembers>
        </Row>
    </ArtDefine_UnitInfoMemberInfos>

    <ArtDefine_UnitMemberInfos>
        <Row>
            <Type>ART_DEF_UNIT_MEMBER_WAW_WW2_NUKE_2</Type>
            <Scale>0.18</Scale>
            <Domain>Air</Domain>
            <ZOffset>15.0</ZOffset>
            <Model>WAW_WW2_V1Rocket.fxsxml</Model>
            <MaterialTypeTag>METAL</MaterialTypeTag>
            <MaterialTypeSoundOverrideTag>METALLRG</MaterialTypeSoundOverrideTag>
        </Row>
    </ArtDefine_UnitMemberInfos>

    <ArtDefine_UnitMemberCombats>
        <Row>
            <UnitMemberType>ART_DEF_UNIT_MEMBER_WAW_WW2_NUKE_2</UnitMemberType>
            <EnableActions>Idle Attack Bombard Death Run</EnableActions>
            <AttackRadius>64.0</AttackRadius>
            <MoveRate>1.5</MoveRate>
            <TurnRateMin>0.5</TurnRateMin>
            <TurnRateMax>1.5</TurnRateMax>
            <PitchRateMin>1.0</PitchRateMin>
            <PitchRateMax>3.0</PitchRateMax>
            <HasRefaceAfterCombat>0</HasRefaceAfterCombat>
            <HasCollisionAttack>1</HasCollisionAttack>
            <AttackAltitude>45.0</AttackAltitude>
        </Row>
    </ArtDefine_UnitMemberCombats>

    <ArtDefine_UnitMemberCombatWeapons>
        <Row>
            <UnitMemberType>ART_DEF_UNIT_MEMBER_WAW_WW2_NUKE_2</UnitMemberType>
            <Index>0</Index>
            <SubIndex>0</SubIndex>
            <VisKillStrengthMin>100.0</VisKillStrengthMin>
            <VisKillStrengthMax>100.0</VisKillStrengthMax>
            <HitEffect>ART_DEF_VEFFECT_GUIDED_MISSILE_IMPACT_$(TERRAIN)</HitEffect>
            <WeaponTypeTag>EXPLOSIVE</WeaponTypeTag>
            <WeaponTypeSoundOverrideTag>EXPLOSION200POUND</WeaponTypeSoundOverrideTag>
        </Row>
    </ArtDefine_UnitMemberCombatWeapons>

    <UnitGameplay2DScripts>
        <Row>
            <UnitType>UNIT_WAW_WW2_NUKE_2</UnitType>
            <SelectionSound>AS2D_SELECT_GUIDED_MISSILE</SelectionSound>
            <FirstSelectionSound>AS2D_BIRTH_GUIDED_MISSILE</FirstSelectionSound>
        </Row>
    </UnitGameplay2DScripts>


    <ArtDefine_StrategicView>
        <Row>
            <StrategicViewType>ART_DEF_UNIT_WAW_WW2_NUKE_2</StrategicViewType>
            <TileType>Unit</TileType>
            <Asset>SV_GuidedMissile.dds</Asset>
        </Row>
    </ArtDefine_StrategicView>


    <Language_en_US>
        <Row Tag="TXT_KEY_UNIT_WAW_WW2_NUKE_2">
            <Text>V1 Rocket</Text>
        </Row>
        <Row Tag="TXT_KEY_UNIT_WAW_WW2_NUKE_2_STRATEGY">
            <Text>
                The V1 Rocket is a one-shot unit which is destroyed when it attacks an enemy target. It may be based in a player-owned friendly city or unit that can carry missiles. They may move from base to base or attack an enemy unit or city with their range of '4'. See the rules on Missiles for more information.
            </Text>
        </Row>
        <Row Tag="TXT_KEY_UNIT_WAW_WW2_NUKE_2_HELP">
            <Text>A rudimentary missile that may be used once to damage nearby enemy Units or Cities.</Text>
        </Row>
        <Row Tag="TXT_KEY_UNIT_WAW_WW2_NUKE_2_PEDIA">
            <Text>
                The V1 Rocket is a World War II Era Missile Unit, available at the discovery of Synthetics. It becomes obsolete at the discovery of Jet Engines. Upgrades to the V2 Rocket.[NEWLINE][NEWLINE]The V-1 flying bomb (German: Vergeltungswaffe 1 "Vengeance Weapon 1")—also known to the Allies as the buzz bomb, or doodlebug, and in Germany as Kirschkern (cherrystone) or Maikaefer (maybug)—was an early cruise missile and the only production aircraft to use a pulsejet for power.[NEWLINE][NEWLINE]The V-1 was the first of the so-called "Vengeance weapons" (V-weapons or Vergeltungswaffen) series designed for terror bombing of London. It was developed at Peenemünde Army Research Center in 1939 by the Nazi German Luftwaffe during the Second World War. During initial development it was known by the codename "Cherry Stone". Because of its limited range, the thousands of V-1 missiles launched into England were fired from launch facilities along the French (Pas-de-Calais) and Dutch coasts.[NEWLINE][NEWLINE]The first V-1 was launched at London on 13 June 1944, one week after (and prompted by) the successful Allied landings in Europe. At peak, more than one hundred V-1s a day were fired at south-east England, 9,521 in total, decreasing in number as sites were overrun until October 1944, when the last V-1 site in range of Britain was overrun by Allied forces. After this, the V-1s were directed at the port of Antwerp and other targets in Belgium, with 2,448 V-1s being launched. The attacks stopped only a month before the war in Europe ended, when the last launch site in the Low Countries was overrun on 29 March 1945.[NEWLINE][NEWLINE]The British operated an arrangement of air defenses, including anti-aircraft guns and fighter aircraft, to intercept the bombs before they reached their targets as part of Operation Crossbow, while the launch sites and underground V-1 storage depots were targets of strategic bombing.
            </Text>
        </Row>
    </Language_en_US>

</GameData>


Using SQLiteSpy - I can see all the database updates, so the unit is added correctly - something I knew because it actually works in game.
 
Last edited:
OK - completely disregard post #4. I tried to recreate the test where I disabled the unit and the CTD went away (like yesterday), but in subsequent versions, the crash came back - even the working version yesterday is now broken.

It's obvious to me that a different error is introducing some kind of instability that presents itself as a crash in Strat View - even though it has nothing to do with Strat View.

Database logs are fine, Lua log looks normal, so it's nothing obvious.

I must have entered some kind of change that violates the rules. Am even checking things like text key updates to make sure they're syntactically correct.

Anyways, since the error is due to a bizzaro kind of conflict, I don't suppose anyone can help with this one. Sometimes, I really, really, really don't like Civ 5... :hammer2:
 
Top Bottom