This is a community maintained wiki. If you spot a mistake then you are welcome to fix it.
Troubleshooting is the identification of the cause of crashes, bugs or other problems.
OverviewEdit
In general, there are two kinds of errors: fatal and non-fatal.
Fatal errors occur when the game cannot load a vital piece of data and cannot operate without it present. This causes a crash to desktop (CTD). When fatal errors occur, an exception will be printed to the exceptions.log. Typically these errors occur during the loading process or when a specific action is taken in-game.
Non-fatal errors occur when the game encountered invalid data or broken syntax. These errors are almost always printed to the error.log.
TestingEdit
Performing testing is vital to debugging a mod. Typically this is done via the in-game console with commands.
These are useful console commands for modders:
Command | Usage |
---|---|
reloadfx all | Reloads most of the effects used in the game, such as fog of war, the HDR and opacity of country borders, ect. |
reload texture | Reloads most of the textures used in the game, such as leader portraits, technology icons, etc. |
reload localization | Reloads most of the localization used in-game, such as event titles and descriptions. |
reload defines | Reloads the defines files from /Hearts of Iron IV/common/defines/. |
reload focus | Reloads the focus trees in /Hearts of Iron IV/common/national_focuses/. |
reloadoob | Reloads the starting OOB file for the specified tag. |
reloadtechnologies | Reloads the technology files. Will cause a crash if an error is encountered. |
reloadinterface | Reloads the interface files (.gui). |
reload decision | Reloads the decision files (.gui and common/decisions). |
tdebug | Activates the debug tooltips, displaying important information such as state ID, province ID, etc. |
event | Fires the specified event immediate for the current player country. |
nocb | Removes restrictions on diplomatic actions. |
observe | Places the player into the observer slot, allowing the game to pass without player input. |
aiview | Displays the AI priorities when hovering over specific buttons, such as technology. |
tag | Switches the player to another country. |
update_loc | Reloads the specified localization key. |
updateequipments | Reloads the equipment files in /Hearts of Iron IV/common/units/equipment/. |
updatesubunits | Reloads the unit files in /Hearts of Iron IV/common/units/. |
research_on_icon_click | Activates research on click, allowing you to click on technologies to research them instantly. |
Focus.NoChecks | Removes the trigger checks for focuses. |
Focus.AutoComplete | Activates instant completion for focuses. |
set_country_flag | Sets the specified country flag for the current country. |
add_ideas | Adds the specified idea to the current country. |
Log filesEdit
The game stores various log files in your HOI4 user folder: (Windows: \DocumentsParadox InteractiveHearts of Iron IVlogs
, Linux: .local/share/Paradox Interactive/Hearts of Iron IV/logs
). These are overwritten every time the game is started.
To enable full error logging, add the -debug
launch command via Set Launch Options in Steam.
File | Description | Usefulness |
---|---|---|
ai.log | Prints the AI choices undertaken. | Medium |
ai_trace.log | Prints the AI movements undertaken (divisions, ships, air, etc.) | Low |
error.log | Prints the various non-fatal errors. Many errors can be ignored, although almost all errors relating to files in the common folder should be fixed. | High |
exceptions.log | Prints the stack trace when the game crashes to desktop. | Low |
executedcommands.log | Prints the internal commands uses by the player and AI. | Low |
game.log | Prints the actions that were taken by countries in-game. Useful when the crash is due to a specific action. | High |
graphics.log | Prints the graphical errors relating to positions, rivers, and trees. | Low |
memory.log | Prints the memory used during setup. Useful for crashes during the loading process, to see when the game crashed. | High |
message.log | Prints the session info for the current session. | Low |
postedcommands.log | Low | |
random.log | Prints times for game state changes. | Low |
receivedcommands.log | Prints the internal commands received by the player in multiplayer. | Low |
sentcommands.log | Prints the internal commands sent by the player in multiplayer. | Low |
setup.log | Prints the completion of setup loading for each part of the process. Very useful for discovering which file may be causing a crash. | High |
system.log | Prints the system information HOI4 is loaded on. | Low |
system_debug.log | Prints interface errors. | Medium |
text.log | Prints asserts on localization keys. | Medium |
time.log | Prints the time it takes for the various loading steps to complete, and the tick interval. Very useful for crashes during the loading process, to see when the game crashed. | Medium |
Crash data logEdit
When the game crashes, it provides information on system settings and what caused it to crash in the user directory’s /Hearts of Iron IV/crashes/ folder. Although most of the time this is not beneficial as to what caused it to crash, the error log could contain clues. However, one important logging mechanism can be additionally turned on:
Adding the -crash_data_log
launch command via Launch Options in Steam will also cause the meta.yml
file in that folder (Directly within, not in the /logs/ subfolder) to contain the last read line of code before crashing, as well as turning on the debug mode. This slows down the game by a significant amount, so it shouldn’t be used outside of crash debugging. If the last read line of the file given is the last line in the file, it’s rather likely the game crashed on the next read file instead, which is quite difficult to locate. In some cases, the game can grant a script instead of a file, such as a savefile or client_ping.
This can appear like LastRead: map/supply_nodes.txt (727)
(Where the number represents the line of the file that was last read before the crash occurred) or LastRead: client_ping (1)
.
Note that while -crash_data_log enables debug mode, not all benefits of the launch option get applied by default and require using both launch options. For example, edits to files indexed during the main menu loading will not get automatically loaded, requiring a console command usage to get reloaded instead. However, -crash_data_log’s debug does include the game loading into the main menu with map errors, the nudge being available for selection, and the debug information when hovering over a province or a country.
Common crash causesEdit
A variety of crash types are caused by recklessly unloading folders with replace_path, leading to the game detecting there not being any database entries of a certain type. It’s best practice to port over generic files to the mod if overwriting a folder in entirety for this reason, as well as to avoid unintuitive errors.
In case of a different crash, note that if a file is completely empty, the game may skip reading it in entirety. As such, the same crash may display a different file if the one in this list is empty.
It’s best to completely clean the error log before trying to find a crash, as some errors may appear innocuous while still crashing the game.
If the last read file proves useless, it’s possible to temporarily remove files from the mod and slowly re-add them to find the exact cause; upon finding the cause folder, it should be adjusted accordingly. A sort of binary search can be used by adding/removing the files large chunks at the time. replace_paths can be removed aside from essential ones: history/states/ and map/strategicregions. Note that both *.mod files need to be edited for replace_paths to apply.
This list is non-exhaustive: There are more potential crashes, and any given file or script can have more causes that are not outlined in the list. This has been broken up into sections on when they happen for easier navigation. The file provided is the file marked as last read by the crash data log.
Main menu loadingEdit
- common/countries/cosmetic.txt – Caused by a complete overwriting of common/national_focus/ or common/continuous_focus/.
- map/rocketsites.txt – Caused by a complete overwriting of history/states/ or common/unit_leader/. As there are no «generic files» for states, one should be created manually instead.
- common/national_focus/*.txt – This crash, granted that it’s the last line of the last file in the folder, can be caused by a focus tree using a
shared_focus = my_focus
argument, specifying a shared focus that does not exist. - gfx/models/supply/railroad.shader – Caused by the filesize of the provinces bitmap exceeding 40 MiB in size, which the engine cannot handle.
- history/general/*.txt / history/countries/*.txt / map/rocketsites.txt (In order in which they’d appear with replace_paths to the previous ones) — One of the states within the mod has a
victory_points = { ... }
definition that attempts to assign victory points to a province that does not exist within the game.
During country selectionEdit
This also includes the loading after a country has been selected, but it’s not yet possible to play.
set_controller
– This crash typically happens when trying to select a country in a bookmark if the country doesn’t have a valid capital defined within its /Hearts of Iron IV/history/countries/TAG*.txt file. The game uses the capital in order to determine what portion of the map to zoom onto, and not getting one is unexpected.- savegame.hoi4 (takes on the name of a savefile, not necessarily one that exists right now) – Caused by there being a large quantity of countries defined without there being any dynamic countries. The exact amount of countries that the game can handle is not a consistent number, usually falling in the range of 40–80. Typically caused by a reckless overwriting of common/country_tags.
- history/units/filename.txt – One of the naval orders of battle in the mod has a carrier defined with airwings directly inside, as was done in 1.11 and earlier. Adjust the orders of battle in the mod as needed. Note that the file shown as the last read one is not necessarily the one that crashes the game.
- history/units/filename.txt / map/railways.txt – Caused by a country having a division template, yet not finding any possible /Hearts of Iron IV/common/ai_templates entry to use to expand on the template. The exact file/script in question depends on when the country obtains the division template: an order of battle (which’ll be last read) or another history file (leading to railways).
- map/supply_nodes.txt or map/railways.txt – This crash is most commonly caused by the specified building types being placed on invalid provinces, such as those that are not located in states. This crash occurs both when trying to open the supply menu in nudge or when trying to start a single player game. This can be corrected by emptying the files in question and optionally creating a proper definition of the files, either manually or via nudge.
- tutorial/tutorial.txt – This crash is caused by the tutorial file being erroneous. This can be represented as a link to an invalid state ID within the file (such as if every base game was erased) or as the file lacking a
tutorial = { ... }
definition of any kind entirely. Replacing the entire file’s contents withtutorial = { }
works to solve the crash.
- This is also the last file that gets read after the country selection process finishes. If a crash occurs directly afterwards and the game fails to write the file properly, it will land on this one.
Middle of the gameEdit
client_ping
orhourly_tick
– This crash is caused by the in-game AI, which can be seen by turning off the AI using the console. There are several causes for this occurring, including but not limited to:- A country has a division template, yet couldn’t find any /Hearts of Iron IV/common/ai_templates entry to use to expand on the template.
- Any state not having an owner defined in the history file. In general, such states always run unstably, with a lot of actions crashing them, such as right-clicking or attempting to transfer one to a country. One of such actions is attempting an air mission over that state. As the AI is able to use airplanes, they will try to attempt to at least evaluate the value of doing a mission over the state, which results in a crash to desktop.
- An incomplete map/buildings.txt. The buildings file, alongside building models, is also used for determining into which sea province the naval bases and floating harbours will go out into. This information is necessary when attempting to use any naval base or floating harbour, as the game would have no idea via which province the province connects to the sea otherwise. The game also checks this information when attempting to build a naval base, and if the game attempts to evaluate an invalid naval base definition, the game gets stuck in an infinite loop of attempting to obtain the naval base information, resulting in a CPU/GPU overload and a game crash.
-
- The game can fail to generate floating harbours when validating all states at the same time, so this may require validating each state individually. Comparing the amount of matches for
naval_base
(typically generated) andfloating_harbor
in the file can notify if an issue is present in the mod, however not telling where. There are several ways to find which states exactly need to be updated, if that issue is indeed present. For example, regular expression may be used, supported within any advanced text editor, such as Notepad++, Sublime Text, and Visual Studio Code. Turning on regular expression is a separate option within the search and replace menus, so it must be turned on manually. - Copy the map/buildings.txt file and operate on that copy, since this process is destructive. First of all, every non-related line can be removed. This can be done by replacing
^d*;(?!(naval_base|floating_harbor)).*(rn|Z)
with an empty string (or$1
if the text editor doesn’t support doing so). After this, replacing^(d+;)naval_base(.*)rn(?s)(.*)(?-s)^1floating_harbor.*rn
with$3
will remove a matching pair of floating harbours and naval bases within the same state, however this may only remove 2 lines at a time after the first few initial replacements. In order to speed up the line replacing, a macro can be recorded that does this replace request several times, and this macro would be played back itself. Notepad++ supports executing a macro several times in a row, which can be used here to instantly run it several hundred or thousand times. If, after doing this, pairs still remain, switching the order of naval bases and floating harbours with^(d+;)floating_harbor(.*)rn(?s)(.*)(?-s)^1naval_base.*rn
would detect any floating harbours that are followed by naval bases in the same state rather than the other way around. All lines that would remain after this are naval base definitions that do not have a matching definition within floating harbours or vise versa. For example, if there are 3 naval bases in state 123 and 2 floating harbours, 1 naval base definition in state 123 will remain. This can be used within the nudge to validate the states in question individually.
- The game can fail to generate floating harbours when validating all states at the same time, so this may require validating each state individually. Comparing the amount of matches for
Additional detailsEdit
A version tracking website, such as [Gitlab] or [Github], can be used to keep track of updates to the code. As such, it can be beneficial to use them and regularly push mod’s updates to them in order to limit the selection of possibly problematic files when trying to debug an issue.
When the game has a major update, it can be important to read the patch notes to fix the newly-appearing errors. For example, the 1.12’s patch notes provide an «Important modding notes» section, which also serves as a check-list of necessary things to fix in the mod in order to avoid a crash. It is also important to avoid overwriting most base game files when possible in order to ease compatibility, though this is not always possible. One folder where it’s incredibly important to do is defines, where an override file is essentially mandatory in order to avoid even minor game updates from introducing crashes.
In case the game crashes on startup, but there’s no obvious reason why in the error log and it’s unknown what was last changed since the last time, the mod could have folders strategically removed. As an example, it is almost always possible to remove the entire /Hearts of Iron IV/common/ folder from the mod without the game crashing, provided debug mode is turned on and there are no replace_paths to the folder.
-
Add bookmark
-
#1
So, whenever I try to boot up HOI4, I get the Errors Present In Map Definition halfway through the loading screen. I tried reinstalling the game, clearing the user cache, clearing the user directory, using no mods, modifying my antivirus, and verifying file integrity (which of course gets stuck at 99% as usual…), which don’t do anything to fix it. What else can I do to take care of this error and continue playing?
-
Add bookmark
-
#2
Look in the game folder in Documents — C:Users<username>DocumentsParadox InteractiveHearts of Iron IV — and check if there is a ‘map’ folder.
If the folder exists, delete it and try the game again.
The ‘map’ folder is where the nudger tool puts changes to some map files. Some mods may put things here also. The vanilla base game does not have this folder, it can be safely deleted.
-
Add bookmark
-
#3
Look in the game folder in Documents — C:Users<username>DocumentsParadox InteractiveHearts of Iron IV — and check if there is a ‘map’ folder.
If the folder exists, delete it and try the game again.
The ‘map’ folder is where the nudger tool puts changes to some map files. Some mods may put things here also. The vanilla base game does not have this folder, it can be safely deleted.
Nope, I don’t see a map folder…
Содержание
- Map loading error hoi 4
- Hoi4 crashes #157
- Comments
- Troubleshooting
- Содержание
- Overview [ править | править код ]
- Testing [ править | править код ]
- Log files [ править | править код ]
- Crash data log [ править | править код ]
- Common crash causes [ править | править код ]
- Main menu loading [ править | править код ]
- During country selection [ править | править код ]
- Middle of the game [ править | править код ]
- Additional details [ править | править код ]
Map loading error hoi 4
you are right. my game was broken. but somehow it didn’t fixed by integrity check on steam.
manual deleting and re-installing solved the problem. thank you very much. :☺
Going by the error.log fle you seem to have a corrupt installation, do a clean re-install to fix this.
http://steamcommunity.com/app/394360/discussions/2/1471966894885959849/
Follow the instructions that start with: Procedure to solve point 1º
The important part of the clean re-install is the order of which things are done. Also do not miss the last part about starting the game up and loading in to the main menu once before activating any mods after doing the clean re-install.
Going by the error.log fle you seem to have a corrupt installation, do a clean re-install to fix this.
http://steamcommunity.com/app/394360/discussions/2/1471966894885959849/
Follow the instructions that start with: Procedure to solve point 1º
The important part of the clean re-install is the order of which things are done. Also do not miss the last part about starting the game up and loading in to the main menu once before activating any mods after doing the clean re-install.
Bubbas,
Hi. Im having the same issue. I have done the following per Paradox’s support folks.
-Uninstalled via Steam and removed any other folders left for HOI4 or Paradox.
-Reinstalled the game and verified game integrity.
-Restarted the game via Steam. Launcher comes up. I did windowed view, and disabled all mods and still get an error.
System Log:
[19:02:28][systemsettings.cpp:71]: CPU Model: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
[19:02:28][systemsettings.cpp:72]: CPU Speed: 1800MHz
[19:02:28][systemsettings.cpp:73]: CPU Physical Cores: 4
[19:02:28][systemsettings.cpp:74]: CPU Logical Cores: 8
[19:02:28][systemsettings.cpp:75]: System Memory: 8116
[19:02:28][systemsettings.cpp:76]: OS: Windows 10 x86_64
[19:02:28][systemsettings.cpp:77]: OS Language: en
Here is my pdx_settings.txt
«Graphics»= <
«display_index»= <
version=0
value=»0″
>
«display_mode»= <
version=0
value=»windowed»
>
«fullscreen_resolution»= <
version=0
value=»2736×1824″
>
«vsync»= <
version=0
enabled=yes
>
«windowed_resolution»= <
version=0
value=»1920×1080″
>
>
«System»= <
«language»= <
version=0
value=»l_english»
>
>
Going by the error.log fle you seem to have a corrupt installation, do a clean re-install to fix this.
http://steamcommunity.com/app/394360/discussions/2/1471966894885959849/
Follow the instructions that start with: Procedure to solve point 1º
The important part of the clean re-install is the order of which things are done. Also do not miss the last part about starting the game up and loading in to the main menu once before activating any mods after doing the clean re-install.
Bubbas,
Hi. Im having the same issue. I have done the following per Paradox’s support folks.
-Uninstalled via Steam and removed any other folders left for HOI4 or Paradox.
-Reinstalled the game and verified game integrity.
-Restarted the game via Steam. Launcher comes up. I did windowed view, and disabled all mods and still get an error.
System Log:
[19:02:28][systemsettings.cpp:71]: CPU Model: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
[19:02:28][systemsettings.cpp:72]: CPU Speed: 1800MHz
[19:02:28][systemsettings.cpp:73]: CPU Physical Cores: 4
[19:02:28][systemsettings.cpp:74]: CPU Logical Cores: 8
[19:02:28][systemsettings.cpp:75]: System Memory: 8116
[19:02:28][systemsettings.cpp:76]: OS: Windows 10 x86_64
[19:02:28][systemsettings.cpp:77]: OS Language: en
Here is my pdx_settings.txt
«Graphics»= <
«display_index»= <
version=0
value=»0″
>
«display_mode»= <
version=0
value=»windowed»
>
«fullscreen_resolution»= <
version=0
value=»2736×1824″
>
«vsync»= <
version=0
enabled=yes
>
«windowed_resolution»= <
version=0
value=»1920×1080″
>
>
«System»= <
«language»= <
version=0
value=»l_english»
>
>
Источник
Hoi4 crashes #157
Describe the bug
When trying to start a larger mod( tested it with Kaiserreich and The New Order) Hoi4 crashes while loading and tells me
»Failed to load the map»
»Some errors are present in the map definition and have been logged to error.log»
To Reproduce
Steps to reproduce the behavior:
- Select Kaiserreich or The New Order(possibly other bigger mods)
- Launch the game
Expected behavior
The game loads the selected mod
Logs
Hoi4 error log
error.log
Version:
- OS: Windows
- Irony Version 1.9.48
The text was updated successfully, but these errors were encountered:
For a mod manager developer game error log is useless. Once Irony launches the game it’s out of my hands. What I assumed that happened is that Irony did not properly parse a descriptor.mod (and I was right).
Paradox is once again consistently inconsistent in their logic. In this case Irony did not properly parse replace_path properties as apparently these behave as an array rather than a key value pair and seeing that they already have arrays in mod descriptors (see tags or dependencies) I cannot understand why would they break the standard.
Anyway, once you download a new version regenerate the descriptors using Irony since these are broken for the mods you mentioned. This should fix the issue but I cannot test as I don’t own any PDX games except Stellaris.
Источник
Troubleshooting
This is a community maintained wiki. If you spot a mistake then you are welcome to fix it.
Troubleshooting is the identification of the cause of crashes, bugs or other problems.
Содержание
Overview [ править | править код ]
In general, there are two kinds of errors: fatal and non-fatal.
Fatal errors occur when the game cannot load a vital piece of data and cannot operate without it present. This causes a crash to desktop (CTD). When fatal errors occur, an exception will be printed to the exceptions.log. Typically these errors occur during the loading process or when a specific action is taken in-game.
Non-fatal errors occur when the game encountered invalid data or broken syntax. These errors are almost always printed to the error.log.
Testing [ править | править код ]
Performing testing is vital to debugging a mod. Typically this is done via the in-game console with commands.
These are useful console commands for modders:
Command | Usage |
---|---|
reloadfx all | Reloads most of the effects used in the game, such as fog of war, the HDR and opacity of country borders, ect. |
reload texture | Reloads most of the textures used in the game, such as leader portraits, technology icons, etc. |
reload localization | Reloads most of the localization used in-game, such as event titles and descriptions. |
reload defines | Reloads the defines files from /Hearts of Iron IV/common/defines/ . |
reload focus | Reloads the focus trees in /Hearts of Iron IV/common/national_focuses/ . |
reloadoob | Reloads the starting OOB file for the specified tag. |
reloadtechnologies | Reloads the technology files. Will cause a crash if an error is encountered. |
reloadinterface | Reloads the interface files (.gui). |
reload decision | Reloads the decision files (.gui and common/decisions). |
tdebug | Activates the debug tooltips, displaying important information such as state ID, province ID, etc. |
event | Fires the specified event immediate for the current player country. |
nocb | Removes restrictions on diplomatic actions. |
observe | Places the player into the observer slot, allowing the game to pass without player input. |
aiview | Displays the AI priorities when hovering over specific buttons, such as technology. |
tag | Switches the player to another country. |
update_loc | Reloads the specified localization key. |
updateequipments | Reloads the equipment files in /Hearts of Iron IV/common/units/equipment/ . |
updatesubunits | Reloads the unit files in /Hearts of Iron IV/common/units/ . |
research_on_icon_click | Activates research on click, allowing you to click on technologies to research them instantly. |
Focus.NoChecks | Removes the trigger checks for focuses. |
Focus.AutoComplete | Activates instant completion for focuses. |
set_country_flag | Sets the specified country flag for the current country. |
add_ideas | Adds the specified idea to the current country. |
Log files [ править | править код ]
The game stores various log files in your HOI4 user folder: (Windows: \DocumentsParadox InteractiveHearts of Iron IVlogs , Linux: .local/share/Paradox Interactive/Hearts of Iron IV/logs ). These are overwritten every time the game is started.
To enable full error logging, add the -debug launch command via Set Launch Options in Steam.
File | Description | Usefulness |
---|---|---|
ai.log | Prints the AI choices undertaken. | Medium |
ai_trace.log | Prints the AI movements undertaken (divisions, ships, air, etc.) | Low |
error.log | Prints the various non-fatal errors. Many errors can be ignored, although almost all errors relating to files in the common folder should be fixed. | High |
exceptions.log | Prints the stack trace when the game crashes to desktop. | Low |
executedcommands.log | Prints the internal commands uses by the player and AI. | Low |
game.log | Prints the actions that were taken by countries in-game. Useful when the crash is due to a specific action. | High |
graphics.log | Prints the graphical errors relating to positions, rivers, and trees. | Low |
memory.log | Prints the memory used during setup. Useful for crashes during the loading process, to see when the game crashed. | High |
message.log | Prints the session info for the current session. | Low |
postedcommands.log | Low | |
random.log | Prints times for game state changes. | Low |
receivedcommands.log | Prints the internal commands received by the player in multiplayer. | Low |
sentcommands.log | Prints the internal commands sent by the player in multiplayer. | Low |
setup.log | Prints the completion of setup loading for each part of the process. Very useful for discovering which file may be causing a crash. | High |
system.log | Prints the system information HOI4 is loaded on. | Low |
system_debug.log | Prints interface errors. | Medium |
text.log | Prints asserts on localization keys. | Medium |
time.log | Prints the time it takes for the various loading steps to complete, and the tick interval. Very useful for crashes during the loading process, to see when the game crashed. | Medium |
Crash data log [ править | править код ]
When the game crashes, it provides information on system settings and what caused it to crash in the user directory’s /Hearts of Iron IV/crashes/ folder. Although most of the time this is not beneficial as to what caused it to crash, the error log could contain clues. However, one important logging mechanism can be additionally turned on:
Adding the -crash_data_log launch command via Launch Options in Steam will also cause the meta.yml file in that folder (Directly within, not in the /logs/ subfolder) to contain the last read line of code before crashing, as well as turning on the debug mode. This slows down the game by a significant amount, so it shouldn’t be used outside of crash debugging. If the last read line of the file given is the last line in the file, it’s rather likely the game crashed on the next read file instead, which is quite difficult to locate. In some cases, the game can grant a script instead of a file, such as a savefile or client_ping.
This can appear like LastRead: map/supply_nodes.txt (727) (Where the number represents the line of the file that was last read before the crash occurred) or LastRead: client_ping (1) .
Note that while -crash_data_log enables debug mode, not all benefits of the launch option get applied by default and require using both launch options. For example, edits to files indexed during the main menu loading will not get automatically loaded, requiring a console command usage to get reloaded instead. However, -crash_data_log’s debug does include the game loading into the main menu with map errors, the nudge being available for selection, and the debug information when hovering over a province or a country.
Common crash causes [ править | править код ]
A variety of crash types are caused by recklessly unloading folders with replace_path, leading to the game detecting there not being any database entries of a certain type. It’s best practice to port over generic files to the mod if overwriting a folder in entirety for this reason, as well as to avoid unintuitive errors.
In case of a different crash, note that if a file is completely empty, the game may skip reading it in entirety. As such, the same crash may display a different file if the one in this list is empty.
It’s best to completely clean the error log before trying to find a crash, as some errors may appear innocuous while still crashing the game.
If the last read file proves useless, it’s possible to temporarily remove files from the mod and slowly re-add them to find the exact cause; upon finding the cause folder, it should be adjusted accordingly. A sort of binary search can be used by adding/removing the files large chunks at the time. replace_paths can be removed aside from essential ones: history/states/ and map/strategicregions . Note that both *.mod files need to be edited for replace_paths to apply.
This list is non-exhaustive: There are more potential crashes, and any given file or script can have more causes that are not outlined in the list. This has been broken up into sections on when they happen for easier navigation. The file provided is the file marked as last read by the crash data log.
Main menu loading [ править | править код ]
- common/countries/cosmetic.txt – Caused by a complete overwriting of common/national_focus/ or common/continuous_focus/ .
- map/rocketsites.txt – Caused by a complete overwriting of history/states/ or common/unit_leader/ . As there are no «generic files» for states, one should be created manually instead.
- common/national_focus/*.txt – This crash, granted that it’s the last line of the last file in the folder, can be caused by a focus tree using a shared_focus = my_focus argument, specifying a shared focus that does not exist.
- gfx/models/supply/railroad.shader – Caused by the filesize of the provinces bitmap exceeding 40 MiB in size, which the engine cannot handle.
- history/general/*.txt / history/countries/*.txt / map/rocketsites.txt (In order in which they’d appear with replace_paths to the previous ones) — One of the states within the mod has a victory_points = < . >definition that attempts to assign victory points to a province that does not exist within the game.
During country selection [ править | править код ]
This also includes the loading after a country has been selected, but it’s not yet possible to play.
- set_controller – This crash typically happens when trying to select a country in a bookmark if the country doesn’t have a valid capital defined within its /Hearts of Iron IV/history/countries/TAG*.txt file. The game uses the capital in order to determine what portion of the map to zoom onto, and not getting one is unexpected.
- savegame.hoi4 (takes on the name of a savefile, not necessarily one that exists right now) – Caused by there being a large quantity of countries defined without there being any dynamic countries. The exact amount of countries that the game can handle is not a consistent number, usually falling in the range of 40–80. Typically caused by a reckless overwriting of common/country_tags .
- history/units/filename.txt – One of the naval orders of battle in the mod has a carrier defined with airwings directly inside, as was done in 1.11 and earlier. Adjust the orders of battle in the mod as needed. Note that the file shown as the last read one is not necessarily the one that crashes the game.
- history/units/filename.txt / map/railways.txt – Caused by a country having a division template, yet not finding any possible /Hearts of Iron IV/common/ai_templates entry to use to expand on the template. The exact file/script in question depends on when the country obtains the division template: an order of battle (which’ll be last read) or another history file (leading to railways).
- map/supply_nodes.txt or map/railways.txt – This crash is most commonly caused by the specified building types being placed on invalid provinces, such as those that are not located in states. This crash occurs both when trying to open the supply menu in nudge or when trying to start a single player game. This can be corrected by emptying the files in question and optionally creating a proper definition of the files, either manually or via nudge.
- tutorial/tutorial.txt – This crash is caused by the tutorial file being erroneous. This can be represented as a link to an invalid state ID within the file (such as if every base game was erased) or as the file lacking a tutorial = < . >definition of any kind entirely. Replacing the entire file’s contents with tutorial = < >works to solve the crash.
This is also the last file that gets read after the country selection process finishes. If a crash occurs directly afterwards and the game fails to write the file properly, it will land on this one.
Middle of the game [ править | править код ]
- client_ping or hourly_tick – This crash is caused by the in-game AI, which can be seen by turning off the AI using the console. There are several causes for this occurring, including but not limited to:
- A country has a division template, yet couldn’t find any /Hearts of Iron IV/common/ai_templates entry to use to expand on the template.
- Any state not having an owner defined in the history file. In general, such states always run unstably, with a lot of actions crashing them, such as right-clicking or attempting to transfer one to a country. One of such actions is attempting an air mission over that state. As the AI is able to use airplanes, they will try to attempt to at least evaluate the value of doing a mission over the state, which results in a crash to desktop.
- An incomplete map/buildings.txt . The buildings file, alongside building models, is also used for determining into which sea province the naval bases and floating harbours will go out into. This information is necessary when attempting to use any naval base or floating harbour, as the game would have no idea via which province the province connects to the sea otherwise. The game also checks this information when attempting to build a naval base, and if the game attempts to evaluate an invalid naval base definition, the game gets stuck in an infinite loop of attempting to obtain the naval base information, resulting in a CPU/GPU overload and a game crash.
The game can fail to generate floating harbours when validating all states at the same time, so this may require validating each state individually. Comparing the amount of matches for naval_base (typically generated) and floating_harbor in the file can notify if an issue is present in the mod, however not telling where. There are several ways to find which states exactly need to be updated, if that issue is indeed present. For example, regular expression may be used, supported within any advanced text editor, such as Notepad++, Sublime Text, and Visual Studio Code. Turning on regular expression is a separate option within the search and replace menus, so it must be turned on manually. Copy the map/buildings.txt file and operate on that copy, since this process is destructive. First of all, every non-related line can be removed. This can be done by replacing ^d*;(?!(naval_base|floating_harbor)).*(rn|Z) with an empty string (or $1 if the text editor doesn’t support doing so). After this, replacing ^(d+;)naval_base(.*)rn(?s)(.*)(?-s)^1floating_harbor.*rn with $3 will remove a matching pair of floating harbours and naval bases within the same state, however this may only remove 2 lines at a time after the first few initial replacements. In order to speed up the line replacing, a macro can be recorded that does this replace request several times, and this macro would be played back itself. Notepad++ supports executing a macro several times in a row, which can be used here to instantly run it several hundred or thousand times. If, after doing this, pairs still remain, switching the order of naval bases and floating harbours with ^(d+;)floating_harbor(.*)rn(?s)(.*)(?-s)^1naval_base.*rn would detect any floating harbours that are followed by naval bases in the same state rather than the other way around. All lines that would remain after this are naval base definitions that do not have a matching definition within floating harbours or vise versa. For example, if there are 3 naval bases in state 123 and 2 floating harbours, 1 naval base definition in state 123 will remain. This can be used within the nudge to validate the states in question individually.
Additional details [ править | править код ]
A version tracking website, such as [Gitlab] or [Github], can be used to keep track of updates to the code. As such, it can be beneficial to use them and regularly push mod’s updates to them in order to limit the selection of possibly problematic files when trying to debug an issue.
When the game has a major update, it can be important to read the patch notes to fix the newly-appearing errors. For example, the 1.12’s patch notes provide an «Important modding notes» section, which also serves as a check-list of necessary things to fix in the mod in order to avoid a crash. It is also important to avoid overwriting most base game files when possible in order to ease compatibility, though this is not always possible. One folder where it’s incredibly important to do is defines, where an override file is essentially mandatory in order to avoid even minor game updates from introducing crashes.
In case the game crashes on startup, but there’s no obvious reason why in the error log and it’s unknown what was last changed since the last time, the mod could have folders strategically removed. As an example, it is almost always possible to remove the entire /Hearts of Iron IV/common/ folder from the mod without the game crashing, provided debug mode is turned on and there are no replace_paths to the folder.
Источник
Рекомендованные сообщения
Cinder
8
-
- Поделиться
- #1
Пару месяцев назад столкнулся с проблемой , при запуске модов изменяющих карту , таких как — Old World Blues , Kaiserreich , equestria at war и подобных появляется ошибка на середине загрузочного экрана «Failed to load the map» .
Поиски на зарубежных форумах привели к выводу , что ошибка стала появляться последние пол года у многих , но как решить нигде ответа нет .
Изменено 02.07.2020, 13:16:28 пользователем Cinder
Ссылка на комментарий
GBV
616
-
- Поделиться
- #2
2 часа назад, Cinder сказал:
Пару месяцев назад столкнулся с проблемой , при запуске модов изменяющих карту , таких как — Olw World Blues , Kaiserreich , equestria at war и подобных появляется ошибка на середине загрузочного экрана «Failed to load the map» .
Я бы почистил пользовательскую директорию игры в первую очередь.
- Цитата
Ссылка на комментарий
dagot87
631
-
- Поделиться
- #3
4 часа назад, Cinder сказал:
Пару месяцев назад столкнулся с проблемой , при запуске модов изменяющих карту , таких как — Olw World Blues , Kaiserreich , equestria at war и подобных появляется ошибка на середине загрузочного экрана «Failed to load the map» .
Тоже недавно сталкивался, мне помогло следующее — сперва надо очистить кэш (в документах папка Paradox Interactive/HOI4 удалить всё, кроме папки с модами, сохранениями и скриншотами), затем через лаунчер запустить ванильную игру и включить за какую-нибудь страну. После чего можно выходить и запускать с нужным вам модом, всё будет работать.
- Цитата
Ссылка на комментарий
Cinder
8
- Автор
-
- Поделиться
- #4
36 минут назад, dagot87 сказал:
Тоже недавно сталкивался, мне помогло следующее — сперва надо очистить кэш (в документах папка Paradox Interactive/HOI4 удалить всё, кроме папки с модами, сохранениями и скриншотами), затем через лаунчер запустить ванильную игру и включить за какую-нибудь страну. После чего можно выходить и запускать с нужным вам модом, всё будет работать.
Не помогает , хоть с полной чисткой appdata и удаления игры — было сделано 3 попытки , у других тоже не помогает .
- Цитата
Ссылка на комментарий
dagot87
631
-
- Поделиться
- #5
В 02.07.2020 в 13:16, Cinder сказал:
тоже не помогает .
М-да, есть ещё вариант — недавно заметил у некоторых модов, что если путь прописан просто path= «/mod/x», то вылетает с ошибкой карты, а если path=»C:/Users/User/Documents/Paradox Interactive/Hearts of Iron IV/mod/х» то всё норм работает
- Цитата
Ссылка на комментарий
Cinder
8
- Автор
-
- Поделиться
- #6
7 часов назад, dagot87 сказал:
М-да, есть ещё вариант — недавно заметил у некоторых модов, что если путь прописан просто path= «/mod/x», то вылетает с ошибкой карты, а если path=»C:/Users/User/Documents/Paradox Interactive/Hearts of Iron IV/mod/х» то всё норм работает
Не подскажешь где указан путь ? в descriptor нет .
- Цитата
Ссылка на комментарий
dagot87
631
-
- Поделиться
- #7
4 часа назад, Cinder сказал:
Не подскажешь где указан путь ? в descriptor нет .
файл в разрешении mod, лежит там же, где и сама папка мода (mod в моих документах)
- Цитата
Ссылка на комментарий
Cinder
8
- Автор
-
- Поделиться
- #8
10 часов назад, dagot87 сказал:
файл в разрешении mod, лежит там же, где и сама папка мода (mod в моих документах)
Не , пути правильные .
- Цитата
Ссылка на комментарий
kopteev
0
-
- Поделиться
- #9
В 02.07.2020 в 08:24, Cinder сказал:
Пару месяцев назад столкнулся с проблемой , при запуске модов изменяющих карту , таких как — Old World Blues , Kaiserreich , equestria at war и подобных появляется ошибка на середине загрузочного экрана «Failed to load the map» .
Поиски на зарубежных форумах привели к выводу , что ошибка стала появляться последние пол года у многих , но как решить нигде ответа нет .
У меня было то же самое и ответ я нашёл случайно. Вообщем, если всё выше описанное не помогает — проблема в обновлениях. Недавно до 1.11 игра обновилась, а я запускал моды на старую версию — вот ошибку и выдавало
- Цитата
Ссылка на комментарий
Присоединиться к обсуждению
Вы можете оставить комментарий уже сейчас, а зарегистрироваться позже!
Если у вас уже есть аккаунт, войдите, чтобы оставить сообщение через него.