papyrus-mc / papyruscs

PapyrusCS renders maps of Minecraft: Bedrock Edition worlds using C#, LevelDB and leaflet.
Apache License 2.0
257 stars 42 forks source link

World file corruption... System.AggregateException ... (encountered a block compressed with an unknown decompressor) #68

Open rawdr opened 4 years ago

rawdr commented 4 years ago

I tried running this program today on my 1.16.100 Bedrock world, running official bedrock dedicated server on Ubuntu 20.04.1 x64. I did not backup my world save, and I left the dedicated server running.... I figured the program would only be READING from the world save and couldn't cause any corruption in the source files. I was wrong. Papyrus ended with the errors shown in the log pasted below. I stopped the server software and restarted it and it gave the following error:

[WARN] LevelDB worlds/SMP/db status NOT OK(Corruption: 37 missing files; e.g.: worlds/SMP/db/079110.ldb). Trying repair.

Upon logging in, my character has no inventory and large chunks of the land and our builds are missing. My last backup is a month old unfortunately and we are missing a lot of work now. Does anyone know if there is a better way to fix the corruption to get back to a more recent state?

./PapyrusCs --world "/opt/bedrock-server/worlds/SMP/db" --output html/ Opening world... Generating a list of all chunk keys in the database. This could take a few minutes Total Chunk count 59003

The total dimensions of the map are X: -292 to 279 Z: -178 to 782

Tilesize is 512x512 Reading terrain_texture.json...

The maximum diameter of the map is 961 For 2 chunks per tile, new max diameter is 481 To generate the zoom levels, we expand the diameter to 512 This results in 10 zoom levels Found 0 subchunks which are already rendered Grouping subchunks... 59003 Grouped by 2 to 17488 tiles Average of 3.4 chunks per tile 3621 of 59003 Chunks render @ 10.7 cps Queue Stat: GetData 0 Render 0 Save 0 Db 0 6984 of 59003 Chunks render @ 10.3 cps Queue Stat: GetData 0 Render 21 Save 23 Db 0 10602 of 59003 Chunks render @ 9.8 cps Queue Stat: GetData 0 Render 0 Save 25 Db 0 13837 of 59003 Chunks render @ 9.2 cps Queue Stat: GetData 0 Render 20 Save 0 Db 0 14355 of 59003 Chunks render @ 9.2 cps Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Queue Stat: GetData 0 Render 0 Save 9 Db 0

Post complete

Queue Stat: GetData 0 Render 0 Save 0 Db 0

Queue Stat: GetData 0 Render 0 Save 0 Db 0

Queue Stat: GetData 0 Render 0 Save 0 Db 0 Unhandled exception. System.AggregateException: One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (Not implemented: encountered a block compressed with an unknown decompressor))))) ---> System.AggregateException: One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (Not implemented: encountered a block compressed with an unknown decompressor)))) ---> System.AggregateException: One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (Not implemented: encountered a block compressed with an unknown decompressor))) ---> System.AggregateException: One or more errors occurred. (One or more errors occurred. (Not implemented: encountered a block compressed with an unknown decompressor)) ---> System.AggregateException: One or more errors occurred. (Not implemented: encountered a block compressed with an unknown decompressor) ---> System.ApplicationException: Not implemented: encountered a block compressed with an unknown decompressor at leveldb_sharp_std.Native.CheckError(String error) in C:\projects\papyruscs-19426\leveldb-sharp-std\Native.cs:line 52 at leveldb_sharp_std.Native.leveldb_get(IntPtr db, IntPtr readOptions, Byte[] key, UIntPtr& valueLength) in C:\projects\papyruscs-19426\leveldb-sharp-std\Native.cs:line 216 at leveldb_sharp_std.DB.Get(ReadOptions options, Byte[] key, UIntPtr& length) in C:\projects\papyruscs-19426\leveldb-sharp-std\DB.cs:line 193 at leveldb_sharp_std.DB.Get(Byte[] key, UIntPtr& length) in C:\projects\papyruscs-19426\leveldb-sharp-std\DB.cs:line 198 at Maploader.World.World.GetChunkData(GroupedChunkSubKeys groupedChunkSubKeys) in C:\projects\papyruscs-19426\Maploader\World\World.cs:line 515 at PapyrusAlgorithms.Strategies.Dataflow.GetDataBlock.<>c__DisplayClass3_0.<.ctor>b0(IEnumerable1 groupedChunkSubKeys) in C:\projects\papyruscs-19426\PapyrusAlgorithms\Strategies\Dataflow\GetDataBlock.cs:line 24 at System.Threading.Tasks.Dataflow.TransformManyBlock2.ProcessMessage(Func2 transformFunction, KeyValuePair2 messageWithId) at System.Threading.Tasks.Dataflow.Internal.TargetCore1.ProcessMessagesLoopCore() --- End of inner exception stack trace --- --- End of inner exception stack trace --- --- End of inner exception stack trace --- --- End of inner exception stack trace --- --- End of inner exception stack trace --- at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout) at PapyrusAlgorithms.Strategies.Dataflow.DataFlowStrategy1.RenderInitialLevel() in C:\projects\papyruscs-19426\PapyrusAlgorithms\Strategies\Dataflow\DataFlowStrategy.cs:line 193 at PapyrusCs.Program.RunMapCommand(Options options) in C:\projects\papyruscs-19426\PapyrusCs\Program.cs:line 234 at PapyrusCs.Program.<>c.

b4_0(Options opts) in C:\projects\papyruscs-19426\PapyrusCs\Program.cs:line 45 at CommandLine.ParserResultExtensions.MapResult[T1,T2,T3,TResult](ParserResult1 result, Func2 parsedFunc1, Func2 parsedFunc2, Func2 parsedFunc3, Func`2 notParsedFunc) at PapyrusCs.Program.Main(String[] args) in C:\projects\papyruscs-19426\PapyrusCs\Program.cs:line 40 Aborted (core dumped)

bennydiamond commented 4 years ago

Never, ever run PapyrusCs on live world db files. Generate an offline copy and run PapyrusCs on it.

Vellum is the perfect tool to automate this process.

Rezer commented 3 years ago

LevelDB is the database used for storing minecraft data, and it only supports a single process interacting with the database by design. Even read only operations frequently end up compacting the database, and if minecraft is running when that happens you'll wind up with exactly what you describe. This isn't a bug per se, but it should be in big flashing letters on the main page.

zoltan-kecskemethy-epam commented 3 years ago

This has happened with my world as well. Forgot to stop the server when started papyruscs which resulted immediate corruption :( 

I have about a week old backup... learnt a painful lesson again to have more frequent backups ...

Thank you for above information.