Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error launching game, uncaught exception(s) #1569

Closed
FabioLolix opened this issue Oct 8, 2023 · 25 comments · Fixed by #1578
Closed

Error launching game, uncaught exception(s) #1569

FabioLolix opened this issue Oct 8, 2023 · 25 comments · Fixed by #1578
Labels
area: buildsystem Related to our cmake/python buildsystem bug Behaving differently as it should behave

Comments

@FabioLolix
Copy link

Hello, running $ openage game --modpacks hd_base I have 2 different uncaught exception between gcc and clang build

GCC: std::exception of type std::length_error: basic_string::_M_create

Clang: std::exception of type std::bad_alloc: std::bad_alloc


GCC build:

$ openage game --modpacks hd_base
INFO [py] launching openage v0.4.1-1528-gaae16d373
INFO [py] compiled by GNU 13.2.1
INFO [py] Modpack directory engine not found
INFO [py] openage nyan API modpack not found
INFO [py] Dumping info file...
INFO [py] Dumping data files...
INFO [py] Found modpack engine
INFO [py] Found modpack hd_base
INFO loading configuration files...
INFO [py] loading config file [Union(<openage.util.fslike.union.Union object at 0x7f5ed94213d0>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7f5ed9423290>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO launching engine with root directoryPath(Union(<openage.util.fslike.union.Union object at 0x7f5ed94213d0>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7f5ed9423290>.root @ (b'assets',)):)
INFO loading configuration files...
INFO [py] loading config file [Union(<openage.util.fslike.union.Union object at 0x7f5ed94213d0>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7f5ed9423290>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO Found modpack: engine
INFO Found modpack: hd_base
INFO Created game simulation
INFO Activated modpack: engine
INFO Activated modpack: hd_base
INFO Created 3 threads (24 available)
INFO [T1] Time loop started
INFO [T2] Presenter: Launching subsystems...
INFO [T2] Presenter: Initializing graphics subsystems...

FATAL: terminate has been called

uncaught exception

std::exception of type std::length_error: basic_string::_M_create

current stack:

Traceback (most recent call last):
  File ?, in ? [0x7f5edc8aa9eb]
  File ?, in ? [0x7f5edb6e1943]
  File ?, in ? [0x7f5ed90829f9]
  File ?, in openage::gamestate::GameSimulation::run()+0x2f [0x7f5ed90ed65f]
  File ?, in openage::gamestate::GameSimulation::start()+0xaf [0x7f5ed90ed48f]
  File ?, in openage::gamestate::Game::Game(std::shared_ptr<openage::event::EventLoop> const&, std::shared_ptr<openage::assets::ModManager> const&, std::shared_ptr<openage::gamestate::EntityFactory> const&)+0xcc [0x7f5ed90e607c]
  File ?, in openage::gamestate::Game::load_data(std::shared_ptr<openage::assets::ModManager> const&)+0x50 [0x7f5ed90e55b0]
  File ?, in ? [0x7f5ed8f182d8]
  File ?, in __cxa_rethrow+0x4f [0x7f5edb6b043f]
  File ?, in ? [0x7f5edb6b0189]
  File ?, in ? [0x7f5edb6b011c]
  File ?, in openage::error::terminate_handler()+0x10e [0x7f5ed90875ae]

handing over to the system...

terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create
Annullato (core dump creato)

Clang build:

$ openage game --modpacks hd_base
INFO [py] launching openage v0.4.1-1528-gaae16d373
INFO [py] compiled by Clang 16.0.6
INFO [py] openage nyan API modpack is up to date
INFO [py] Found modpack engine
INFO [py] Found modpack hd_base
INFO loading configuration files...
INFO [py] loading config file [Union(<openage.util.fslike.union.Union object at 0x7fee7e946110>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7fee7e945e50>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO launching engine with root directoryPath(Union(<openage.util.fslike.union.Union object at 0x7fee7e946110>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7fee7e945e50>.root @ (b'assets',)):)
INFO loading configuration files...
INFO [py] loading config file [Union(<openage.util.fslike.union.Union object at 0x7fee7e946110>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7fee7e945e50>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO Found modpack: engine
INFO Found modpack: hd_base
INFO Created game simulation
INFO Activated modpack: engine
INFO Activated modpack: hd_base
INFO Created 3 threads (24 available)
INFO [T1] Time loop started

FATAL: terminate has been called

uncaught exception

std::exception of type std::bad_alloc: std::bad_alloc

current stack:

Traceback (most recent call last):
  File ?, in ? [0x7fee81eaa9eb]
  File ?, in ? [0x7fee80ce1943]
INFO [T2] Presenter: Launching subsystems...
INFO [T2] Presenter: Initializing graphics subsystems...
  File ?, in ? [0x7fee7e3275a4]
  File ?, in openage::gamestate::GameSimulation::run()+0x24 [0x7fee7e3aab44]
  File ?, in openage::gamestate::GameSimulation::start()+0x86 [0x7fee7e3aaee6]
  File ?, in openage::gamestate::Game::Game(std::shared_ptr<openage::event::EventLoop> const&, std::shared_ptr<openage::assets::ModManager> const&, std::shared_ptr<openage::gamestate::EntityFactory> const&)+0xdd [0x7fee7e3a77ed]
  File ?, in openage::gamestate::Game::load_data(std::shared_ptr<openage::assets::ModManager> const&)+0x8f [0x7fee7e3a7aff]
  File ?, in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* std::__do_uninit_copy<__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*>(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)+0xea [0x7fee805a38ea]
  File ?, in __cxa_rethrow+0x4f [0x7fee80cb043f]
  File ?, in ? [0x7fee80cb0189]
  File ?, in ? [0x7fee80cb011c]
  File ?, in openage::error::terminate_handler()+0x1a5 [0x7fee7e32a4f5]

handing over to the system...

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Annullato (core dump creato)
@heinezen
Copy link
Member

heinezen commented Oct 8, 2023

Can you check in the debugger which line this happens on, please?

@heinezen heinezen added bug Behaving differently as it should behave lang: c++ Done in C++ code area: simulation Involved in the game mechanics and simulation and removed lang: c++ Done in C++ code labels Oct 8, 2023
@FabioLolix
Copy link
Author

FabioLolix commented Oct 8, 2023

I have installed gdb but I don't know how to use it

@FabioLolix
Copy link
Author

@heinezen
Copy link
Member

heinezen commented Oct 9, 2023

Can you post the modpack.toml file in hd_base, please? That might have something to do with the error.

@FabioLolix
Copy link
Author

Here

# openage modpack definition file

file_version = "2"

[info]
name = "hd_base"
version = "0.5"
versionstr = "5.8"
repo = "openage"

[assets]
include = [ "data/**",]
exclude = []

[dependency]
modpacks = []

[conflict]
modpacks = []

[authors]

[authorgroups]

@heinezen
Copy link
Member

heinezen commented Oct 10, 2023

hd_base looks OK. Can you also send me the modpack.toml of the engine modpack? I'm pretty sure the error comes from there.

@yangzhangstl
Copy link

same problem

@FabioLolix
Copy link
Author

Here, this says version = "0.4.0"

# openage modpack definition file

file_version = "2"

[info]
name = "engine"
version = "0.4.0"
repo = "openage"

[assets]
include = [ "**",]
exclude = []

[dependency]
modpacks = []

[conflict]
modpacks = []

[authors]

[authorgroups]

@heinezen
Copy link
Member

@FabioLolix Looks okay... can you chek if #1574 helps? I still can't repoduce this locally.

@FabioLolix
Copy link
Author

patched GCC build but have the same errors

$ openage game --modpacks hd_base
INFO [py] launching openage v0.4.1-1532-g4773e70ff
INFO [py] compiled by GNU 13.2.1
INFO [py] openage nyan API modpack is up to date
INFO [py] Found modpack engine
INFO [py] Found modpack hd_base
INFO loading configuration files...
INFO [py] loading config file [Union(<openage.util.fslike.union.Union object at 0x7eff2e8ac090>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7eff2e89c150>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO launching engine with root directoryPath(Union(<openage.util.fslike.union.Union object at 0x7eff2e8ac090>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7eff2e89c150>.root @ (b'assets',)):)
INFO loading configuration files...
INFO [py] loading config file [Union(<openage.util.fslike.union.Union object at 0x7eff2e8ac090>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7eff2e89c150>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO Found modpack: engine
INFO Found modpack: hd_base
INFO Created game simulation
INFO Activated modpack: engine
INFO Activated modpack: hd_base
INFO Created 3 threads (24 available)
INFO [T1] Presenter: Launching subsystems...
INFO [T1] Presenter: Initializing graphics subsystems...
INFO [T2] Time loop started

FATAL: terminate has been called

uncaught exception

std::exception of type std::bad_alloc: std::bad_alloc

current stack:

Traceback (most recent call last):
  File ?, in ? [0x7eff31eaa9eb]
  File ?, in ? [0x7eff30ae1943]
  File ?, in ? [0x7eff2e483ae9]
  File ?, in openage::gamestate::GameSimulation::run()+0x2f [0x7eff2e4ee8cf]
  File ?, in openage::gamestate::GameSimulation::start()+0xaf [0x7eff2e4ee6ff]
  File ?, in openage::gamestate::Game::Game(std::shared_ptr<openage::event::EventLoop> const&, std::shared_ptr<openage::assets::ModManager> const&, std::shared_ptr<openage::gamestate::EntityFactory> const&)+0xcc [0x7eff2e4e72cc]
  File ?, in openage::gamestate::Game::load_data(std::shared_ptr<openage::assets::ModManager> const&)+0x50 [0x7eff2e4e6900]
  File ?, in ? [0x7eff2e3182e8]
  File ?, in __cxa_rethrow+0x4f [0x7eff30ab043f]
  File ?, in ? [0x7eff30ab0189]
  File ?, in ? [0x7eff30ab011c]
  File ?, in openage::error::terminate_handler()+0x10e [0x7eff2e48869e]

handing over to the system...

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Annullato (core dump creato)
[fabio@archlinux ~]$ 
[fabio@archlinux ~]$ openage game --modpacks hd_base
INFO [py] launching openage v0.4.1-1532-g4773e70ff
INFO [py] compiled by GNU 13.2.1
INFO [py] openage nyan API modpack is up to date
INFO [py] Found modpack engine
INFO [py] Found modpack hd_base
INFO loading configuration files...
INFO [py] loading config file [Union(<openage.util.fslike.union.Union object at 0x7f4263be4550>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7f4263bd4650>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO launching engine with root directoryPath(Union(<openage.util.fslike.union.Union object at 0x7f4263be4550>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7f4263bd4650>.root @ (b'assets',)):)
INFO loading configuration files...
INFO [py] loading config file [Union(<openage.util.fslike.union.Union object at 0x7f4263be4550>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7f4263bd4650>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO Found modpack: engine
INFO Found modpack: hd_base
INFO Created game simulation
INFO Activated modpack: engine
INFO Activated modpack: hd_base
INFO Created 3 threads (24 available)
INFO [T1] Presenter: Launching subsystems...
INFO [T1] Presenter: Initializing graphics subsystems...

FATAL: terminate has been called

uncaught exception

std::exception of type std::length_error: basic_string::_M_create

current stack:

Traceback (most recent call last):
  File ?, in ? [0x7f42670aa9eb]
INFO [T2] Time loop started
  File ?, in ? [0x7f4265ee1943]
  File ?, in ? [0x7f4263683ae9]
  File ?, in openage::gamestate::GameSimulation::run()+0x2f [0x7f42636ee8cf]
  File ?, in openage::gamestate::GameSimulation::start()+0xaf [0x7f42636ee6ff]
  File ?, in openage::gamestate::Game::Game(std::shared_ptr<openage::event::EventLoop> const&, std::shared_ptr<openage::assets::ModManager> const&, std::shared_ptr<openage::gamestate::EntityFactory> const&)+0xcc [0x7f42636e72cc]
  File ?, in openage::gamestate::Game::load_data(std::shared_ptr<openage::assets::ModManager> const&)+0x50 [0x7f42636e6900]
  File ?, in ? [0x7f42635182e8]
  File ?, in __cxa_rethrow+0x4f [0x7f4265eb043f]
  File ?, in ? [0x7f4265eb0189]
  File ?, in ? [0x7f4265eb011c]
  File ?, in openage::error::terminate_handler()+0x10e [0x7f426368869e]

handing over to the system...

terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create
Annullato (core dump creato)
[fabio@archlinux ~]$

@heinezen
Copy link
Member

@FabioLolix New plan: Please run the lates commit from the PR and paste the output here. I've added log messages to every string operation.

FabioLolix added a commit to FabioLolix/PKGBUILD that referenced this issue Oct 10, 2023
@FabioLolix
Copy link
Author

1 2

$ openage game --modpacks hd_base
INFO [py] launching openage v0.3.0-3150-gf9abad3e
INFO [py] compiled by GNU 13.2.1
INFO [py] openage nyan API modpack is up to date
INFO [py] Found modpack engine
INFO [py] Found modpack hd_base
INFO loading configuration files...
INFO [py] loading config file [Union(<openage.util.fslike.union.Union object at 0x7fcfeb9f3cd0>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7fcfed7e9490>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO launching engine with root directoryPath(Union(<openage.util.fslike.union.Union object at 0x7fcfeb9f3cd0>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7fcfed7e9490>.root @ (b'assets',)):)
INFO loading configuration files...
INFO [py] loading config file [Union(<openage.util.fslike.union.Union object at 0x7fcfeb9f3cd0>.root @ (b'cfg',), <openage.util.fslike.union.Union object at 0x7fcfed7e9490>.root @ (b'assets',))]:cfg/keybinds.oac...
INFO Found modpack: engine
INFO Found modpack: hd_base
INFO Created game simulation
INFO Activated modpack: engine
INFO Activated modpack: hd_base
INFO Created 3 threads (24 available)
INFO [T1] parts: 1
INFO [T1] last_part: **
INFO [T1] search before: **
INFO [T1] B0 parts size: 1
INFO [T1] B1 search: 
INFO [T3] Presenter: Launching subsystems...
INFO [T3] Presenter: Initializing graphics subsystems...
INFO [T2] Time loop started
INFO [T1] Loading .nyan file: engine/resistance/property/type.nyan
INFO [T1] Loading .nyan file: engine/util/distribution_type.nyan
INFO [T1] Loading .nyan file: engine/root.nyan
INFO [T1] Loading .nyan file: engine/util/calculation_type.nyan
INFO [T1] Loading .nyan file: engine/resistance/property.nyan
INFO [T1] Loading .nyan file: engine/util/cost.nyan
INFO [T1] Loading .nyan file: engine/util/payment_mode.nyan
INFO [T1] Loading .nyan file: engine/resistance/continuous.nyan
INFO [T1] Loading .nyan file: engine/resistance.nyan
INFO [T1] Loading .nyan file: engine/resistance/discrete.nyan
INFO [T1] Loading .nyan file: engine/resistance/continuous/time_relative_progress.nyan
INFO [T1] Loading .nyan file: engine/util/progress_type.nyan
INFO [T1] Loading .nyan file: engine/resistance/continuous/time_relative_progress/type.nyan
INFO [T1] Loading .nyan file: engine/resistance/continuous/time_relative_attribute/type.nyan
INFO [T1] Loading .nyan file: engine/resistance/continuous/time_relative_attribute.nyan
INFO [T1] Loading .nyan file: engine/util/attribute_change_type.nyan
INFO [T1] Loading .nyan file: engine/resistance/continuous/flat_attribute_change/type.nyan
INFO [T1] Loading .nyan file: engine/resistance/continuous/flat_attribute_change.nyan
INFO [T1] Loading .nyan file: engine/util/attribute.nyan
INFO [T1] Loading .nyan file: engine/util/language/translated/type.nyan
INFO [T1] Loading .nyan file: engine/util/language/translated.nyan
INFO [T1] Loading .nyan file: engine/util/language.nyan
INFO [T1] Loading .nyan file: engine/util/sound.nyan
INFO [T1] Loading .nyan file: engine/resistance/continuous/type.nyan
INFO [T1] Loading .nyan file: engine/util/lure_type.nyan
INFO [T1] Loading .nyan file: engine/resistance/discrete/convert/type.nyan
INFO [T1] Loading .nyan file: engine/resistance/discrete/convert.nyan
INFO [T1] Loading .nyan file: engine/util/convert_type.nyan
INFO [T1] Loading .nyan file: engine/resistance/discrete/flat_attribute_change/type.nyan
INFO [T1] Loading .nyan file: engine/resistance/discrete/flat_attribute_change.nyan
INFO [T1] Loading .nyan file: engine/resistance/discrete/type.nyan
INFO [T1] Loading .nyan file: engine/util/storage.nyan
INFO [T1] Loading .nyan file: engine/util/progress.nyan
INFO [T1] Loading .nyan file: engine/util/game_entity_type.nyan
INFO [T1] Loading .nyan file: engine/util/resource.nyan
INFO [T1] Loading .nyan file: engine/util/state_machine.nyan
INFO [T1] Loading .nyan file: engine/util/transform_pool.nyan
INFO [T1] Loading .nyan file: engine/modifier.nyan
INFO [T1] Loading .nyan file: engine/modifier/property.nyan
INFO [T1] Loading .nyan file: engine/ability.nyan
INFO [T1] Loading .nyan file: engine/ability/property.nyan
INFO [T1] Loading .nyan file: engine/util/game_entity.nyan
INFO [T1] Loading .nyan file: engine/util/variant.nyan
INFO [T1] Loading .nyan file: engine/util/patch.nyan
INFO [T1] Loading .nyan file: engine/util/patch/property.nyan
INFO [T1] Loading .nyan file: engine/util/resource_spot.nyan
INFO [T1] Loading .nyan file: engine/util/progress/property.nyan
INFO [T1] Loading .nyan file: engine/util/logic.nyan
INFO [T1] Loading .nyan file: engine/util/container_type.nyan
INFO [T1] Loading .nyan file: engine/effect.nyan
INFO [T1] Loading .nyan file: engine/effect/property.nyan
INFO [T1] Loading .nyan file: engine/ability/property/type.nyan
INFO [T1] Loading .nyan file: engine/util/lock.nyan
INFO [T1] Loading .nyan file: engine/util/graphics.nyan
INFO [T1] Loading .nyan file: engine/util/animation_override.nyan
INFO [T1] Loading .nyan file: engine/util/diplomatic_stance.nyan
INFO [T1] Loading .nyan file: engine/ability/type.nyan
INFO [T1] Loading .nyan file: engine/util/trade_route.nyan
INFO [T1] Loading .nyan file: engine/util/terrain_type.nyan
INFO [T1] Loading .nyan file: engine/util/terrain.nyan
INFO [T1] Loading .nyan file: engine/util/create.nyan
INFO [T1] Loading .nyan file: engine/util/placement_mode.nyan
INFO [T1] Loading .nyan file: engine/util/hitbox.nyan
INFO [T1] Loading .nyan file: engine/util/research.nyan
INFO [T1] Loading .nyan file: engine/util/tech.nyan
INFO [T1] Loading .nyan file: engine/util/tech_type.nyan
INFO [T1] Loading .nyan file: engine/util/effect_batch.nyan
INFO [T1] Loading .nyan file: engine/util/effect_batch/property.nyan
INFO [T1] Loading .nyan file: engine/effect/discrete.nyan
INFO [T1] Loading .nyan file: engine/util/selection_box.nyan
INFO [T1] Loading .nyan file: engine/util/game_entity_stance.nyan
INFO [T1] Loading .nyan file: engine/util/production_mode.nyan
INFO [T1] Loading .nyan file: engine/effect/continuous.nyan
INFO [T1] Loading .nyan file: engine/util/accuracy.nyan
INFO [T1] Loading .nyan file: engine/util/exchange_mode.nyan
INFO [T1] Loading .nyan file: engine/util/dropoff_type.nyan
INFO [T1] Loading .nyan file: engine/util/target_mode.nyan
INFO [T1] Loading .nyan file: engine/util/exchange_rate.nyan
INFO [T1] Loading .nyan file: engine/util/price_pool.nyan
INFO [T1] Loading .nyan file: engine/util/price_mode.nyan
INFO [T1] Loading .nyan file: engine/util/passable_mode.nyan
INFO [T1] Loading .nyan file: engine/util/game_entity_formation.nyan
INFO [T1] Loading .nyan file: engine/util/formation.nyan
INFO [T1] Loading .nyan file: engine/util/herdable_mode.nyan
INFO [T1] Loading .nyan file: engine/util/move_mode.nyan
INFO [T1] Loading .nyan file: engine/modifier/resistance/flat_attribute_change/type.nyan
INFO [T1] Loading .nyan file: engine/modifier/property/type.nyan
INFO [T1] Loading .nyan file: engine/modifier/multiplier/effect/type.nyan
INFO [T1] Loading .nyan file: engine/modifier/type.nyan
INFO [T1] Loading .nyan file: engine/util/progress_status.nyan
INFO [T1] Loading .nyan file: engine/modifier/effect/flat_attribute_change/type.nyan
INFO [T1] Loading .nyan file: engine/modifier/effect/type.nyan
INFO [T1] Loading .nyan file: engine/util/terrain_type/type.nyan
INFO [T1] Loading .nyan file: engine/util/game_entity_type/type.nyan
INFO [T1] Loading .nyan file: engine/util/mod.nyan
INFO [T1] Loading .nyan file: engine/util/production_mode/type.nyan
INFO [T1] Loading .nyan file: engine/util/effect_batch/property/type.nyan
INFO [T1] Loading .nyan file: engine/util/effect_batch/type.nyan
INFO [T1] Loading .nyan file: engine/util/logic/gate.nyan
INFO [T1] Loading .nyan file: engine/util/logic/literal_scope.nyan
INFO [T1] Loading .nyan file: engine/util/logic/literal_scope/type.nyan
INFO [T1] Loading .nyan file: engine/util/logic/literal.nyan
INFO [T1] Loading .nyan file: engine/util/logic/literal/type.nyan
INFO [T1] Loading .nyan file: engine/util/logic/gate/type.nyan
INFO [T1] Loading .nyan file: engine/util/logic/const.nyan
INFO [T1] Loading .nyan file: engine/util/passable_mode/type.nyan
INFO [T1] Loading .nyan file: engine/util/modifier_scope/type.nyan
INFO [T1] Loading .nyan file: engine/util/modifier_scope.nyan
INFO [T1] Loading .nyan file: engine/util/variant/type.nyan
INFO [T1] Loading .nyan file: engine/util/attribute_change_type/type.nyan
INFO [T1] Loading .nyan file: engine/util/selection_box/type.nyan
INFO [T1] Loading .nyan file: engine/util/game_entity_stance/type.nyan
INFO [T1] Loading .nyan file: engine/util/exchange_mode/type.nyan
INFO [T1] Loading .nyan file: engine/util/diplomatic_stance/type.nyan
INFO [T1] Loading .nyan file: engine/util/patch/property/type.nyan

SIGSEGV

FATAL: terminate has been called

current stack:

Traceback (most recent call last):
  File ?, in ? [0x7fcfeeeaa9eb]
  File ?, in ? [0x7fcfedce1943]
  File ?, in ? [0x7fcfeb483bf6]
  File ?, in openage::time::TimeLoop::run()+0x3a [0x7fcfeb63055a]
  File ?, in openage::time::Clock::update_time()+0x1e [0x7fcfeb62c55e]
  File ?, in ? [0x7fcfeee5c710]
  File ?, in ? [0x7fcfeb481c45]
  File ?, in ? [0x7fcfedcb0189]
  File ?, in ? [0x7fcfedcb011c]
  File ?, in openage::error::terminate_handler()+0x10e [0x7fcfeb48876e]

handing over to the system...

terminate called without an active exception
Annullato (core dump creato)

@heinezen
Copy link
Member

So the response makes me think that some memory corruption is going on. The strings are probably not the problem. Might be a race condition in the threads. But without active debugging, this could be hard to detect. I have to give up here for now and think what the cause could be.

@heinezen
Copy link
Member

heinezen commented Oct 14, 2023

I set up an Arch environment yesterday and could reproduce the error! Will check what caused it today.

@heinezen
Copy link
Member

It's a build optimization problem. The error appears in RelWithDebInfo mode but not in Debug. Classic Heisenbug.

@FabioLolix
Copy link
Author

Thank you very much, the problem happen with Release and None too

@heinezen
Copy link
Member

heinezen commented Oct 14, 2023

Looks like this is what causes trouble:

https://github.com/SFTtech/openage/blob/master/libopenage/engine/engine.cpp#L77

The line is optimized out and Engine is destroyed which cause all sorts of problems.

@heinezen heinezen added area: buildsystem Related to our cmake/python buildsystem and removed area: simulation Involved in the game mechanics and simulation labels Oct 14, 2023
@heinezen
Copy link
Member

Fix in #1578

@FabioLolix
Copy link
Author

I'll tests later thanks

@FabioLolix
Copy link
Author

The fix works

@heinezen
Copy link
Member

I've added another commit that should address this issue permanently

@FabioLolix
Copy link
Author

I'll test tomorrow thanks

@heinezen
Copy link
Member

@FabioLolix Did you get around testing it? If everything works, we will do a bugfix release.

@FabioLolix
Copy link
Author

Yes, 4 cmake build type build and run

@heinezen
Copy link
Member

Great, the release is live 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: buildsystem Related to our cmake/python buildsystem bug Behaving differently as it should behave
Projects
Archived in project
3 participants