Fenixin/Minecraft-Region-Fixer

Crash while scanning

Closed this issue · 12 comments

Describe the bug
My world is currently broken
as seen here and i'm using this tool to fix it but when i do i get a crash i'm using windows powershell
image

Full copied text from the MS-DOS view
`PS C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer> python regionfixer.py -p 4 \10.0.0.159\sambashare\mnt\5b5tssd\5b5t\world_main

Welcome to Region Fixer!
(v 0.3.3)

############################################################
################# Scanning world: world ##################
############################################################

World info:
There are 15058 region files, 636 player files and 5 data files in the world directory.

-------------------- Checking level.dat --------------------
'level.dat' is readable

---------------- Scanning UUID player files ----------------
636 of 636|######################################################|Time: 0:00:10

------------- Scanning old format player files -------------
Info: No files to scan.

---------- Scanning structures and map data files ----------
5 of 5|##########################################################|Time: 0:00:00

------------------ Scanning region files -------------------
69 of 15058| |ETA: 0:41:56

Ops! Something went really wrong and regionfixer crashed.

Bug report:


*** Exception while scanning:
*** r.5892.5902.mca


*** Printing the child's traceback:
*** Exception:<class 'UnicodeDecodeError'>'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte


*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\regionfixer_core\scan.py, line 809, in scan_region_file
*** entity_limit)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\regionfixer_core\scan.py, line 908, in scan_chunk
*** chunk = region_file.get_chunk(coords)*********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\region.py, line 599, in get_chunk
*** return self.get_nbt(x, z)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\region.py, line 578, in get_nbt
*** nbt = NBTFile(buffer=data)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 628, in init
*** self.parse_file()**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 655, in parse_file
*** self._parse_buffer(self.file)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 404, in _parse_buffer
*** self.tags.append(TAGLISTself.tagID)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 476, in init
*** self._parse_buffer(buffer)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 404, in _parse_buffer
*** self.tags.append(TAGLISTself.tagID)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 476, in init
*** self._parse_buffer(buffer)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File C:\Users\Sebastian\Desktop\Minecraft-Region-Fixer\nbt\nbt.py, line 353, in _parse_buffer
*** self.value = read.decode("utf-8")
**********`
Expected behavior
I expected this to scan the broken files.

Screenshots
image

Files that would help solving the issue
i have none but this is the file r.5892.5902.mca

Desktop (please complete the following information):

  • OS: Windows 10 Professional
  • Python version: Python 3.7.9
  • Region Fixer Version (v 0.3.3)

Hello!

Thanks for the bug report!

Could you send me the broken file so I can reproduce the bug and try to fix it? My weekend is going to be really busy and after that I might be moving to a new place but I'll try my best.

Hi, Can you send me your Discord or any other contact? As I don't want to send this publicly.

You can send me and email to fenixin at gmail dot com

Thanks, I've got them.

Can confirm this bug happens to me aswell on linux

Any thing new?

Nope, didn't had the time, I will update as soon as I look into it.

Hello!

Please, test the new branch:

https://github.com/Fenixin/Minecraft-Region-Fixer/tree/new-crash

And report back if it solves the problem. Once confirmed it fixes it I will update regionfixer master with this branch.

Has anybody tested this branch?

Seems to work. Hasn't crashed for a while.

Hey I'll test it soon I'm just busy right now.

This has been merged to master and it seems to be fixed. Closing. Feel free to open a new issue if you still have problems.