panik4 / RandomParadox

A C++ random scenario and worldmap generator for Paradox Interactive Games, also useable as a maptool for total conversions
GNU General Public License v3.0
30 stars 2 forks source link

Invalid Database Objects #2

Closed XoeSara closed 1 month ago

XoeSara commented 1 year ago

The game continuously crashes with the exact same error message every time a different map is made. error.log

XoeSara commented 1 year ago

[16:05:43][ai_strategy.cpp:8275]: invalid region id 274 [16:05:43][persistent.cpp:48]: Error: "Unexpected token: strategic_region, near line: 357" in file: "common/ai_strategy/ETH.txt" near line: 357 [16:05:43][ai_strategy.cpp:8275]: invalid region id 273 [16:05:43][persistent.cpp:48]: Error: "Unexpected token: strategic_region, near line: 401" in file: "common/ai_strategy/ETH.txt" near line: 401 [16:05:43][ai_strategy.cpp:8262]: invalid state id 841 [16:05:43][persistent.cpp:48]: Error: "Unexpected token: state, near line: 1143" in file: "common/ai_strategy/ITA.txt" near line: 1143 [16:05:43][ai_strategy.cpp:8262]: invalid state id 837 [16:05:43][persistent.cpp:48]: Error: "Unexpected token: state, near line: 1167" in file: "common/ai_strategy/ITA.txt" near line: 1167 [16:05:43][ai_strategy.cpp:8262]: invalid state id 835 [16:05:43][persistent.cpp:48]: Error: "Unexpected token: state, near line: 1216" in file: "common/ai_strategy/ITA.txt" near line: 1216 [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: basic_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: improved_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: basic_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: improved_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: basic_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: improved_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: basic_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: improved_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: basic_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: improved_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: basic_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: improved_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: basic_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: improved_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: basic_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: improved_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: basic_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: improved_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: basic_secondary_battery. use var:var_name to explicitly use variables in effects/triggers [16:05:44][database_scoped_variables.cpp:323]: invalid database object for effect/trigger: improved_secondary_battery. use var:var_name to explicitly use variables in effects/triggers

panik4 commented 1 year ago

Alright, the errors listed there are issues caused by the base game and are likely not crash related You can try to further debug with crash_data log, see the related chapter here: https://hoi4.paradoxwikis.com/Troubleshooting

That should give more info on the crash, especially the last_read line

You seem to have few states, that is a common source of instability. Please be so kind to attach your fastworldgenerator.json and the respective Hearts of Iron IVModule.json

XoeSara commented 1 year ago

ok. Here's better information. image FastWorldGenerator - Copy.txt Hearts of Iron IVModule - Copy.txt

XoeSara commented 1 year ago

I've found I can get it to work when I add these to the descriptor. replace_path="common/countries" replace_path="common/country_tags"

panik4 commented 1 year ago

Interesting, thanks I will investigate once I have access to my computer again Would you mind also telling me the DLCs you are running? There have been reports of issues with certain DLCs

XoeSara commented 1 year ago

Interesting, thanks I will investigate once I have access to my computer again Would you mind also telling me the DLCs you are running? There have been reports of issues with certain DLCs

I have all current DLCs

XoeSara commented 1 year ago

ok. With the current map I have generated it seems La Résistance and Battle for the Bosporus are responsible for crashing the game.

panik4 commented 1 year ago

I have been able to reproduce the issue, it was caused by some references to state IDs in the country history files, while having fewer states than the referenced ID. The next patch will remove these references as an additional measure of compatibility. This avoids having to use a massive amount of replace_paths

This doesn't directly seem to be caused by DLCs, as I got the issue without DLCs enabled as well, this might be another problem, which I'll have to investigate.

Thanks again for the reporting.

panik4 commented 1 month ago

Closed with release 0.7