AAAARRRGGGG, Game crashes when loading

rmgerro

Chieftain
Joined
Apr 1, 2017
Messages
11
i created my civ, when i go to set up game everything is there, the way it supposed to be. i pick my civ, and hit start game, it says loading and then crashes.... i'm lost on what to do
 
301111.jpg
 
look in your log files... not a lot to go on here to even try to help.
C:\Users\#####\Documents\my games\Sid Meier's Civilization VI\Logs
Particulary database, modding & artdefs if you have changed them.
 
Basically, you're looking for any lines in Database.log which say "ERROR" in capital letters. What those lines say should tell you which part of your XML/SQL is not working properly.

If you're using lua in your mod then look in lua.log for lines saying "Runtime Error" or "Syntax Error". Those should give you a line number and filename of where the problem is.

Lines are added to logs in chronological order, so whatever caused your crash should be near the bottom of the file.
 
By 'crash' do you mean returns to the game main menu or do you mean exits to desktop or locks up the computer ?

Also, some boilerplate instructions:
Add Your Mod to A Forum Post (Civ6):
  1. It's better to just take the mod from the game's MODS folder, zip it, and attach the result directly to a post. It is far easier to look at your actual code and the actual structure of the mod as it is being seen by the game than any attempt to determine what you are doing wrong by analyzing descriptions of the problem, or out-of-context snippets of the code.
  2. Very often what a new modder thinks the problem is and what the problem actually is are two different things. Having the actual mod as you are currently trying to use it allows us to look for the actual problem, and if all else fails to simply drop the mis-behaving mod into our MODS folder and run the mod to see what the game tells us.
  3. Zip the version of the mod the game is actually trying to use, which will be found as a sub-folder in ~\Documents\My Games\Sid Meier's Civilization VI\Mods. Zip the whole sub-folder for your mod.
  4. To attach the zip to a forum post, look for a button called Upload A File when composing your thread reply: this button opens a browse menu where you can select the zipped folder to attach directly to a forum post.
  5. If the zipped folder is too large for the forum to accept then upload the zipped mod to a file-sharing site such as dropbox and provide a link where the mod can be downloaded.
    • Mediafire is not really a very good choice any more because they have become rife with spam and malware, as well as attempts to get you to download unwanted and uneeded kludge by confusing the layout of the download pages. You'll note for example that Mediafire links are no longer allowed on Steam, whereas CFC (this site) and dropbox links are still allowed.
 
By 'crash' do you mean returns to the game main menu or do you mean exits to desktop or locks up the computer ?

Also, some boilerplate instructions:
Add Your Mod to A Forum Post (Civ6):
  1. It's better to just take the mod from the game's MODS folder, zip it, and attach the result directly to a post. It is far easier to look at your actual code and the actual structure of the mod as it is being seen by the game than any attempt to determine what you are doing wrong by analyzing descriptions of the problem, or out-of-context snippets of the code.
  2. Very often what a new modder thinks the problem is and what the problem actually is are two different things. Having the actual mod as you are currently trying to use it allows us to look for the actual problem, and if all else fails to simply drop the mis-behaving mod into our MODS folder and run the mod to see what the game tells us.
  3. Zip the version of the mod the game is actually trying to use, which will be found as a sub-folder in ~\Documents\My Games\Sid Meier's Civilization VI\Mods. Zip the whole sub-folder for your mod.
  4. To attach the zip to a forum post, look for a button called Upload A File when composing your thread reply: this button opens a browse menu where you can select the zipped folder to attach directly to a forum post.
  5. If the zipped folder is too large for the forum to accept then upload the zipped mod to a file-sharing site such as dropbox and provide a link where the mod can be downloaded.
    • Mediafire is not really a very good choice any more because they have become rife with spam and malware, as well as attempts to get you to download unwanted and uneeded kludge by confusing the layout of the download pages. You'll note for example that Mediafire links are no longer allowed on Steam, whereas CFC (this site) and dropbox links are still allowed.

Thank you, doing that Now
 
To start with, without even looking into the files themselves other than the modinfo file (none of these file-names exist within the mod):
Code:
  <InGameActions>
    <UpdateDatabase id="Gameplay">
      <Criteria>LeaderCriteria</Criteria>
      <File>NewLeader_Felines.xml</File>
      <File>NewLeader_JasperKitty.xml</File>
      <File>NewLeader_LitterBox.xml</File>
    </UpdateDatabase>
These are the file-names that exist within the mod:
Code:
  <Files>
    <File>ArtDefs/FallbackLeaders.artdef</File>
    <File>Example - New Civilization and Leader.dep</File>
    <File>NewLeader_Config.xml</File>
    <File>NewLeader_ConfigText.xml</File>
    <File>NewLeader_FarmersMarket.xml</File>
    <File>NewLeader_Icons.xml</File>
    <File>NewLeader_Rodeo.xml</File>
    <File>NewLeader_SamHouston.xml</File>
    <File>NewLeader_Texas.xml</File>
    <File>NewLeader_Text.xml</File>
    <File>Platforms/MacOS/BLPs/LeaderFallbacks.blp</File>
    <File>Platforms/MacOS/BLPs/UILeaders.blp</File>
    <File>Platforms/Windows/BLPs/LeaderFallbacks.blp</File>
    <File>Platforms/Windows/BLPs/UILeaders.blp</File>
  </Files>
So when the mod attempts to load you are asking the game to find non-existant files.
 
You're a huge help, thank you. So i put all the existing files into the update database and took out the non existant. Now instead of crashing... is says Loading... Start Game then goes back to the menu. So i take that as positive movement
 
yes it is positive movement. Now look in file C:\Users\[YourNameHere]\Documents\My Games\Sid Meier's Civilization VI\Logs/Database.log

There should be some error message(s) in this file related to your mod's files. Returning to the main menu is usually indicative of refering to something that does not exist within the game's database. If I do this as part of a definition of a Building
Code:
	<Buildings>
		<!-- ============ Town Square ============= -->
		<Row BuildingType="BUILDING_EARLYBUMP1"
			Name="LOC_BUILDING_EARLYBUMP1"
			Description="LOC_BUILDING_EARLYBUMP1_DESC"
			PrereqDistrict="DISTRICT_CITY_CENTERS"
			PrereqTech="TECH_POTTERLY"
			Cost="60"
			PurchaseYield="YIELD_GOLD"
			AdvisorType="ADVISOR_GENERIC"
			Maintenance="1" />
I would get invalid reference errors in the Database.log related to Buildings.PrereqDistrict and Buildings.PrereqTech having bad values because if you look closely at what I have specified I have them spelled wrong. This causes the game to stop executing the mods and return to the main menu.

And invalid reference like this is the most common reason for getting shoved back to the main menu but it is not the only reason this can occur. For xml files the database log file will tell you which xml file the error occured in. If there is more than one fatal error within the same file, tho, you only get the error for the topmost one encountered. After you fix that error you may find others lower-down within the same file.

Also the order in which files are loaded within a mod can have an effect on getting these invalid reference errors. You may referencing something within your mod, but if it has not successfully been added to the game's database before the other part of the mod references it, you can get shoved back to the main menu.

All other things being equal, multiple files within one <UpdateDatabase> action of the modinfo file are done alphabetically by file name or in the order the files appear in the main <Files> section of the modinfo file, not the order they are listed in the <UpdateDatabase> action.
 
Last edited:
So I looked through the log, and there are a ton of errors. Apparently I am not good at this. It won't let me upload it so i'll copy and paste

Constraints...
[1317509.728] [Configuration]: Passed Validation.
[1317510.634] [Localization] ERROR: UNIQUE constraint failed: LocalizedText.Language, LocalizedText.Tag
[1317510.634] [Localization]: While executing - 'insert into BaseGameText('Tag', 'Text') values (?, ?);'
[1317510.634] [Localization]: In XMLSerializer while inserting row into table insert into BaseGameText('Tag', 'Text') with values (LOC_HUD_REPORTS_TAB_CURRENT_DEALS, Current Deals, ).
[1317510.634] [Localization]: In XMLSerializer while updating table BaseGameText from file ids_text.xml.
[1317510.634] [Localization] ERROR: UNIQUE constraint failed: LocalizedText.Language, LocalizedText.Tag
[1317510.937] [Gameplay] ERROR: Database::XMLSerializer (NewLeader_FarmersMarket.xml): 'Row' or 'Delete' expected, got 'ModifierId'.
[1317510.937] [Gameplay]: In XMLSerializer while updating table Row from file NewLeader_FarmersMarket.xml.
[1317510.937] [Gameplay] ERROR: no such table: IconDefinitions
[1317510.937] [Gameplay]: In Query - insert into IconDefinitions('Name', 'Atlas', 'Index') values (?, ?, ?);
[1317510.937] [Gameplay]: In XMLSerializer while updating table IconDefinitions from file NewLeader_Icons.xml.
[1317510.937] [Gameplay] ERROR: Database::XMLSerializer (NewLeader_Rodeo.xml): 'Row' or 'Delete' expected, got 'ModifierId'.
[1317510.937] [Gameplay]: In XMLSerializer while updating table Row from file NewLeader_Rodeo.xml.
[1317510.939] [Gameplay] ERROR: no such table: CivilizationsTraits
[1317510.939] [Gameplay]: In Query - insert into CivilizationsTraits('CivilizationType', 'TraitType') values (?, ?);
[1317510.939] [Gameplay]: In XMLSerializer while updating table CivilizationsTraits from file NewLeader_Texas.xml.
[1317510.939] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1317510.939] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1317510.939] [Gameplay]: Validating Foreign Key Constraints...
[1317510.940] [Gameplay] ERROR: Invalid Reference on Buildings.BuildingType - "BUILDING_RODEO" does not exist in Types
[1317510.940] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_RMG_FARMERS_MARKET" does not exist in Traits
[1317510.941] [Gameplay] ERROR: Invalid Reference on BuildingReplaces.CivUniqueBuildingType - "BUILDING_RMG_RODEO" does not exist in Buildings
[1317510.951] [Gameplay]: Failed Validation.
[1317511.004] [Gameplay]: Validating Foreign Key Constraints...
[1317511.017] [Gameplay]: Passed Validation.
[1317513.067] [FullTextSearch]: FTS - Creating Context
[1317513.192] [Configuration] ERROR: Database::XMLSerializer (NewLeader_Config.xml): 'Row' or 'Delete' expected, got 'LoadingInfo'.
[1317513.192] [Configuration]: In XMLSerializer while updating table GameInfo from file NewLeader_Config.xml.
[1317514.086] [Configuration]: Validating Foreign Key Constraints...
[1317514.086] [Configuration]: Passed Validation.
[1322874.388] [FullTextSearch]: FullTextSearch - Shutting down
 
Back
Top Bottom