Page 1 of 10 12345678910 LastLast
Results 1 to 20 of 188

Thread: Crashes and how to fix them

  1. #1

    Default Crashes and how to fix them

    Guide to crashes

    The purpose of this guide is to explain what is causing the various types of crashes to desktop (CTD) in mods and provide some advice on how to fix them.

    Before I begin I would like to point out that the best way to resolve a crash is to add the following line to your mod's .cfg file.

    Code:
    [log]
      to = logs/system.log.txt
      level = * error
    This will give you a log report which contains basic information about the crash.

    Code:
    [log]
      to = logs/system.log.txt
      level=*script* trace
    This will give you a log report which contains more information about the crash.

    Code:
    [log]
       to = logs/system.log.txt
       level = ai.ltgd trace
    This will give you a log report which contains information about what the AI was doing when the crash occurred.

    Code:
    [log]
       to = logs/system.log.txt
       level=*script* trace
    This will give you a log report which contains the most information about the crash, though it's hard to read.

    Always check the error log in the 'Medieval II Total War\logs' folder to find out which file is causing problems (default location 'C:\Program Files\SEGA\Medieval II Total War\logs'). The error is usually at the bottom of the error log as they're the last thing it records before it crashes. Though some errors are recorded part way through the error log; such as a missing skeleton, a missing mount, and a building gap.

    If you think a file is causing problem change its name and see if this fixes the problem (if M2TW can't find a file it reverts to the default version). If this fixes the problem then you know this file is faulty.

    Common abbreviations:
    EBD: export_descr_buildings.txt
    EBU: export_descr_unit.txt

    Mod CTD and without starting

    CTD on startup
    Q: When you start the mod you get a black screen and the mod CTDs.

    A: There is an erronous entry in the data\unit_models\battle_models.modeldb, normally a reference to an non-existant mesh or texture, or an entry is incorrect. You won't recieve any help in the log for this so you'll have to check your entries manually.

    The easiest way to check this file is to use the 'formatted_modeldb_version2' by 'KnightErrant' here:
    http://www.twcenter.net/forums/downl...o=file&id=1180

    First format the battle_models.modeldb, then use the checking program. This will find most errors. For the remaining errors the easiest way to find them is to edit the number in the battle_models.modeldb highlighted below in red.

    Code:
    22 serialization::archive 3 0 0 0 0 985 0 0
    This number tells M2TW how many entries there are in this file. It you change it from 985 to 500 M2TW will only check the first 500 entries before starting the mod. If the error is not in the first 500 the mod will load to the splash screen (though it is likely to crash for other reasons). If the error is in the first 500 entries M2TW will still CTD.

    By changing the number it is possible to find the exact entry that is causing the problem (though you'll need to use KnightErrant's checking program to find out which unit this is).

    The only problem with changing this number is that if it is set to a number higher than the number of units in the mod it will cause a crash.

    CTD on startup vRAM
    Q: When you start the mod you get a black screen and the mod CTDs. The logs say you lack enough vRAM.

    A: There are two possible causes for this.

    1) A texture for a campaign (strategy) map unit cannot be found. This can be resolved by checking that the all the textures mentioned in the 'data\descr_model_strat.txt' file are in the 'data\models_strat\textures'.

    2) The cas file's texture is not present in an entry in the 'data\descr_model_strat.txt' file (such as 'northern_general' or 'islamic_merchant'). Each cas file has a texture assigned to it and if the cas file cannot find this texture in the entry using the cas file it will crash. There is no easy way to determine which tga the cas file wants, though Errant Knight's cas to m3sd program does tell you which tga file the cas file uses when you convert a cas file to an m3sd file and vice verse.

    Black screen CTD
    Q: When you start the mod you get a black screen and it it will not disappear unit you hit the 'return' key. Often it's replaced with a black version of the intro.

    A: This normally occurs when you sound system has been disabled. You can re-enable it by clicking on the 'Control Panel', then 'Administrative Tools', then 'Services', then scroll down in the pop-up until you find 'Windows Audio'. Starting this should fix this problem (if not reboot your computer).

    Mod loads, then CTD without starting

    Loading CTD
    Q: The game starts to load, then CTD.

    A: This usually occurs because an entry can't be found in the 'data\export_descr_buildings.txt' or 'data\export_descr_unit.txt'. The log files should tell you which unit or building is missing.

    Loading CTD after adding a new building
    Q: The game starts to load, then CTD.

    A: If the description for the building is missing in the 'data/text/export_buildings.txt' the mod won't load and the missing building won't be listed. The best way to find the missing building is to use the 'level=*script* trace' to find the last building that was processed and check the 'data\export_descr_buildings.txt' to see which building came after it.

    Loading game CTD, with Insufficient video memory error message
    Q: The game starts to load, then CTD and error log says there is 'Insufficient video memory'.

    A: This is normally caused when you tell M2TW to look for an image file that doesn't exist. The this is normally due to an error in the descr_model_strat.txt. Ensure that all the image paths (eg models_strat/textures/southern_ambasador_papacy.tga) lead to an image file (.tga) and the spelling is correct.

    If both are correct ensure that in every entry the .cas file has its .tga file assigned to one faction (without opening the cas file it's impossible to tell which tga file it needs). If this tga file is not listed in the 'descr_model_strat.txt' entry the mod will crash. For example any entry using the 'late_general_northern.CAS' has to have one faction assigned the 'late_general_england_strat.tga' or the mod will crash.

    Below is an example. The 'mesoamerican_king.cas' requires the 'mesoamerican_king_mayans.tga'. The following will produce an 'Insufficient video memory' error because the 'mesoamerican_king_mayans.tga' has not been assigned to the 'mesoamerican_king.cas'.

    Code:
    type                mesoamerican_king
       skeleton            strat_named_with_army
       scale                0.7
       indiv_range            40
       texture                aztecs, models_strat/textures/mesoamerican_king_aztecs.tga
       texture                mayans, models_strat/textures/mesoamerican_king_aztecs.tga
       texture                tlaxcalans, models_strat/textures/mesoamerican_king_tlaxcalans.tga
       texture                tarascans, models_strat/textures/mesoamerican_king_tarascans.tga
       texture                slave, models_strat/textures/mesoamerican_king_aztecs.tga
       model_flexi_m            models_strat/mesoamerican_king.CAS, max
       shadow_model_flexi        models_strat/shadow_sword.CAS, max
    But this one will work because the 'mesoamerican_king_mayans.tga' has been assigned to the 'mesoamerican_king.cas'.

    Code:
    type                mesoamerican_king
       skeleton            strat_named_with_army
       scale                0.7
       indiv_range            40
       texture                aztecs, models_strat/textures/mesoamerican_king_aztecs.tga
       texture                mayans, models_strat/textures/mesoamerican_king_mayans.tga
       texture                tlaxcalans, models_strat/textures/mesoamerican_king_tlaxcalans.tga
       texture                tarascans, models_strat/textures/mesoamerican_king_tarascans.tga
       texture                slave, models_strat/textures/mesoamerican_king_aztecs.tga
       model_flexi_m            models_strat/mesoamerican_king.CAS, max
       shadow_model_flexi        models_strat/shadow_sword.CAS, max
    CTD after removing regions
    Q: After removed most of the regions the mod CTDs. The error message just says the mod has crashed.

    A: M2TW requires a mininium of 10 regions, so try adding some more. Also you have to delete the data\world\maps\base\map.rwm file everytime you alter the data\world\maps\base\map_regions.tga file.

    CTD after adding a lot of regions
    Q: After adding a lot of new regions the mod CTDs. The error message just says the mod has crashed.

    A: M2TW cannot have more than 198 regions and 1 sea, so try deleting some. Also you have to delete the data\world\maps\base\map.rwm file everytime you alter the data\world\maps\base\map_regions.tga file.

    CTD after editing some regions, no map.rwm
    Q: After moding the map_regions.tga file, deleting the map.rwm, and selecting a faction the mod CTDs without generating a new map.rwm file. The error message just says the mod has crashed.

    A: This is caused by one of the following.
    1) One or more regions does not have a black pixel representing a settlement.
    2) One or more of the pixels is the wrong colour, causing M2TW to treat it as a new region without a settlement.
    3) One or more regions has the black pixel touching mutiple regions (it must be located inside only one region).

    To resolve the first 3 you need to ensure all the pixels are the correct colour (even a small variation that is invisible to the human eye will cause the mod to crash). To resolve the 4th problem you need to move the black pixel.

    M2TW works just fine if one or more regions by the sea does not have a white pixel representing a port.

    CTD after editing some regions, no map.rwm but map.rwm is generated if the sea is turned into land

    Q: After moding the map_regions.tga file, deleting the map.rwm, and selecting a faction the mod CTDs without generating a new map.rwm file. However a map.rwm is generated if all the sea in the 'map_heights.tga' is turned into land. The error message just says the mod has crashed.

    A: M2TW has a limit of 20 land masses per map. If there are more then 20 land masses the mod will crash. To fix this either merge the islands together or add a pixel of each island to another island, so M2TW believes they are one land mass (see this thread for more details).

    http://www.twcenter.net/forums/showt...97#post4343897

    CTD after adding some regions, map.rwm generated
    Q: After moding the map_regions.tga file, deleting the map.rwm, and selecting a faction the mod CTDs but generates a new and complete map.rwm file. The error message just says the mod has crashed.

    A: This can be caused by:
    1) The RGB (Red Green Blue) colour of a region does not matching the colour in the data\world\maps\base\descr_regions.txt (usually the problem). Fixing the incorrect entry will solve this problem.
    2) The settlement in the region is in an inaccessable area eg in a forest or up a mountain (the error log normally tells you which settlement is on an 'invalid tile'). To fix this move the black pixel elsewhere (this is mainly trial and error).
    3) You have assigned units to a settlement in the 'data\world\maps\campaign\imperial_campaign\descr_strat.txt' file but that have not added this settlement to the descr_strat file. This error also says that you have choosen an 'invalid tile' for the settlement.
    4) The region's settlement is in the sea (the error log tells you where the problem settlement is at location (0,0)). To fix this move the black pixel further inland (this is mainly trial and error).
    5) Some graphics programs cannot generate map_regions.tga files that M2TW will accept. I had this problem when I edited the map_regions.tga file using Photoshop Elements 4.0 but not when I switched to Gimp.

    Mod CTD during game, viewing the strat map

    Loading or during game CTD, with no error message
    Q: The game CTD and error log just says the mod has crashed.

    A: This is normally caused by one of the files in the data/text folder not containing all the required information. It's often the data/text/expanded.txt but not always.

    Faction selection CTD, missing region
    Q: The mod crashes CTDs when you try to play as a specific faction, error message says a province is missing.

    A: There are 4 files that deal with provinces:
    data\text\imperial_campaign_regions_and_settlement_names.txt
    data\world\maps\base\descr_regions.txt
    data\world\maps\campaign\imperial_campaign\descr_strat.txt
    data\world\maps\campaign\imperial_campaign\descr_win_conditions.txt

    The make sure the missing province appears in the first three of these and that the missing province is spelled correctly in all of them.

    CTD when nearby a region
    Q: When you get near to a region M2TW crashes. The error log says nothing.

    A: If a region is too large this can cause M2TW to crash. To fix this try breaking the region up into smaller regions.

    CTD while trying to view a settlement in a region
    Q: When you try to view a settlement in a region M2TW crashes. The error log says nothing.

    A: This can be caused by a settlement having a total religious level that is not 100. To fix this you need to open the 'data\world\maps\base\descr_regions.txt' file and change the religious levels in the problem settlment so that they are 100 in total. Then delete the 'data\world\maps\base\map.rwm' file so the changes will take effect.

    CTD while trying to view a rebel settlement in a region
    Q: When you try to view a rebel settlement in a region M2TW crashes. The error log says nothing.

    A: If a rebel settlement contains rebels that the slave faction is not allowed to have M2TW will crash (unlike other factions which are fine regardless of units in a settlement). To fix this problem open the 'data\world\maps\base\descr_regions.txt' file and find which rebels are in the problem settlement. Then open the 'data/descr_rebel_factions.txt' file, find the problem rebel group, and replace their units with units from another rebel group. Test to see if this fixes the problem. If it doesn't try a different rebel group until M2TW stops crashing. Once you've got a working rebel group you can try changing the units present to get rebels that suit the region.

    Mod CTD during game, other strat map, during first turn

    Building crash
    Q: Game crashes at the start when you try to bring up a settlement's building browser.

    A: Either this settlement starts with a building this faction cannot have (this only causes a crash at the start of the game), or there's an error in the data\export_descr_buildings.txt file regarding one of the settlement's buildings [thanks to Monkwarrior].

    Unit crash
    Q: Game crashes when you try to get the information about a unit or when you go to battle with a particular unit.

    A: The data\export_descr_unit.txt info for that unit contains an error. Make sure the tabs and spaces are in the right place, information is not missing or duplicated, and that the 'soldier' line refers to a an actual unit (try not to change this).

    Faction Crash
    Q) The mod crashes when you try to play as a particular faction and during this faction's turn. However the problem faction works fine in Custom Battles.

    A) Check that the entry for 'ai_label' in the data/world/maps/campaign/imperial_campaign/desc_strat.txt appears in the 'data/descr_campaign_ai_db.xml' [thanks to dp_best].

    Mod CTD during game, other strat map, after several turns

    Start of turn crash
    Q: The game crashes at the start of the player's turn.

    A: This can be caused by an event that is in the 'data\world\maps\campaign\imperial_campaign\campaign_script.txt' or 'data\world\maps\campaign\imperial_campaign\descr_events.txt' (default locations 'C:\Program Files\SEGA\Medieval II Total War\data\world\maps\campaign\imperial_campaign') but is not listed in the 'data/text/historic_events.txt' file. Adding this event to the 'data/text/historic_events.txt' will fix this error (this file is case sensitive).

    5th turn crash
    Q: The game crashes at the end of the fifth turn / start of the fifth turn.

    A: I actually had this error, it's not a joke. This error is caused when I tried to exclude the following trait in the data\export_descr_character_traits.txt file from a culture.

    Code:
    ;------------------------------------------
    Trait ReligionStarter
        Characters family
        Hidden
    
        Level General_Religion
            Description General_Religion_desc
            EffectsDescription General_Religion_effects_desc
            Threshold  1 
    
            Effect Piety  3 
    
    ;------------------------------------------
    Whenever one of the excluded cultures got a new general, who is supposed to automatically get this trait, the mod crashed. Excluding other hidden traits can also cause crashes.

    20th turn crash
    Q: The game crashes during the AI's turn at about turn 20 and the error log just says the mod has crashed.

    A: I had this error and it took me a long time to fix it. This error occurred because I increased the number of children allowed in the data/descr_campaign_db.xml file. When the AI's family had more than 4 children the mod crashed.

    Game crashes during the AI's turn
    Q: The game crashes during the AI's turn and the error log just says the mod has crashed.

    A: There are several possible causes:

    1) The trigger for a trait is incorrectly written. I once had this problem when the trigger's 'WhenToTest' was 'GeneralAssaultsGeneral', rather than 'PostBattle'. You can test this by deleting the triggers of all your traits in the 'data/export_descr_ancillaries.txt' and 'data/export_descr_character_traits.txt' files (create backups before doing this) and loading the mod to see if the crash stops.

    2) A culture has a trait excluded but the corrisponding 'antitrait' is not excluded. This causes a problem when a general or agent switches from a trait to its antitrait (due to a loss or gain of skill points).

    3) The mod will also crash if an agent without a name gets an Epithet. This can be fixed by changing the agent's name in the 'data\world\maps\campaign\imperial_campaign\descr_strat.txt' and restarting the mod so it uses the new name.

    Player and Slave crash

    Q: The mod crashes after 4-6 turns when the only remaining factions are the player and slave. The slave factions does not have viable victory conditions.

    A: The mod will crash if there is only one factions left with viable victory conditions but they have not achieved victory. Giving the slave factions viable victory conditions will remove this error (controlling every province is NOT a viable victory condition, nor is controlling more provinces then there are in the mod).

    Mod CTD during game, Battle map

    Battle crash, any unit
    Q: The mod crashes while loading for battle regardless of what units or factions will be fighting in the battle.

    A: Most likely there are multiple spaces in the 'data\unit_models\battle_models.modeldb' file when there should only be one or two spaces (this won't cause the mod to crash when loading, unlike a number or spelling error). Carefully checking the battle_models.modeldb file or the reverting to a backup is the only way to fix this.

    Battle crash after adding an officer to a unit
    Q: After adding an officer to a unit in the 'data/export_descr_unit.txt' the mod crashes while loading for battle regardless of what units or factions will be fighting in the battle.

    A: The officer entry must appear in the 'data\unit_models\battle_models.modeldb' file or the mod will crash. Unfortunately the error log doesn't say which officer has caused the crash so you have to search through all the entries until you find the one causing the crash. Make several backups before adding officers.

    Battle crash, specific unit
    Q: The mod crashes while loading for battle when a specific unit will be fighting in that battle.

    A: Most likely the path to the unit's mesh, texture, or sprite is incorrect in the 'data\unit_models\battle_models.modeldb' file. To fix this problem find the unit's entry in the battle_models.modeldb and check the location and name of the texture and mesh are correct (this problem may only affect one faction's unit).

    Battle crash, many units together
    Q: The mod crashes when a lot of units fight in a very small area.

    A: If too many units fight in a small area M2TW is unable to handle this and crashes (this often happens in castle sieges). Reducing the unit size can prevent this.

    Custom Battles

    Unit selection crash
    Q:The mod crashes after you select the factions you want and click next, but before the unit selection screen appears.
    A: If one of the selected factions has too many units assigned to it M2TW will crash. I have not determined the maximum number of units but I did get a faction to work with 192 units.

    Other errors that don't cause CTD

    Building gap at the end of the export_descr_buildings.txt
    Q: The error log says there is a building gap but the line number of the error is for the bottom of the 'data/export_descr_buildings.txt' .

    Code:
    00:41:51.734 [script.err] [error] Script Error in mods/conquest/data/export_descr_buildings.txt, at line 9078, column 2
      Building DB error - faction aztecs has gap in building prior to stone_wall
      00:41:51.750 [script.err] [error] Script Error in mods/conquest/data/export_descr_buildings.txt, at line 9078, column 2
      Building DB error - faction aztecs has gap in building prior to large_stone_wall
      00:41:51.750 [script.err] [error] Script Error in mods/conquest/data/export_descr_buildings.txt, at line 9078, column 2
      Building DB error - faction aztecs has gap in building prior to huge_stone_wall
      00:41:51.750 [data.invalid] [error] Target building level not allowed: Inca Empire, castle -> large_town, core_castle_building[2](castle) -> core_building[1](wooden_wall)
      00:41:51.750 [data.invalid] [error] Target building level not allowed: Inca Empire, fortress -> city, core_castle_building[2](castle) -> core_building[1](wooden_wall)
      00:41:51.750 [data.invalid] [error] Target building level not allowed: Inca Empire, citadel -> city, core_castle_building[2](castle) -> core_building[1](wooden_wall)
    A: If a faction or culture is not listed at an early level of a building tree but is listed at a later level this generate an error. Unfortunately the error log states that the error is at the end of the 'data/export_descr_buildings.txt' instead of the correct line.

    A: The easiest way to fix this error is to search the 'data/export_descr_buildings.txt' for the first building the error log lists (in this case 'stone_wall') and check the building level before it (in this case the 'wooden_wall' level of the 'core_building' building tree).

    Code:
            wooden_wall city requires factions { northern_european, middle_eastern, eastern_european, southern_european, }
    As the faction listed in the error log is the aztecs by adding them to this building level I can fix this error.

    Code:
            wooden_wall city requires factions { northern_european, aztecs, mesoamerican, middle_eastern, eastern_european, southern_european, }


    Missing Skeleton

    Q: The error log says that a skeleton is missing for a secondary weapon.

    Code:
    01:07:29.687 [script.err] [error] Script Error in mods/conquest/data/export_descr_unit.txt, at line 3149, column 1
      Missing skeleton for secondary weapon in model type 'magyar_swordsmen', used by unit 'Hungarian Crossbowmen'.
    A: The is error means that you've assigned a one weapon 'soldier' model to a two weapon unit in the 'data/export_descr_unit.txt'. The soldier models are listed at the end of every unit entry in the 'data/unit_models/battle_models.modeldb' and can give a unit one weapon or two (cavalry and missile units usually have two weapons, while melee infantry usually only has one).

    To fix this error find the problem unit ('Hungarian Crossbowmen' in this example) and change their 'soldier' line to another unit.

    For example this entry:
    Code:
    type             Hungarian Crossbowmen
      dictionary       Hungarian_Crossbowmen      ; Crossbowmen
      category         infantry
      class            skirmish
      voice_type       Light
      accent         East_European
      banner faction   main_missile
      banner holy      crusade
      soldier          magyar_swordsmen, 48, 0, 0.8
    Is edited so the 'soldier' used is now 'Crossbowmen', rather than a 'magyar_swordsmen'.
    Code:
    type             Hungarian Crossbowmen
      dictionary       Hungarian_Crossbowmen      ; Crossbowmen
      category         infantry
      class            skirmish
      voice_type       Light
      accent         East_European
      banner faction   main_missile
      banner holy      crusade
      soldier          Crossbowmen, 48, 0, 0.8
    Other
    Additional information on crashes and how to solve them is appreciated.
    Last edited by uanime5; September 13, 2009 at 08:14 PM.
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  2. #2

    Default Re: Crashes and how to fix them

    I added Diiplomat, Priest, Assassin and Spy to aztecs (from Kingdoms) and my log file :
    Code:
    15:01:35.488 [system.rpt] [always] CPU: SSE2
    15:01:35.488 [system.rpt] [always] ==== system log start, build date: Jun 25 2007 version bld-medieval2-update2.1-30 (43169) ===
    15:01:35.503 [system.io] [always] mounted pack packs/data_0.pack
    15:01:35.503 [system.io] [always] mounted pack packs/data_1.pack
    15:01:35.503 [system.io] [always] mounted pack packs/data_2.pack
    15:01:35.503 [system.io] [always] mounted pack packs/data_3.pack
    15:01:35.503 [system.io] [always] mounted pack packs/data_4.pack
    15:01:35.503 [system.io] [always] mounted pack packs/localized.pack
    15:01:41.612 [data.invalid] [error] Target building level not allowed: The Aztecs, large_town -> castle, port[0](port) -> castle_port[0](c_port)
    15:02:00.354 [data.invalid] [error] REGIONS_DB: default faction(7) for region (1) isn't present in the descr_strat.txt file.
    15:02:00.354 [data.invalid] [error] REGIONS_DB: default faction(13) for region (2) isn't present in the descr_strat.txt file.
    15:02:00.354 [data.invalid] [error] REGIONS_DB: default faction(13) for region (3) isn't present in the descr_strat.txt file.
    15:02:00.354 [data.invalid] [error] REGIONS_DB: default faction(13) for region (9) isn't present in the descr_strat.txt file.
    15:02:00.354 [data.invalid] [error] REGIONS_DB: default faction(7) for region (10) isn't present in the descr_strat.txt file.
    15:02:00.354 [data.invalid] [error] REGIONS_DB: default faction(7) for region (12) isn't present in the descr_strat.txt file.
    15:02:00.354 [data.invalid] [error] REGIONS_DB: default faction(15) for region (18) isn't present in the descr_strat.txt file.
    15:02:00.355 [data.invalid] [error] REGIONS_DB: default faction(15) for region (20) isn't present in the descr_strat.txt file.
    15:02:00.355 [data.invalid] [error] REGIONS_DB: default faction(2) for region (21) isn't present in the descr_strat.txt file.
    15:02:00.355 [data.invalid] [error] REGIONS_DB: default faction(2) for region (25) isn't present in the descr_strat.txt file.
    15:02:00.355 [data.invalid] [error] REGIONS_DB: default faction(15) for region (26) isn't present in the descr_strat.txt file.
    15:02:00.355 [data.invalid] [error] REGIONS_DB: default faction(15) for region (27) isn't present in the descr_strat.txt file.
    15:02:00.355 [data.invalid] [error] REGIONS_DB: default faction(15) for region (29) isn't present in the descr_strat.txt file.
    15:02:00.355 [data.invalid] [error] REGIONS_DB: default faction(2) for region (32) isn't present in the descr_strat.txt file.
    15:02:00.355 [data.invalid] [error] REGIONS_DB: default faction(2) for region (33) isn't present in the descr_strat.txt file.
    15:02:00.355 [data.invalid] [error] REGIONS_DB: default faction(2) for region (36) isn't present in the descr_strat.txt file.
    15:02:00.356 [data.invalid] [error] REGIONS_DB: default faction(2) for region (39) isn't present in the descr_strat.txt file.
    15:02:00.356 [data.invalid] [error] REGIONS_DB: default faction(2) for region (41) isn't present in the descr_strat.txt file.
    15:02:00.356 [data.invalid] [error] REGIONS_DB: default faction(16) for region (42) isn't present in the descr_strat.txt file.
    15:02:00.356 [data.invalid] [error] REGIONS_DB: default faction(16) for region (44) isn't present in the descr_strat.txt file.
    15:02:00.356 [data.invalid] [error] REGIONS_DB: default faction(16) for region (46) isn't present in the descr_strat.txt file.
    15:02:00.356 [data.invalid] [error] REGIONS_DB: default faction(2) for region (48) isn't present in the descr_strat.txt file.
    15:02:00.356 [data.invalid] [error] REGIONS_DB: default faction(2) for region (50) isn't present in the descr_strat.txt file.
    15:02:00.356 [data.invalid] [error] REGIONS_DB: default faction(2) for region (51) isn't present in the descr_strat.txt file.
    15:02:00.356 [data.invalid] [error] REGIONS_DB: default faction(16) for region (54) isn't present in the descr_strat.txt file.
    15:02:00.356 [data.invalid] [error] REGIONS_DB: default faction(6) for region (55) isn't present in the descr_strat.txt file.
    15:02:00.357 [data.invalid] [error] REGIONS_DB: default faction(16) for region (60) isn't present in the descr_strat.txt file.
    15:02:00.357 [data.invalid] [error] REGIONS_DB: default faction(8) for region (61) isn't present in the descr_strat.txt file.
    15:02:00.357 [data.invalid] [error] REGIONS_DB: default faction(6) for region (65) isn't present in the descr_strat.txt file.
    15:02:00.357 [data.invalid] [error] REGIONS_DB: default faction(8) for region (67) isn't present in the descr_strat.txt file.
    15:02:00.357 [data.invalid] [error] REGIONS_DB: default faction(8) for region (71) isn't present in the descr_strat.txt file.
    15:02:00.357 [data.invalid] [error] REGIONS_DB: default faction(14) for region (72) isn't present in the descr_strat.txt file.
    15:02:00.357 [data.invalid] [error] REGIONS_DB: default faction(8) for region (73) isn't present in the descr_strat.txt file.
    15:02:00.357 [data.invalid] [error] REGIONS_DB: default faction(6) for region (74) isn't present in the descr_strat.txt file.
    15:02:00.357 [data.invalid] [error] REGIONS_DB: default faction(8) for region (75) isn't present in the descr_strat.txt file.
    15:02:00.358 [data.invalid] [error] REGIONS_DB: default faction(5) for region (77) isn't present in the descr_strat.txt file.
    15:02:00.358 [data.invalid] [error] REGIONS_DB: default faction(8) for region (81) isn't present in the descr_strat.txt file.
    15:02:00.358 [data.invalid] [error] REGIONS_DB: default faction(5) for region (86) isn't present in the descr_strat.txt file.
    15:02:00.358 [data.invalid] [error] REGIONS_DB: default faction(8) for region (88) isn't present in the descr_strat.txt file.
    15:02:00.358 [data.invalid] [error] REGIONS_DB: default faction(5) for region (94) isn't present in the descr_strat.txt file.
    15:02:00.358 [data.invalid] [error] REGIONS_DB: default faction(8) for region (95) isn't present in the descr_strat.txt file.
    15:02:00.358 [data.invalid] [error] REGIONS_DB: default faction(8) for region (97) isn't present in the descr_strat.txt file.
    15:02:00.358 [data.invalid] [error] REGIONS_DB: default faction(8) for region (102) isn't present in the descr_strat.txt file.
    15:02:00.358 [data.invalid] [error] REGIONS_DB: default faction(8) for region (103) isn't present in the descr_strat.txt file.
    15:02:00.403 [script.err] [error] Script Error in hotseat/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 2587, column 58
    you have chosen an invalid tile(150, 67) for Mohsen (moors)
    15:02:00.404 [script.err] [error] Script Error in hotseat/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 2602, column 65
    you have chosen an invalid tile(130, 83) for Hassan Saidi-Sief (moors)
    15:02:00.427 [script.err] [error] Script Error in hotseat/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 3574, column 81
    you have chosen an invalid tile(181, 143) for Genghis Khan (mongols)
    15:02:00.428 [script.err] [error] Script Error in hotseat/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 3590, column 1
    The character record Khanzada Subutai is set as faction heir but is not in the family tree.
    15:02:00.433 [script.err] [error] Script Error in hotseat/data/world/maps/campaign/imperial_campaign/descr_strat.txt, at line 3946, column 1
    The character record Khanzada Eligedei the Mighty is set as faction heir but is not in the family tree.
    15:02:04.907 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.

  3. #3
    TMK's Avatar BC Local Moderator
    Join Date
    Jun 2010
    Location
    England
    Posts
    1,606

    Default Re: Crashes and how to fix them

    Looks like some family tree problems, check them and see if they are any things which should not be there.




  4. #4

    Default Re: Crashes and how to fix them

    Hey guys,

    I've been attempting to add a new unit to the campaign and I keep getting crashes (the log does not indicate what may cause the crash). I've isolated the problem to the mesh files, but the game continues to crash even if I just rename the byzantine_cavalry_ug2.lod0.mesh and the same lod1 and lod2 meshes for use with the unit.

    The game crashes only when I attempt to load the unit (kataphraktoi archers) in a custom battle or when fighting a battle with them in the grand campaign (crashes on the battle's loading screen, shortly after the loading bar indicates that it has completed loading) and I have no idea why the battle map would crash even using native, CA-generated files that have been renamed but not otherwise modified. Any ideas?

  5. #5

    Default Re: Crashes and how to fix them

    Try adding the unit in the middle of the battlemodels.db file, if it loads then you have an incorrect string count...

  6. #6

    Default Re: Crashes and how to fix them

    After adding an extra faction, the mod ctd after the startup.

    I haven't touched the modeldb nor edu, only descr_character, descr_banners_new.xml, descr_model_strat, descr_lbc_db, descr_names, descr_offmap_models, descr_sm_factions and finally descr_strat.

    How it looks
    Spoiler Alert, click show to read: 


    The log doesn't was nothing

    Anyone has an idea ?
    Last edited by Ishan; May 01, 2012 at 06:44 AM. Reason: Added Spoiler

  7. #7

    Default Re: Crashes and how to fix them

    Yeah, use spoiler tags for huge (and mostly pointless) pictures.

    You might have to add a generals unit at least to EDU, or at least one unit...
    You also need to add the models and textures referenced in descr_models_strat and the textures for banners etc.

  8. #8

    Icon5 Re: Crashes and how to fix them

    Crashes when i try to continue another campaign which crashed during the AI turn

    log

    Code:
     
    05:27:55.919 [system.io] [info] open:   found data/loading_screen/loading_screen_8.tga (from: C:\Program Files (x86)\SEGA\Medieval II Total War)
    05:27:55.939 [system.io] [info] exists: missing mods/Bare_Kingdoms/data/descr_transition_screen.txt
    05:27:55.941 [system.io] [trace] file open,,137412C8,6005
    05:27:55.941 [system.io] [info] open:   found data/descr_transition_screen.txt (from: C:\Program Files (x86)\SEGA\Medieval II Total War)
    05:27:55.942 [system.io] [info] exists: missing mods/Bare_Kingdoms/data/loading_screen/loading_logo.tga
    05:27:55.942 [system.io] [info] exists: missing data/loading_screen/loading_logo.tga.dds
    05:27:55.942 [system.io] [info] exists:   found data/loading_screen/loading_logo.tga (from: C:\Program Files (x86)\SEGA\Medieval II Total War)
    05:27:55.942 [system.io] [info] exists: missing mods/Bare_Kingdoms/data/loading_screen/loading_logo.tga
    05:27:55.942 [system.io] [trace] file open,,data/loading_screen/loading_logo.tga.dds,,not found
    05:27:55.942 [system.io] [trace] pack open,packs/localized.pack,data/loading_screen/loading_logo.tga.dds,,not found
    05:27:55.943 [system.io] [trace] pack open,packs/data_0.pack,data/loading_screen/loading_logo.tga.dds,,not found
    05:27:55.943 [system.io] [warning] open: data/loading_screen/loading_logo.tga.dds is missing
    05:27:55.943 [system.io] [trace] file open,,data/loading_screen/loading_logo.tga,262188
    05:27:55.943 [system.io] [info] open:   found data/loading_screen/loading_logo.tga (from: C:\Program Files (x86)\SEGA\Medieval II Total War)
    05:27:56.915 [system.io] [info] exists: missing mods/Bare_Kingdoms/data/loading_screen/loading_bar.tga
    05:27:56.915 [system.io] [info] exists: missing data/loading_screen/loading_bar.tga.dds
    05:27:56.915 [system.io] [info] exists:   found data/loading_screen/loading_bar.tga (from: C:\Program Files (x86)\SEGA\Medieval II Total War)
    05:27:56.915 [system.io] [info] exists: missing mods/Bare_Kingdoms/data/loading_screen/loading_bar.tga
    05:27:56.916 [system.io] [trace] file open,,data/loading_screen/loading_bar.tga.dds,,not found
    05:27:56.916 [system.io] [trace] pack open,packs/localized.pack,data/loading_screen/loading_bar.tga.dds,,not found
    05:27:56.916 [system.io] [trace] pack open,packs/data_0.pack,data/loading_screen/loading_bar.tga.dds,,not found
    05:27:56.916 [system.io] [warning] open: data/loading_screen/loading_bar.tga.dds is missing
    05:27:56.917 [system.io] [trace] file open,,data/loading_screen/loading_bar.tga,262188
    05:27:56.917 [system.io] [info] open:   found data/loading_screen/loading_bar.tga (from: C:\Program Files (x86)\SEGA\Medieval II Total War)
    05:27:59.134 [system.rpt] [error] Uh oh. This isn't good. No idea why, but exiting now. Sorry pal.

  9. #9

    Default Re: Crashes and how to fix them

    Did you make any changes, in between the crash and trying to reload? If not then you really needed to post the original crash log report.

  10. #10

    Default Re: Crashes and how to fix them

    Yet to find a solution to why it crashed at the end of Defensive siege battles.

  11. #11

    Default Re: Crashes and how to fix them

    Possibly a bad trigger for a trait, certain log settings should help figure out which one.
    Example
    Code:
    [log]
    to=logs/akthross.system.log.txt
    level = * trace
    file = game.script.* logs/akthross.script2.log.txt
    file = game.script* logs/akthross.script.log.txt
    file = game.script logs/akthross.scriptoutput.log.txt
    file = ai.ltgd logs/akthross.ai.log.txt

  12. #12

    Default Re: Crashes and how to fix them

    Quote Originally Posted by The-Monetary View Post
    Yet to find a solution to why it crashed at the end of Defensive siege battles.
    if it isn't traits/script trigger - you can also have CTD's due to graphics overload
    http://www.twcenter.net/forums/showthread.php?t=284339
    generally sieges stress the engine/your computer and seem more likely to show up obscure problems

  13. #13

    Default Re: Crashes and how to fix them

    I'm trying to add the unit Hasham of Kingdoms to the Medieval.

    I copied the files (from Kingdoms):
    ME_Mail_Plate_Hvy_Mplate_turks.texture
    ME_Mail_Plate_Hvy_Mplate_normal.texture

    And renamed to:
    ME_Hasham_turks.texture
    ME_Hasham_normal.texture

    And put in unit_models / _Units / ME_Mail_Plate_Hvy_Mplate / textures

    But the game is not accepting, it does not start.
    When I replace the files:

    ME_Hasham_turks.texture
    ME_Hasham_normal.texture

    For these (from Medieval):
    ME_Mail_Plate_Hvy_Mplate_turks.texture
    ME_Mail_Plate_Hvy_Mplate_normal.texture

    Works ...
    But that's not the texture I want!

    Battle_models:

    Spoiler Alert, click show to read: 
    6 hasham
    1 4
    60 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/hasham_lod0.mesh 121
    60 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/hasham_lod1.mesh 900
    60 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/hasham_lod2.mesh 2500
    60 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/hasham_lod3.mesh 6400
    1
    5 turks
    91 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/textures/ME_Hasham_turks.texture
    92 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/textures/ME_Hasham_normal.texture
    36 unit_sprites/turks_Hasham_sprite.spr
    1
    5 turks
    66 unit_models/AttachmentSets/Final Middle Eastern_turks_diff.texture
    66 unit_models/AttachmentSets/Final Middle Eastern_turks_norm.texture 0
    1
    5 Horse
    13 MTW2_HR_Lance
    13 MTW2_HR_Sword 2
    21 MTW2_HR_Lance_Primary
    14 fs_test_shield 2
    18 MTW2_Sword_Primary
    14 fs_test_shield
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    10 hasham_ug1
    1 4
    64 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/hasham_ug1_lod0.mesh 121
    64 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/hasham_ug1_lod1.mesh 900
    64 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/hasham_ug1_lod2.mesh 2500
    64 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/hasham_ug1_lod3.mesh 6400
    1
    5 turks
    91 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/textures/ME_Hasham_turks.texture
    92 unit_models/_Units/ME_Mail_Plate_Hvy_Mplate/textures/ME_Hasham_normal.texture
    40 unit_sprites/turks_Hasham_ug1_sprite.spr
    1
    5 turks
    66 unit_models/AttachmentSets/Final Middle Eastern_turks_diff.texture
    66 unit_models/AttachmentSets/Final Middle Eastern_turks_norm.texture 0
    1
    5 Horse
    13 MTW2_HR_Lance
    13 MTW2_HR_Sword 2
    21 MTW2_HR_Lance_Primary
    14 fs_test_shield 2
    18 MTW2_Sword_Primary
    14 fs_test_shield
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002


    You can help?

    “He who turns the other cheek is a cowardly dog -- a Christian dog.”
    ― Ragnar Redbeard

  14. #14

    Default Re: Crashes and how to fix them

    That's because the string count is not correct for the lines containing the red.

  15. #15
    Beorn's Avatar Praepositus
    Join Date
    Jan 2009
    Location
    Athens
    Posts
    5,327

    Default Re: Crashes and how to fix them

    I opened my Kingdoms folder after a lot of months, and decided to add a new mount, but I got an errorless CTD
    Here's the models.db entry:
    Spoiler Alert, click show to read: 
    16 horse_unarmoured
    1.12 1
    56 unit_models/Mounts/Unarmoured/horse_unarmoured_lod0.mesh 15000
    3
    5 milan
    60 unit_models/Mounts/Unarmoured/textures/Eastern_basic.texture
    67 unit_models/Mounts/Unarmoured/textures/Eastern_basic_NORMAL.texture
    29 unit_sprites/rohan_sprite.spr
    5 turks
    61 unit_models/Mounts/Unarmoured/textures/Hellenic_basic.texture
    68 unit_models/Mounts/Unarmoured/textures/Hellenic_basic_NORMAL.texture
    29 unit_sprites/rohan_sprite.spr
    6 venice
    60 unit_models/Mounts/Unarmoured/textures/Iberian_basic.texture
    67 unit_models/Mounts/Unarmoured/textures/Iberian_basic_NORMAL.texture
    29 unit_sprites/rohan_sprite.spr 0 15 Horse
    14 fs_horse_marka 0
    0 0 -1 0 0 0 0 0 0


    the descr_mount one

    Spoiler Alert, click show to read: 
    type unarmoured horse
    class horse
    model horse_unarmoured
    radius 1.2
    x_radius 0.5
    y_offset 0.7
    height 2.5
    mass 3.0
    banner_height 0
    bouyancy_offset 1.8
    water_trail_effect horse_water_trail
    root_node_height 1.0
    ;rider_offset 0.0, 0.45, 0.35
    rider_offset 0.0, 0.38, 0.70


    and the edu changes(in red)

    Spoiler Alert, click show to read: 
    Spoiler Alert, click show to read: 
    type Variag Raiders
    dictionary Variag_Raiders ; Variag Raiders
    category cavalry
    class missile
    voice_type Heavy
    banner faction main_cavalry
    banner holy crusade
    soldier rhunvr, 30, 0, 1
    officer rhun_captain_early_flag
    mount unarmoured horse
    mount_effect elephant -4, camel -4
    attributes sea_faring, hide_forest, hardy, can_withdraw, cantabrian_circle, free_upkeep_unit
    formation 2, 4.4, 3, 6, 3, square
    stat_health 1, 3
    stat_pri 6, 2, cav_composite_arrow, 140, 25, missile, missile_mechanical, piercing, none, 0, 1
    stat_pri_attr no
    stat_sec 4, 2, no, 0, 0, melee, melee_blade, piercing, sword, 50, 1
    stat_sec_attr no
    stat_pri_armour 4, 2, 2, leather
    stat_sec_armour 0, 0, flesh
    stat_heat 0
    stat_ground -1, 1, -3, -2
    stat_mental 11, normal, trained
    stat_charge_dist 45
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 2, 630, 250, 75, 75, 630, 3, 150
    armour_ug_levels 1, 2
    armour_ug_models rhunvr, rhunvr_upg
    ownership venice
    era 0 venice
    era 1 venice
    era 2 venice
    recruit_priority_offset 8

    Spoiler Alert, click show to read: 
    type rohan rider
    dictionary rohan_rider ; rohan rider
    category cavalry
    class heavy
    voice_type Heavy
    banner faction main_cavalry
    banner holy crusade
    soldier rohan_rider, 36, 0, 1
    officer rohan_captain_early_flag
    mount unarmoured horse
    mount_effect elephant -4, camel -4
    attributes sea_faring, hide_forest, very_hardy, can_withdraw, can_formed_charge, free_upkeep_unit
    formation 2, 4.4, 3, 6, 2, square
    stat_health 1, 3
    stat_pri 6, 8, no, 0, 0, melee, melee_blade, piercing, spear, 25, 1
    stat_pri_attr no
    stat_sec 4, 3, no, 0, 0, melee, melee_blade, blunt, mace, 25, 1
    stat_sec_attr ap
    stat_pri_armour 4, 3, 3, metal
    stat_sec_armour 0, 0, flesh
    stat_heat 4
    stat_ground 0, 0, -2, -1
    stat_mental 13, normal, trained
    stat_charge_dist 45
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 780, 280, 100, 100, 780, 4, 100
    armour_ug_levels 2, 3
    armour_ug_models rohan_rider, rohan_rider_upg
    ownership milan
    era 0 milan
    era 1 milan
    era 2 milan
    recruit_priority_offset 5


    Spoiler Alert, click show to read: 
    type Merchants
    dictionary Merchants ; Merchants
    category cavalry
    class heavy
    voice_type Heavy
    banner faction main_cavalry
    banner holy crusade
    soldier merchants, 24, 0, 1
    officer eriador_captain_early_flag
    mount unarmoured horse
    mount_effect elephant -4, camel -4
    attributes sea_faring, hide_forest, can_withdraw, can_formed_charge
    formation 2, 4.4, 3, 6, 3, square
    stat_health 1, 3
    stat_pri 8, 5, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    stat_pri_attr no
    stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr no
    stat_pri_armour 7, 2, 5, metal
    stat_sec_armour 0, 0, flesh
    stat_heat 8
    stat_ground -1, -2, -3, -2
    stat_mental 12, normal, trained
    stat_charge_dist 45
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 780, 290, 100, 100, 780, 3, 170
    armour_ug_levels 3, 4
    armour_ug_models merchants, merchants_upg
    ownership turks
    era 0 turks
    era 1 turks
    era 2 turks
    recruit_priority_offset 10



    any clues?

    edit: This may be the wrong place to ask for help, may this be moved at somewhere more suitable?
    Last edited by Beorn; January 18, 2013 at 06:19 PM.

  16. #16

    Default Re: Crashes and how to fix them

    I have a small issue my mod CTD after I have tried to build a naval unit "cog" I did make changes in EDU and EDB, did I miss something else? Any help is greatly appreciated.

    Attachment 280175
    Last edited by BHCluster; June 01, 2013 at 01:12 PM.


    „Nos Stephanus Thomas Dei gratia Rasciae, Serviae, Bosnensium sive Illyricorum, Primordiae, Dalmatiae et Croatiae rex“

  17. #17

    Default Re: Crashes and how to fix them

    Here's another one that has been present in M2TW since the beginning, but only recently was pinned down:

    Siege Battle CTDs that *seem* to be caused by climates

    Because "path longer than 127 spaces" is the fundamental issue, the fix is to:
    1) Shorten the file names in the data/unit_models folder (.texture files are the ultimate culprit)
    2) Shorten the overall game location path as much as possible. For example the default installation location, C:\Program Files (x86)\Medieval II Total War\ is 45 characters long and can easily be reduced - by a lot.
    EBII Council

  18. #18

    Default Re: Crashes and how to fix them

    Quote Originally Posted by BHCluster View Post
    I have a small issue my mod CTD after I have tried to build a naval unit "cog" I did make changes in EDU and EDB, did I miss something else? Any help is greatly appreciated.

    Attachment 280175
    It may be a bit late for you but if you can post the changes you made to the edu and edb, also any changes you may have made to the export_units or export_buildings.

  19. #19

    Default Re: Crashes and how to fix them

    Hello.
    i added the lines "to = logs/system.log.txt" and added another line:level = * error under the [log] section in a file called TATW.cfg in "C:\Program Files (x86)\Steam\SteamApps\common\Medieval II Total War\mods\teutonic" (i called the divide and conqure mod teutonic and backed up the original mod so i can open it from steam).
    i cant see a log file in the place "C:\Program Files (x86)\Steam\SteamApps\common\Medieval II Total War\logs".
    the game crashes when i attack "caras galadhon" (through the battle map) after 3-7 minutes in the battle and i have no idea why. (i tried it again just now to be sure, the game crashed when i was on x1 speed).
    also the unit scale that i use is "small" based on your recommendation:
    Battle crash, many units together
    Q: The mod crashes when a lot of units fight in a very small area.
    A: If too many units fight in a small area M2TW is unable to handle this and crashes (this often happens in castle sieges). Reducing the unit size can prevent this.

    also my computer is pretty strong and dont crash on other games (including the game medieval 2 vanila and other mods and submods to it).
    im sorry i cant provide a log but i just dont see one apearing after CTD, can you please help my resolve the problem? thank you.

  20. #20

    Default Re: Crashes and how to fix them

    I even tried lowering the video settings to low even though in the vanila and in other mods and submods i play with the highest quality without any problem, i still got a CTD without an error message.

Page 1 of 10 12345678910 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •