Fenixin/Minecraft-Region-Fixer

Crash

Closed this issue · 9 comments

Hello,
I just tried to fix my world, and it crashed :(

Config:
World is in version 1.12.2
Python 3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)] on win64

Welcome to Region Fixer!
(v 0.3.5)

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

World info:
- 1922 region/level files,
 - 0 POI files,
 - 0 entities files,
 - 11 player files,
 - and 28 data files.

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

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

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

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

--------- Scanning region, POI and entities files ----------
1922 of 1922|####################################################|Time: 0:14:26


############################################################
################# Scan results for: world ##################
############################################################


Unreadable player files:
No problems found.

Unreadable data files:
idcounts.dat

Chunk problems:

| Problem | Corrupted |  Wrong located  |⠀ Total  ⠀|

|  Count   |⠀⠀⠀⠀1⠀⠀⠀⠀|⠀⠀⠀⠀⠀36 ⠀⠀⠀⠀  | 1712760  |



-----------------------------------------------

Region problems:
No problems found.


######### Repairing chunks with status: Corrupted ##########
Repairing chunks in regionset "Level/Region files for Overworld":


Ops! Something went really wrong and regionfixer crashed.


Bug report:

<class 'TypeError'>
Traceback (most recent call last):
  File "C:\Users\sasha sasha\Desktop\Minecraft-Region-Fixer-master\regionfixer_core\world.py", line 375, in 
fix_problematic_chunks
    chunk = region_file.get_chunk(*local_coords)
  File "C:\Users\sasha sasha\Desktop\Minecraft-Region-Fixer-master\nbt\region.py", line 622, in get_chunk
    return self.get_nbt(x, z)
  File "C:\Users\sasha sasha\Desktop\Minecraft-Region-Fixer-master\nbt\region.py", line 597, in get_nbt
    data = self.get_blockdata(x, z) # This may raise a RegionFileFormatError.
  File "C:\Users\sasha sasha\Desktop\Minecraft-Region-Fixer-master\nbt\region.py", line 589, in get_blockdata
    raise ChunkDataError(err)
nbt.region.ChunkDataError: Error -5 while decompressing data: incomplete or truncated stream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\sasha sasha\Desktop\Minecraft-Region-Fixer-master\regionfixer.py", line 588, in <module>
    value = main()
  File "C:\Users\sasha sasha\Desktop\Minecraft-Region-Fixer-master\regionfixer.py", line 548, in main
    fix_bad_chunks(args, w)
  File "C:\Users\sasha sasha\Desktop\Minecraft-Region-Fixer-master\regionfixer.py", line 71, in fix_bad_chunks
    counter = scanned_obj.fix_problematic_chunks(problem)
  File "C:\Users\sasha sasha\Desktop\Minecraft-Region-Fixer-master\regionfixer_core\world.py", line 1451, in fix_problematic_chunks
    counter += regionset.fix_problematic_chunks(status)

 File "C:\Users\sasha sasha\Desktop\Minecraft-Region-Fixer-master\regionfixer_core\world.py", line 971, in fix_problematic_chunks
    counter += self._set[r].fix_problematic_chunks(status)
  File "C:\Users\sasha sasha\Desktop\Minecraft-Region-Fixer-master\regionfixer_core\world.py", line 392, in fix_problematic_chunks
    out += dc.decompress(i)
TypeError: a bytes-like object is required, not 'int'



Hello!

Yep, something wrong there. I'm not sure when I'm going to have time to look at this, so please, try to survive not fixing the chunks.

Could you send me the file that causes this so I can try to reproduce it?

I got the same problem. Did you receive the file yet? Otherwise I can send
https://mega.nz/file/Eh5wgLIB#MYhmBCKATiG7OzLC0wZbz7U00tMkuQyzmVbsf7yJJIw

I got the same problem. Did you receive the file yet? Otherwise I can send https://mega.nz/file/Eh5wgLIB#MYhmBCKATiG7OzLC0wZbz7U00tMkuQyzmVbsf7yJJIw

Thank you!

Just downloaded it. I will give it a look, some day. The only thing I need now is some time...

No worries. I already used your script do delete the corrupt chunk instead of trying to fix the chunk.
My server is finally able to run again after a long long time. Very much thanks.

No worries. I already used your script do delete the corrupt chunk instead of trying to fix the chunk. My server is finally able to run again after a long long time. Very much thanks.

Thank you! It means a lot!

Sorry, forgot to check this issue. I can send the file if it can help

Sorry, forgot to check this issue. I can send the file if it can help

It always helps to have test worlds when trying to fix something. You can sent it through here or be PM.

Thanks!

Sorry, forgot to check this issue. I can send the file if it can help

It always helps to have test worlds when trying to fix something. You can sent it through here or be PM.

Thanks!
Here is my level.dat file:
https://drive.google.com/file/d/1e1VXD0vwty8NW05IXj_AubyJJYEo2oAI/view?usp=sharing

Downloaded! Thanks again.