SFTtech / SFTtech/openage

[macOS] Multiprocessing EOFError during asset conversion with Python 3.13

Open
#1,762 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: assets bug lang: python os: macos
Dominant language
Python
Stars
14.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Description:
When attempting to convert game assets on macOS (Apple Silicon), the process fails with a multiprocessing EOFError. The error occurs specifically when using multiprocessing.Manager().

Environment:

macOS Version: 15.3.2
Python Version: 3.13.2 (Homebrew)
Hardware: Apple Silicon M4
Openage build: Debug mode with Homebrew LLVM

Error log:

Do you want to convert assets? [Y/n]
> y

openage requires a local game installation for conversion
but no local installation could be found automatically.
  Do you want to download the AoC trial version? [Y/n]
> y
Downloading AoC trial version from https://archive.org/download/AgeOfEmpiresIiTheConquerorsDemo/Age2XTrial.exe
Extracting game files to [Directory(/var/folders/6j/8zwr8lhn1v51_drcq1nl252h0000gn/T/tmpk2d988fl)]:...
converting from '/var/folders/6j/8zwr8lhn1v51_drcq1nl252h0000gn/T/tmpk2d988fl'
INFO [py] Looking for compatible games to convert...
INFO [py] Compatible game edition detected:
INFO [py]  * Age of Empires 2: The Conqueror's Trial Version
INFO [py] converting metadata
INFO [py] using cached wrapper: /var/folders/6j/8zwr8lhn1v51_drcq1nl252h0000gn/T/AOC_empires2_x1.dat.pickle
INFO [py] Finished metadata read (0.67 seconds)
INFO [py] Starting conversion...
INFO [py] Extracting Genie data...
INFO [py] Creating API-like objects...
INFO [py] Linking API-like objects...
INFO [py] Generating auxiliary objects...
INFO [py] Creating nyan objects...
INFO [py] Creating requests for media export...
INFO [py] Finished data conversion (1.30 seconds)
INFO [py] Starting export...
INFO [py] Dumping info file...
INFO [py] Dumping data files...
INFO [py] Exporting media files...
INFO [py] -- Exporting graphics files...
usage: openage [-h] [--version]
               {main,game,test,convert,convert-file,convert-export-api,codegen} ...
usage: openage [-h] [--version]
               {main,game,test,convert,convert-file,convert-export-api,codegen} ...
openage: error: argument subcommand: invalid choice: 'from multiprocessing.resource_tracker import main;main(11)' (choose from main, game, test, convert, convert-file, convert-export-api, codegen)
openage: error: argument subcommand: invalid choice: 'from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=12, pipe_handle=14)' (choose from main, game, test, convert, convert-file, convert-export-api, codegen)
Traceback (most recent call last):
  File "run.py", line 20, in init run
    main()
  File "/Users/jiangyanmin/Desktop/openage/.bin/opt-homebrew-opt-llvm-bin-clang++-debug-Oauto-sanitize-none/openage/__main__.py", line 168, in main
    return args.entrypoint(args, cli.error)
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/Users/jiangyanmin/Desktop/openage/.bin/opt-homebrew-opt-llvm-bin-clang++-debug-Oauto-sanitize-none/openage/convert/main.py", line 284, in main
    convert_assets(outdir, args, srcdir)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jiangyanmin/Desktop/openage/.bin/opt-homebrew-opt-llvm-bin-clang++-debug-Oauto-sanitize-none/openage/convert/main.py", line 121, in convert_assets
    convert(args)
    ~~~~~~~^^^^^^
  File "/Users/jiangyanmin/Desktop/openage/.bin/opt-homebrew-opt-llvm-bin-clang++-debug-Oauto-sanitize-none/openage/convert/tool/driver.py", line 35, in convert
    convert_metadata(args)
    ~~~~~~~~~~~~~~~~^^^^^^
  File "/Users/jiangyanmin/Desktop/openage/.bin/opt-homebrew-opt-llvm-bin-clang++-debug-Oauto-sanitize-none/openage/convert/tool/driver.py", line 108, in convert_metadata
    ModpackExporter.export(modpack, args)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/Users/jiangyanmin/Desktop/openage/.bin/opt-homebrew-opt-llvm-bin-clang++-debug-Oauto-sanitize-none/openage/convert/processor/export/modpack_exporter.py", line 60, in export
    MediaExporter.export(modpack.get_media_files(), sourcedir, modpack_dir, args)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jiangyanmin/Desktop/openage/.bin/opt-homebrew-opt-llvm-bin-clang++-debug-Oauto-sanitize-none/openage/convert/processor/export/media_exporter.py", line 122, in export
    MediaExporter._export_multithreaded(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        cur_export_requests,
        ^^^^^^^^^^^^^^^^^^^^
    ...<8 lines>...
        args.dll_manager,
        ^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/jiangyanmin/Desktop/openage/.bin/opt-homebrew-opt-llvm-bin-clang++-debug-Oauto-sanitize-none/openage/convert/processor/export/media_exporter.py", line 263, in _export_multithreaded
    with multiprocessing.Manager() as manager:
         ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/multiprocessing/context.py", line 57, in Manager
    m.start()
    ~~~~~~~^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/multiprocessing/managers.py", line 569, in start
    self._address = reader.recv()
                    ~~~~~~~~~~~^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/multiprocessing/connection.py", line 430, in _recv_bytes
    buf = self._recv(4)
  File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/multiprocessing/connection.py", line 399, in _recv
    raise EOFError
EOFError

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in openage/convert/processor/export/media_exporter.py at _export_multithreaded, where multiprocessing.Manager() raises EOFError during asset export. Reproduce the conversion on macOS with Python 3.13.2 and inspect the related entry flow in openage/convert/main.py and openage/convert/tool/driver.py. Done means asset conversion completes without the multiprocessing startup failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, python
Domain
game-dev, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.