Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World loading issue: not aligned/invalid sector #995

Open
aramperes opened this issue Dec 28, 2018 · 7 comments
Open

World loading issue: not aligned/invalid sector #995

aramperes opened this issue Dec 28, 2018 · 7 comments

Comments

@aramperes
Copy link
Member

aramperes commented Dec 28, 2018

Could be related to #965

After generating a world with Glowstone (latest build), stopping the server, and starting it again, a lot of chunk load errors appear:

23:44:50 [INFO] Preparing spawn for world...
23:44:50 [WARNING] Region "worlds\world\region\r.-1.-1.mca" not aligned: 9283814 increasing by 1818
23:44:50 [WARNING] Region "worlds\world\region\r.-1.0.mca" not aligned: 4750926 increasing by 434
23:44:51 [INFO] Preparing spawn for world: 67%
23:44:51 [WARNING] Region "worlds\world\region\r.0.-1.mca" not aligned: 5384225 increasing by 2015
23:44:51 [WARNING] Region "worlds\world\region\r.0.0.mca" not aligned: 2241954 increasing by 2654
23:44:51 [WARNING] Region "worlds\world\region\r.0.0.mca": offsets[363] = 139268 -> 544,4 does not fit
23:44:51 [INFO] Preparing spawn for world: done
23:44:51 [INFO] Preparing spawn for world_nether...
23:44:51 [WARNING] Region "worlds\world_nether\region\r.-1.-1.mca" not aligned: 2656143 increasing by 2161
23:44:51 [WARNING] Region "worlds\world_nether\region\r.-1.-1.mca": offsets[567] = 164869 -> 644,5 does not fit
23:44:51 [SEVERE] Error while loading chunk (-9,-15)
java.io.IOException: Invalid sector: 644+5 > 648
        at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:243)
        at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:61)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:150)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:138)
        at net.glowstone.chunk.ChunkManager.populateChunk(ChunkManager.java:219)
        at net.glowstone.chunk.ChunkManager.forcePopulation(ChunkManager.java:252)
        at net.glowstone.GlowWorld.prepareSpawn(GlowWorld.java:952)
        at net.glowstone.GlowWorld.setKeepSpawnInMemory(GlowWorld.java:924)
        at net.glowstone.GlowWorld.<init>(GlowWorld.java:439)
        at net.glowstone.GlowServer.createWorld(GlowServer.java:2296)
        at net.glowstone.GlowServer.start(GlowServer.java:811)
        at net.glowstone.GlowServer.run(GlowServer.java:633)
        at net.glowstone.GlowServer.main(GlowServer.java:497)
23:44:51 [WARNING] Region "worlds\world_nether\region\r.-1.0.mca" not aligned: 1357414 increasing by 2458
23:44:51 [WARNING] Region "worlds\world_nether\region\r.-1.0.mca": offsets[23] = 83717 -> 327,5 does not fit
23:44:51 [SEVERE] Error while loading chunk (-9,0)
java.io.IOException: Invalid sector: 327+5 > 331
        at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:243)
        at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:61)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:150)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:138)
        at net.glowstone.chunk.ChunkManager.populateChunk(ChunkManager.java:219)
        at net.glowstone.chunk.ChunkManager.forcePopulation(ChunkManager.java:252)
        at net.glowstone.GlowWorld.prepareSpawn(GlowWorld.java:952)
        at net.glowstone.GlowWorld.setKeepSpawnInMemory(GlowWorld.java:924)
        at net.glowstone.GlowWorld.<init>(GlowWorld.java:439)
        at net.glowstone.GlowServer.createWorld(GlowServer.java:2296)
        at net.glowstone.GlowServer.start(GlowServer.java:811)
        at net.glowstone.GlowServer.run(GlowServer.java:633)
        at net.glowstone.GlowServer.main(GlowServer.java:497)
23:44:52 [WARNING] Region "worlds\world_nether\region\r.0.-1.mca" not aligned: 4073080 increasing by 2440
23:44:52 [WARNING] Region "worlds\world_nether\region\r.0.-1.mca": offsets[1005] = 253445 -> 990,5 does not fit
23:44:52 [WARNING] Region "worlds\world_nether\region\r.0.0.mca" not aligned: 2292081 increasing by 1679
23:44:52 [INFO] Preparing spawn for world_nether: 85%
23:44:52 [SEVERE] Error while loading chunk (13,-1)
java.io.IOException: Invalid sector: 990+5 > 994
        at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:243)
        at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:61)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:150)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:138)
        at net.glowstone.chunk.ChunkManager.populateChunk(ChunkManager.java:219)
        at net.glowstone.chunk.ChunkManager.forcePopulation(ChunkManager.java:252)
        at net.glowstone.GlowWorld.prepareSpawn(GlowWorld.java:952)
        at net.glowstone.GlowWorld.setKeepSpawnInMemory(GlowWorld.java:924)
        at net.glowstone.GlowWorld.<init>(GlowWorld.java:439)
        at net.glowstone.GlowServer.createWorld(GlowServer.java:2296)
        at net.glowstone.GlowServer.start(GlowServer.java:811)
        at net.glowstone.GlowServer.run(GlowServer.java:633)
        at net.glowstone.GlowServer.main(GlowServer.java:497)
23:44:52 [INFO] Preparing spawn for world_nether: done
23:44:52 [INFO] Preparing spawn for world_the_end...
23:44:52 [WARNING] Region "worlds\world_the_end\region\r.-1.-1.mca" not aligned: 405873 increasing by 3727
23:44:52 [WARNING] Region "worlds\world_the_end\region\r.-1.-1.mca": offsets[732] = 25345 -> 99,1 does not fit
23:44:52 [SEVERE] Error while loading chunk (-4,-10)
java.io.IOException: Invalid sector: 99+1 > 99
        at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:243)
        at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:61)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:150)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:138)
        at net.glowstone.chunk.ChunkManager.populateChunk(ChunkManager.java:219)
        at net.glowstone.chunk.ChunkManager.forcePopulation(ChunkManager.java:252)
        at net.glowstone.GlowWorld.prepareSpawn(GlowWorld.java:952)
        at net.glowstone.GlowWorld.setKeepSpawnInMemory(GlowWorld.java:924)
        at net.glowstone.GlowWorld.<init>(GlowWorld.java:439)
        at net.glowstone.GlowServer.createWorld(GlowServer.java:2296)
        at net.glowstone.GlowServer.start(GlowServer.java:819)
        at net.glowstone.GlowServer.run(GlowServer.java:633)
        at net.glowstone.GlowServer.main(GlowServer.java:497)
23:44:52 [WARNING] Region "worlds\world_the_end\region\r.-1.0.mca" not aligned: 434942 increasing by 3330
23:44:52 [WARNING] Region "worlds\world_the_end\region\r.-1.0.mca": offsets[28] = 26372 -> 103,4 does not fit
23:44:52 [SEVERE] Error while loading chunk (-4,0)
java.io.IOException: Invalid sector: 103+4 > 106
        at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:243)
        at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:61)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:150)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:138)
        at net.glowstone.chunk.ChunkManager.populateChunk(ChunkManager.java:219)
        at net.glowstone.chunk.ChunkManager.forcePopulation(ChunkManager.java:252)
        at net.glowstone.GlowWorld.prepareSpawn(GlowWorld.java:952)
        at net.glowstone.GlowWorld.setKeepSpawnInMemory(GlowWorld.java:924)
        at net.glowstone.GlowWorld.<init>(GlowWorld.java:439)
        at net.glowstone.GlowServer.createWorld(GlowServer.java:2296)
        at net.glowstone.GlowServer.start(GlowServer.java:819)
        at net.glowstone.GlowServer.run(GlowServer.java:633)
        at net.glowstone.GlowServer.main(GlowServer.java:497)
23:44:52 [WARNING] Region "worlds\world_the_end\region\r.0.-1.mca" not aligned: 1134957 increasing by 3731
23:44:52 [WARNING] Region "worlds\world_the_end\region\r.0.-1.mca": offsets[1010] = 70913 -> 277,1 does not fit
23:44:52 [WARNING] Region "worlds\world_the_end\region\r.0.0.mca" not aligned: 1364329 increasing by 3735
23:44:52 [WARNING] Region "worlds\world_the_end\region\r.0.0.mca": offsets[402] = 85249 -> 333,1 does not fit
23:44:52 [SEVERE] Error while loading chunk (-1,8)
java.io.IOException: Invalid length: 7643 > 4096
        at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:250)
        at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:61)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:150)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:138)
        at net.glowstone.chunk.ChunkManager.populateChunk(ChunkManager.java:219)
        at net.glowstone.chunk.ChunkManager.forcePopulation(ChunkManager.java:252)
        at net.glowstone.GlowWorld.prepareSpawn(GlowWorld.java:952)
        at net.glowstone.GlowWorld.setKeepSpawnInMemory(GlowWorld.java:924)
        at net.glowstone.GlowWorld.<init>(GlowWorld.java:439)
        at net.glowstone.GlowServer.createWorld(GlowServer.java:2296)
        at net.glowstone.GlowServer.start(GlowServer.java:819)
        at net.glowstone.GlowServer.run(GlowServer.java:633)
        at net.glowstone.GlowServer.main(GlowServer.java:497)
23:44:52 [SEVERE] Error while loading chunk (-1,9)

[ Truncated ]


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@aramperes
Copy link
Member Author

Confirmed fix is to revert change from #965. Perhaps the fix was only partial? @astei

@astei
Copy link
Contributor

astei commented Dec 28, 2018

Yeah, it's not calculating the run-length correctly. I do have a fix, though. I'll get that soon.

@astei
Copy link
Contributor

astei commented Dec 28, 2018

Working on this still. It seems that there were multiple causes of problems, each of which I'm now working through.

@astei
Copy link
Contributor

astei commented Dec 28, 2018

I have most of this resolved - the only thing that's not quite working is reading from the ends of region files.

@niansa
Copy link

niansa commented Dec 28, 2018

I have the same issue. :(

@aramperes
Copy link
Member Author

Possibly fixed by #997, could someone confirm?

@aramperes
Copy link
Member Author

Confirmed that it still happens on the latest dev (same steps as the OP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants