Minecraft-Region-Fixer
Minecraft-Region-Fixer copied to clipboard
crash scan
Hello, I ran a scan, but it crashed, I don't know why.
I'll give you the bug report.
Welcome to Region Fixer!
(version: 0.2.1)
############################################################
################# Scanning world: survie #################
############################################################
World info:
There are 47694 region files, 12741 player files and 618 data files in the world directory.
-------------------- Checking level.dat --------------------
'level.dat' is readable
---------------- Scanning UUID player files ----------------
Scanning: 12741 / 12741 100% [###############################################################################################################################################] Time: 00:00:09
------------- Scanning old format player files -------------
Info: No files to scan.
---------- Scanning structures and map data files ----------
Scanning: 62 / 618 10% [############## ] ETA: 00:02:38
Ops! Something went really wrong and regionfixer crashed. I can try to send an automatic bug rerpot if you wish.
Do you want to send an anonymous bug report to the region fixer ftp?
(Answering no will print the bug report) [Y/n] y
Couldn't send the bug report!
[Errno -5] No address associated with hostname
Bug report:
**********
*** Exception while scanning:
*** Stronghold_index.dat
**********
*** Printing the child's traceback:
*** Exception:<type 'exceptions.ValueError'>Unrecognised tag type
**********
*** File /home/script/minecraft/regionfix/regionfixer_core/scan.py, line 638, in scan_data
*** _ = nbt.NBTFile(filename=s.path)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 517, in __init__
*** self.parse_file()**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 544, in parse_file
*** self._parse_buffer(self.file)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 391, in _parse_buffer
*** tag = TAGLIST[type.value](buffer=buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 379, in __init__
*** self._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 395, in _parse_buffer
*** raise ValueError("Unrecognised tag type")
**********
Thanks :)
config :
World is in version 1.13.2
Python 2.7.13 (default, Sep 26 2018, 18:42:22) Linux ns3086316 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
Hello!
Are you using the last version of regionfixer? It looks like you are not using the last version of regionfixer. Could you please download master and try again? master has been update recently.
I have just added this branch: https://github.com/Fenixin/Minecraft-Region-Fixer/tree/new2to3
Could you please download it and test if it works with your world?
Hello, thank you for your quick answer, and for your update:)
the scan crashes a little later ^^'
Welcome to Region Fixer!
(version: 0.2.2)
############################################################
################# Scanning world: survie #################
############################################################
World info:
There are 47694 region files, 12741 player files and 618 data files in the world directory.
-------------------- Checking level.dat --------------------
'level.dat' is readable
---------------- Scanning UUID player files ----------------
Scanning: 12741 / 12741 100% [##################################] Time: 00:00:09
------------- Scanning old format player files -------------
Info: No files to scan.
---------- Scanning structures and map data files ----------
Scanning: 618 / 618 100% [######################################] Time: 00:00:31
------------------ Scanning region files -------------------
Scanning: 1 / 47694 0% [ ] ETA: 00:00:00
Ops! Something went really wrong and regionfixer crashed. I can try to send an a utomatic bug rerpot if you wish.
Do you want to send an anonymous bug report to the region fixer ftp?
(Answering no will print the bug report) [Y/n] n
Bug report:
**********
*** Exception while scanning:
*** r.1963.1668.mca
**********
*** Printing the child's traceback:
*** Exception:<type 'exceptions.KeyError'>'Tag Entities does not exist'
**********
*** File /home/script/minecraft/regionfix/regionfixer_core/scan.py, line 695, in scan_region_file
*** entity_limit)**********
*** File /home/script/minecraft/regionfix/regionfixer_core/scan.py, line 781, in scan_chunk
*** num_entities = len(chunk["Level"]["Entities"])**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 530, in __getitem__
*** raise KeyError("Tag %s does not exist" % key)
**********
link file region : https://clubdesbatards.fr/minecraft/r.1963.1668.mca
Could you please check that you have downloaded the correct branch? I have downloaded your region file and it works perfectly for me. The branch that should be tested is: https://github.com/Fenixin/Minecraft-Region-Fixer/tree/new2to3
Just in case here is a zip download link: https://github.com/Fenixin/Minecraft-Region-Fixer/archive/new2to3.zip
I've edited your comments to make the bug report easily readable.
I think I can't use the github site well ^^
the download link is the same:
https://github.com/Fenixin/Minecraft-Region-Fixer/tree/2to3 -> Clone or download - > https://github.com/Fenixin/Minecraft-Region-Fixer.git
https://github.com/Fenixin/Minecraft-Region-Fixer/tree/1-3-update -> Clone or download -> https://github.com/Fenixin/Minecraft-Region-Fixer.git
otherwise, I just downloaded the zip file: https://github.com/Fenixin/Minecraft-Region-Fixer/archive/new2to3.zip
at launch, I have a direct error:
root@ns3086316:/home/script/minecraft/regionfix# python regionfixer.py /home/minecraft/minecraftsurvie/survie
Traceback (most recent call last):
File "regionfixer.py", line 29, in <module>
from regionfixer_core import world
File "/home/script/minecraft/regionfix/regionfixer_core/world.py", line 26, in <module>
from .util import table
File "/home/script/minecraft/regionfix/regionfixer_core/util.py", line 27, in <module>
from . import world
ImportError: cannot import name world
Could you try to run it in python3? I'm slowly updating regionfixer to work with python3, and it seems it doesn't work with python2.
I don't know if I'm doing the right thing.
here is the list of orders:
root@ns3086316:~# python3 -V
Python 3.5.3
root@ns3086316:~# cd /home/script/minecraft/regionfix
root@ns3086316:/home/script/minecraft/regionfix# python3 regionfixer.py /home/minecraft/minecraftsurvie/survie
Welcome to Region Fixer!
(version: 0.2.2)
############################################################
################# Scanning world: survie #################
############################################################
World info:
There are 47694 region files, 12741 player files and 618 data files in the world directory.
-------------------- Checking level.dat --------------------
'level.dat' is readable
---------------- Scanning UUID player files ----------------
512 of 12741|## |ETA: 0:00:10
Ops! Something went really wrong and regionfixer crashed. I can try to send an automatic bug rerpot if you wish.
Do you want to send an anonymous bug report to the region fixer ftp?
(Answering no will print the bug report) [Y/n] n
Bug report:
**********
*** Exception while scanning:
*** 63ea34e1-7264-3f4b-a3b5-a0708ba0e232.dat
**********
*** Printing the child's traceback:
*** Exception:<class 'UnicodeDecodeError'>'utf-8' codec can't decode byte 0xed in position 87: invalid continuation byte
**********
*** File /home/script/minecraft/regionfix/regionfixer_core/scan.py, line 617, in scan_data
*** _ = nbt.NBTFile(filename=s.path)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 628, in __init__
*** self.parse_file()**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 655, in parse_file
*** self._parse_buffer(self.file)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 404, in _parse_buffer
*** self.tags.append(TAGLIST[self.tagID](buffer=buffer))**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 476, in __init__
*** self._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 404, in _parse_buffer
*** self.tags.append(TAGLIST[self.tagID](buffer=buffer))**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 345, in __init__
*** self._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 353, in _parse_buffer
*** self.value = read.decode("utf-8")
**********
Something seems seriously garbled in your NBT data structure in this file ( 63ea34e1-7264-3f4b-a3b5-a0708ba0e232.dat).
From what I see here, these is a Named List type in the NBT. Nothing special. However, when the name is read, it does not seem to be valid UTF-8 encoded. That sounds like the data structure got corrupted.
@splintermik would you consider sharing your file (in public or in private) to verify this is indeed the case?
@Fenixin What do you want the NBT library to do in a case like this? Perhaps it should raise a nbt.MalformedFileError exception instead. Perhaps the best that can be done is that the NBT library would include the data structure recovered so far in the exception object, as wel as details about the exact error (though the later is perhaps hard to implement).
PS: the uploaded r.1963.1668.mca seems fine.
NBT/examples/regionfile_analysis.py -v r.1963.1668.mca
Chunk statuses (as reported by nbt.region.RegionFile):
status -5 (Overlapping): 0 chunks
status -4 (Mismatched Lengths): 0 chunks
status -3 (Zero Length): 0 chunks
status -2 (In Header): 0 chunks
status -1 (Out Of File): 0 chunks
status 0 (Ok): 74 chunks
status 1 (Not Created): 950 chunks
1024 chunks in total
And
>>> import nbt
>>> r = nbt.region.RegionFile(filename='../../Downloads/r.1963.1668.mca')
>>> for c in r.iter_chunks():
... print(c)
...
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {17 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {11 Entries}, TAG_Int('DataVersion'): 1343}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {14 Entries}, TAG_Int('DataVersion'): 1631}
{TAG_Compound('Level'): {12 Entries}, TAG_Int('DataVersion'): 1631}
here is the file 63ea34e1-7264-3f4b-a3b5-a0708ba0e232.zip
@Fenixin What do you want the NBT library to do in a case like this? Perhaps it should raise a
nbt.MalformedFileErrorexception instead. Perhaps the best that can be done is that the NBT library would include the data structure recovered so far in the exception object, as wel as details about the exact error (though the later is perhaps hard to implement).
@macfreek, hey, I really want to thank you for all your time, you have been around here even when I could not. That said, just raising a nbt.MalformedFileError would be ideal, I don't think the second part is necessary right now. I don't know if a should take this as a corrupted chunk or a new kind of error. What's your opinion? Maybe I could add a new type of error, just in case we can fix it in some way later on.
@splintermik, thank for the file! I will try to implement a solution to this pretty soon (but I'm moving to a new place in a few days because of job)
Also, I'm not really a Minecraft player anymore. In the lasts days I have downloaded it just to create a map for testing purposes but it's really slow to create a big map. It would be great to have a big world to test regionfixer with it. Would it be possible that you send your world to me? I know is probably impossible for privacy reasons. If it is not possible, do you know where I can download a big map for testing? I'm really disconnected from the community.
if it can help to advance the problem, I would be willing to send you my map in private
@splintermik, having a big world to test minecraft is always helpful. I have a few huge ones, but they are old worlds, from old versions, and they don't have interesting issues as yours. If you want to send it to me just reach me at my email which is fenixin at gmail dot com.
There, I sent you an email! :)
@splintermik, I have added some provisional changes that should let you scan you world and see the broken dat files. Use the branch new2to3 to get the new chagnes. Please, report back if you test it.
Hi, thanks a lot for the update:)
I just tested it, here's the report:
Welcome to Region Fixer!
(version: 0.2.2)
############################################################
################# Scanning world: survie #################
############################################################
World info:
There are 62492 region files, 12937 player files and 1048 data files in the worl d directory.
-------------------- Checking level.dat --------------------
'level.dat' is readable
---------------- Scanning UUID player files ----------------
12937 of 12937|###################################################|Time: 0:00:11
------------- Scanning old format player files -------------
Info: No files to scan.
---------- Scanning structures and map data files ----------
1048 of 1048|##################################################################################################################################################################|Time: 0:00:29
------------------ Scanning region files -------------------
3730 of 62492|######### |ETA: 2:26:27
Ops! Something went really wrong and regionfixer crashed. I can try to send an automatic bug rerpot if you wish.
Bug report:
**********
*** Exception while scanning:
*** r.1881.2212.mca
**********
*** Printing the child's traceback:
*** Exception:<class 'UnicodeDecodeError'>'utf-8' codec can't decode byte 0xed in position 87: invalid continuation byte
**********
*** File /home/script/minecraft/regionfix/regionfixer_core/scan.py, line 681, in scan_region_file
*** entity_limit)**********
*** File /home/script/minecraft/regionfix/regionfixer_core/scan.py, line 782, in scan_chunk
*** chunk = region_file.get_chunk(*coords)**********
*** File /home/script/minecraft/regionfix/nbt/region.py, line 599, in get_chunk
*** return self.get_nbt(x, z)**********
*** File /home/script/minecraft/regionfix/nbt/region.py, line 578, in get_nbt
*** nbt = NBTFile(buffer=data)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 628, in __init__
*** self.parse_file()**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 655, in parse_file
*** self._parse_buffer(self.file)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 404, in _parse_buffer
*** self.tags.append(TAGLIST[self.tagID](buffer=buffer))**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 476, in __init__
*** self._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 404, in _parse_buffer
*** self.tags.append(TAGLIST[self.tagID](buffer=buffer))**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 476, in __init__
*** self._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 493, in _parse_buffer
*** tag._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 404, in _parse_buffer
*** self.tags.append(TAGLIST[self.tagID](buffer=buffer))**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 345, in __init__
*** self._parse_buffer(buffer)**********
*** File /home/script/minecraft/regionfix/nbt/nbt.py, line 353, in _parse_buffer
*** self.value = read.decode("utf-8")
**********
```
@splintermik, thanks for the testing it and sorry for the new problem. I have provisionally added those exceptions to the list of corrupted chunks (before this I added them only to data file scanning). So, I hope that next time you scan your world regionfixer should detect those chunks as corrupted and you will be able to delete them or replace them with a backup. Please, if you try it let me know.
hi
thanks for the update, the scan worked perfectly
so it seems I have some corrupt chunks ^^
Welcome to Region Fixer!
(version: 0.2.2)
############################################################
################# Scanning world: survie #################
############################################################
World info:
There are 62492 region files, 12937 player files and 1048 data files in the worl d directory.
-------------------- Checking level.dat --------------------
'level.dat' is readable
---------------- Scanning UUID player files ----------------
12937 of 12937|######################################################################################################################################################
------------- Scanning old format player files -------------
Info: No files to scan.
---------- Scanning structures and map data files ----------
1048 of 1048|########################################################################################################################################################
------------------ Scanning region files -------------------
62492 of 62492|########################################################################################################################################|Time: 2:40:21
############################################################
################# Scan results for: survie #################
############################################################
Unreadable player files:
63ea34e1-7264-3f4b-a3b5-a0708ba0e232.dat
Unreadable data files:
idcounts.dat
map_417.dat
map_421.dat
map_415.dat
map_424.dat
map_718.dat
map_418.dat
map_420.dat
map_716.dat
map_423.dat
map_416.dat
map_426.dat
map_425.dat
map_422.dat
map_419.dat
Chunk problems:
--------------------------------------------------------------------------------------
| Problem | Corrupted Wrong located Sharing offset Missing Entities tag Total |
--------------------------------------------------------------------------------------
| Count | 69 54 42 3293 12230818 |
--------------------------------------------------------------------------------------
Region problems:
No problems found.
@splintermik, thanks a lot for your continued support.
I'm going to leave this open to remind myself what happened and what to add if nbt gets updated eventually.