SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.63k stars 1.11k forks source link

"invalid float when reading max_charge at offset" when trying to run AoE2DE #1660

Closed fabiobarkoski closed 1 month ago

fabiobarkoski commented 1 month ago

When I tried to run openage with AoE2DE an error occurred, but with AoC Trial version works fine. stack trace below:

Traceback (most recent call last):
  File "run.py", line 20, in init run
    main()
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/__main__.py", line 168, in main
    return args.entrypoint(args, cli.error)
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/main/main.py", line 82, in main
    convert_assets(asset_path, args)
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/main.py", line 119, in convert_assets
    convert(args)
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/tool/driver.py", line 36, in convert
    convert_metadata(args)
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/tool/driver.py", line 73, in convert_metadata
    gamespec = get_gamespec(args.srcdir, args.game_version, not args.flag("no_pickle_cache"))
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/service/read/gamedata.py", line 47, in get_gamespec
    gamespec = load_gamespec(empiresdat_file,
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/service/read/gamedata.py", line 102, in load_gamespec
    _, gamespec = wrapper.read(file_data, 0, game_version, dynamic_load=dynamic_load)
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/value_object/read/genie_structure.py", line 133, in read
    offset, gen_members = self._read_multisubtye(
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/value_object/read/genie_structure.py", line 309, in _read_multisubtye
    offset, gen_members = new_data.read(raw, offset, game_version, new_data_class)
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/value_object/read/genie_structure.py", line 133, in read
    offset, gen_members = self._read_multisubtye(
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/value_object/read/genie_structure.py", line 309, in _read_multisubtye
    offset, gen_members = new_data.read(raw, offset, game_version, new_data_class)
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/value_object/read/genie_structure.py", line 133, in read
    offset, gen_members = self._read_multisubtye(
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/value_object/read/genie_structure.py", line 309, in _read_multisubtye
    offset, gen_members = new_data.read(raw, offset, game_version, new_data_class)
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/value_object/read/genie_structure.py", line 140, in read
    offset, gen_members, stop_reading_members = self._read_primitive(
  File "/home/fabio/Documents/projetos/Pessoal/contribute/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/value_object/read/genie_structure.py", line 506, in _read_primitive
    raise SyntaxError("invalid float when "
SyntaxError: invalid float when reading max_charge at offset  0x258d6d
make: *** [Makefile:25: run] Error 1
heinezen commented 1 month ago

https://github.com/SFTtech/openage/pull/1663 should fix the errors. Can you test if the PR works for you?

fabiobarkoski commented 1 month ago

Now I'm getting the following error:

Traceback (most recent call last):
  File "run.py", line 20, in init run
    main()
  File "/home/fabio/Desktop/typis/openage/.bin/g++-debug-Oauto-sanitize-none/openage/__main__.py", line 168, in main
    return args.entrypoint(args, cli.error)
  File "/home/fabio/Desktop/typis/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/main.py", line 272, in main
    convert_assets(outdir, args, srcdir)
  File "/home/fabio/Desktop/typis/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/main.py", line 119, in convert_assets
    convert(args)
  File "/home/fabio/Desktop/typis/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/tool/driver.py", line 35, in convert
    convert_metadata(args)
  File "/home/fabio/Desktop/typis/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/tool/driver.py", line 92, in convert_metadata
    modpacks = args.converter.convert(gamespec,
  File "/home/fabio/Desktop/typis/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/processor/conversion/de2/processor.py", line 77, in convert
    modpacks = cls._post_processor(dataset)
  File "/home/fabio/Desktop/typis/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/processor/conversion/de2/processor.py", line 174, in _post_processor
    DE2NyanSubprocessor.convert(full_data_set)
  File "/home/fabio/Desktop/typis/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/processor/conversion/de2/nyan_subprocessor.py", line 49, in convert
    cls._process_game_entities(full_data_set)
  File "/home/fabio/Desktop/typis/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/processor/conversion/de2/nyan_subprocessor.py", line 149, in _process_game_entities
    cls.building_line_to_game_entity(building_line)
  File "/home/fabio/Desktop/typis/openage/.bin/g++-debug-Oauto-sanitize-none/openage/convert/processor/conversion/de2/nyan_subprocessor.py", line 449, in building_line_to_game_entity
    if building_line.get_head_unit()["speed"] > 0:
TypeError: '>' not supported between instances of 'FloatMember' and 'int'
heinezen commented 1 month ago

Should be fixed now.

fabiobarkoski commented 1 month ago

Yeah, now it is working. Thanks :)