PorkStudios / FarPlaneTwo

Level-of-Detail renderer in Minecraft. Allows for render distances of millions of blocks. (Cubic Chunks-compatible) (WIP)
https://daporkchop.net/
Other
1.45k stars 48 forks source link

Crash when loading world with non-ASCII characters in name #32

Closed dldev32 closed 3 years ago

dldev32 commented 3 years ago
java.lang.RuntimeException: org.rocksdb.RocksDBException: Failed to create a directory: C:\Users\dldev\AppData\Roaming\.minecraft\saves\New World\fp2\voxel: Ñèñòåìå íå óäàåòñÿ íàéòè óêàçàííûé ïóòü.

    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:189)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.optifine.reflect.Reflector.call(Reflector.java:976)
    at net.optifine.reflect.Reflector.postForgeBusEvent(Reflector.java:1251)
    at net.optifine.reflect.Reflector.postForgeBusEvent(Reflector.java:1237)
    at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:151)
    at net.minecraft.server.integrated.IntegratedServer.init(IntegratedServer.java:233)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.rocksdb.RocksDBException: Failed to create a directory: C:\Users\dldev\AppData\Roaming\.minecraft\saves\New World\fp2\voxel: Ñèñòåìå íå óäàåòñÿ íàéòè óêàçàííûé ïóòü.

    at org.rocksdb.TransactionDB.open(Native Method)
    at org.rocksdb.TransactionDB.open(TransactionDB.java:90)
    at net.daporkchop.fp2.mode.common.server.storage.rocksdb.RocksStorage.<init>(RocksStorage.java:156)
    at net.daporkchop.fp2.mode.common.server.AbstractFarWorld.<init>(AbstractFarWorld.java:107)
    at net.daporkchop.fp2.mode.voxel.server.VoxelWorld.<init>(VoxelWorld.java:40)
    at net.daporkchop.fp2.mode.voxel.server.VoxelWorld$Vanilla.<init>(VoxelWorld.java:63)
    at net.daporkchop.fp2.mode.voxel.ctx.VoxelServerContext.world0(VoxelServerContext.java:44)
    at net.daporkchop.fp2.mode.common.ctx.AbstractFarServerContext.<init>(AbstractFarServerContext.java:47)
    at net.daporkchop.fp2.mode.voxel.ctx.VoxelServerContext.<init>(VoxelServerContext.java:39)
    at net.daporkchop.fp2.mode.voxel.VoxelRenderMode.serverContext(VoxelRenderMode.java:79)
    at net.minecraft.world.WorldServer.md191df9$lambda$fp2_init$0$0(WorldServer.java:1499)
    at com.google.common.collect.RegularImmutableBiMap.forEach(RegularImmutableBiMap.java:153)
    at net.daporkchop.fp2.util.registry.ImmutableOrderedRegistry.forEachEntry(ImmutableOrderedRegistry.java:109)
    at net.minecraft.world.WorldServer.fp2_init(WorldServer.java:1499)
    at net.daporkchop.fp2.server.ServerEvents.worldLoad(ServerEvents.java:68)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_60_ServerEvents_worldLoad_Load.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    ... 11 more
DaMatrix commented 3 years ago

uhhh... what?

what the heck is Ñèñòåìå íå óäàåòñÿ íàéòè óêàçàííûé ïóòü supposed to mean?

newbthenewbd commented 3 years ago

To the surprise of the intrigued myself, it turned out to be neither Vietnamese nor Finnish, but apparently Russian with a broken encoding(?), meaning The system cannot find the specified path.

SakuraWuhen commented 3 years ago

crash-2021-05-21_23.33.22-server.txt I also encountered the same problem, even if I use the original client, I still get this error when building the world We are using the Chinese context, which shows garbled Chinese characters.

Then we tried to change the name of the world from Chinese to English to ensure that the entire path is completely in English, and the world can be created smoothly.

Come to a solution: the entire path must be in English

DaMatrix commented 3 years ago

alright, i'll have a look.

idea: maybe rocksdb doesn't support non-ascii chars in the file name.

DaMatrix commented 3 years ago

update: i've confirmed that rocksdb does not like non-ascii filenames. it was actually already fixed in this pull request, but requires that rocksdb be compiled with the WITH_WINDOWS_UTF8_FILENAMES option enabled. apparently the official rocksdb java bindings don't have that, so it looks like i'll have to compile a custom rocksdb jar for this.

yavincl commented 3 years ago

same

Nqndi commented 3 years ago

yep, same here using Hungarian characters(á, é, ó, ő)

DaMatrix commented 3 years ago

@Prophet2002 @SakuraWuhen @yagoplx @Nqndi could you test this again using FarPlaneTwo 0.0.1.419-1.12.2? note that you'll also need to update to ForgeRocks 6.20.3-1.12.2.

DaMatrix commented 3 years ago

has anybody who was able to reproduce this previously been able to reproduce it on recent versions?

Nqndi commented 3 years ago

Well I can't test it since I got a new pc with a windows username that doesn't have á in it.

DaMatrix commented 3 years ago

closing as this was presumably fixed by the ForgeRocks update a while back, and nobody else has had the same problem since. will re-open if needed.