Amulet-Team / Amulet-Map-Editor

A new Minecraft world editor and converter that supports all versions since Java 1.12 and Bedrock 1.7.
https://www.amuletmc.com/
1.79k stars 123 forks source link

[Bug Report] segfault on opening the 3d editor #1009

Open Cuteistfox opened 11 months ago

Cuteistfox commented 11 months ago

Bug Report

A segfault hapens when useing amulet to edit a world

Current Behaviour:

i get a segfault Consle operation

INFO - PyMCTranslate Version 263
INFO - Loading level /home/meow/.config/com.modrinth.theseus/profiles/vanilla compatible/saves/1_20 world
INFO - Loading level /home/meow/.config/com.modrinth.theseus/profiles/vanilla compatible/saves/1_20 world
Segmentation fault (core dumped)

Expected behavior:

It would not acese invalid memory or get a segfault

Steps To Reproduce:

  1. open a world
  2. hit the 3d map editor button

Environment:

Additional context

useing a macpro late 2013 (going to upgrade to a framework(diy edition) soon)

Attachments

world

steps(probly)

gentlegiantJGC commented 10 months ago

Run Amulet from the command line with -X faulthandler in the command and recreate the crash. That should print out the python traceback that caused the segmentation fault.

Cuteistfox commented 10 months ago

problem is i dont have the orignal sysstem

Cuteistfox commented 10 months ago

i can try on my new system

PavelDobCZ23 commented 7 months ago

I can also reproduce it when opening the 3D editor and provide the segmentation fault output. On my Fedora 39 Linux system it's quite random, sometimes I get it flawlessly running and sometimes it crashes. It almost seems like using the command python instead of python3.9 in the virtual environment makes it more likely to crash, which is quite absurd given they all point to the same target file. Anyway here's the output:

This is the command I run from Amulet Editor.sh - DRI_PRIME=1 __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia gamemoderun ./bin/python -X faulthandler -m amulet_map_editor

pavel@fedora:~/Apps/Amulet/amuletenv$ ./Amulet\ Editor.sh 
INFO - PyMCTranslate Version 263
INFO - Loading level /home/pavel/.local/share/mcpelauncher/games/com.mojang/minecraftWorlds/Hdm2ZdX8AAA=
INFO - Loading level /home/pavel/.local/share/mcpelauncher/games/com.mojang/minecraftWorlds/Hdm2ZdX8AAA=
INFO - Downloading java launcher manifest file.
INFO - Downloading java launcher manifest file.
INFO - Finished downloading java launcher manifest file.
INFO - Finished downloading java launcher manifest file.
Fatal Python error: Segmentation fault

Current thread 0x00007f1607e006c0 (most recent call first):
  File "/home/pavel/Apps/Amulet/amuletenv/lib64/python3.9/site-packages/amulet_map_editor/programs/edit/edit.py", line 86 in _update_loading
  File "/home/pavel/Apps/Amulet/amuletenv/lib64/python3.9/site-packages/amulet_map_editor/programs/edit/edit.py", line 107 in _thread_setup
  File "/usr/lib64/python3.9/threading.py", line 917 in run
  File "/usr/lib64/python3.9/threading.py", line 980 in _bootstrap_inner
  File "/usr/lib64/python3.9/threading.py", line 937 in _bootstrap

Thread 0x00007f166502ac40 (most recent call first):
  File "/home/pavel/Apps/Amulet/amuletenv/lib64/python3.9/site-packages/wx/core.py", line 2262 in MainLoop
  File "/home/pavel/Apps/Amulet/amuletenv/lib64/python3.9/site-packages/amulet_map_editor/__main__.py", line 105 in main
  File "/home/pavel/Apps/Amulet/amuletenv/lib64/python3.9/site-packages/amulet_map_editor/__main__.py", line 117 in <module>
  File "/usr/lib64/python3.9/runpy.py", line 87 in _run_code
  File "/usr/lib64/python3.9/runpy.py", line 197 in _run_module_as_main
./Amulet Editor.sh: line 2: 55965 Segmentation fault      (core dumped)