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

[macOS] Multiprocessing EOFError during asset conversion with Python 3.13 #1762

Open
jyanminz opened this issue Mar 26, 2025 · 2 comments
Open
Labels
area: assets Involved with assets (images, sounds, ...) bug Behaving differently as it should behave lang: python Done in Python code os: macos macOS-specific issue

Comments

@jyanminz
Copy link

jyanminz commented Mar 26, 2025

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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/multiprocessing/connection.py", line 399, in _recv
    raise EOFError
EOFError
@TheJJ
Copy link
Member

TheJJ commented Mar 26, 2025

thanks for the report! how did you launch the program, though? especially the argument subcommand: invalid choice seems weird, there shouldn't be any argument parsing at that stage :)

@TheJJ TheJJ added bug Behaving differently as it should behave lang: python Done in Python code area: assets Involved with assets (images, sounds, ...) labels Mar 26, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in openage converter Mar 26, 2025
@heinezen heinezen added the os: macos macOS-specific issue label Mar 26, 2025
@heinezen
Copy link
Member

@TheJJ I think that's how Python internally spawns new threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: assets Involved with assets (images, sounds, ...) bug Behaving differently as it should behave lang: python Done in Python code os: macos macOS-specific issue
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants