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

Chunk unknown version #199

Closed
Paulomart opened this Issue Feb 13, 2016 · 17 comments

Comments

Projects
7 participants
@Paulomart
Member

Paulomart commented Feb 13, 2016

2016/02/13 19:57:07 [SCHWERWIEGEND] Error while loading chunk (-16,8)
java.io.IOException: Unknown version: 0
    at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:211)
    at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:62)
    at net.glowstone.ChunkManager.loadChunk(ChunkManager.java:132)
    at net.glowstone.GlowChunk.load(GlowChunk.java:265)
    at net.glowstone.GlowChunk.load(GlowChunk.java:260)
    at net.glowstone.GlowChunk.getSection(GlowChunk.java:359)
    at net.glowstone.GlowChunk.getType(GlowChunk.java:394)
    at net.glowstone.block.GlowBlock.getTypeId(GlowBlock.java:195)
    at net.glowstone.block.GlowBlock.getType(GlowBlock.java:190)
    at net.glowstone.block.blocktype.BlockLiquid.calculateTarget(BlockLiquid.java:114)
    at net.glowstone.block.blocktype.BlockLiquid.calculateFlow(BlockLiquid.java:95)
    at net.glowstone.block.blocktype.BlockLiquid.updatePhysics(BlockLiquid.java:201)
    at net.glowstone.block.blocktype.BlockLiquid.receivePulse(BlockLiquid.java:67)
    at net.glowstone.GlowWorld.pulseTickMap(GlowWorld.java:1797)
    at net.glowstone.GlowWorld.pulse(GlowWorld.java:382)
    at net.glowstone.scheduler.WorldScheduler$WorldThread.run(WorldScheduler.java:52)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

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

@Paulomart

This comment has been minimized.

Member

Paulomart commented Feb 15, 2016

Could this happen, because the world was generated using a Spigot server?

@Paulomart

This comment has been minimized.

Member

Paulomart commented Feb 15, 2016

Getting this one too:

2016/02/15 19:51:57 [SCHWERWIEGEND] Error while loading chunk (7,-6)
java.io.IOException: Invalid length: 104495105 > 4096
    at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:197)
    at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:62)
    at net.glowstone.ChunkManager.loadChunk(ChunkManager.java:132)
    at net.glowstone.GlowChunk.load(GlowChunk.java:265)
    at net.glowstone.GlowChunk.load(GlowChunk.java:260)
    at net.glowstone.GlowChunk.getSection(GlowChunk.java:359)
    at net.glowstone.GlowChunk.getType(GlowChunk.java:394)
    at net.glowstone.block.GlowBlock.getTypeId(GlowBlock.java:195)
    at net.glowstone.block.GlowBlock.getType(GlowBlock.java:190)
    at net.glowstone.block.blocktype.BlockLiquid.calculateTarget(BlockLiquid.java:114)
    at net.glowstone.block.blocktype.BlockLiquid.calculateFlow(BlockLiquid.java:95)
    at net.glowstone.block.blocktype.BlockLiquid.updatePhysics(BlockLiquid.java:201)
    at net.glowstone.block.blocktype.BlockLiquid.receivePulse(BlockLiquid.java:67)
    at net.glowstone.GlowWorld.pulseTickMap(GlowWorld.java:1797)
    at net.glowstone.GlowWorld.pulse(GlowWorld.java:382)
    at net.glowstone.scheduler.WorldScheduler$WorldThread.run(WorldScheduler.java:52)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

or


2016/02/15 20:01:57 [SCHWERWIEGEND] Error while loading chunk (7,-9)
java.io.IOException: Unknown version: -62
    at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:211)
    at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:62)
    at net.glowstone.ChunkManager.loadChunk(ChunkManager.java:132)
    at net.glowstone.GlowChunk.load(GlowChunk.java:265)
    at net.glowstone.GlowChunk.load(GlowChunk.java:260)
    at net.glowstone.GlowChunk.getSection(GlowChunk.java:359)
    at net.glowstone.GlowChunk.getType(GlowChunk.java:394)
    at net.glowstone.block.GlowBlock.getTypeId(GlowBlock.java:195)
    at net.glowstone.block.GlowBlock.getType(GlowBlock.java:190)
    at net.glowstone.block.blocktype.BlockLiquid.calculateTarget(BlockLiquid.java:114)
    at net.glowstone.block.blocktype.BlockLiquid.calculateFlow(BlockLiquid.java:95)
    at net.glowstone.block.blocktype.BlockLiquid.updatePhysics(BlockLiquid.java:201)
    at net.glowstone.block.blocktype.BlockLiquid.receivePulse(BlockLiquid.java:67)
    at net.glowstone.GlowWorld.pulseTickMap(GlowWorld.java:1797)
    at net.glowstone.GlowWorld.pulse(GlowWorld.java:382)
    at net.glowstone.scheduler.WorldScheduler$WorldThread.run(WorldScheduler.java:52)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

@mastercoms

This comment has been minimized.

Member

mastercoms commented Feb 15, 2016

I have gotten these errors with Glowstone++ generated worlds.

@Paulomart

This comment has been minimized.

Member

Paulomart commented Feb 15, 2016

hmm, first guess, looking at the code would be, that the file pointer is not at the right position when reading

@mastercoms

This comment has been minimized.

Member

mastercoms commented Feb 15, 2016

Duplicate of #184. But I will close that one and move the info over here because this one is more detailed.

@mastercoms

This comment has been minimized.

Member

mastercoms commented Feb 15, 2016

originally authored by LuxusDarkangel:

You can see 3 different errors in console regarding terrain/chunk load:
http://pastebin.com/p94Wd35g

@mastercoms

This comment has been minimized.

Member

mastercoms commented Mar 7, 2016

I believe I fixed this. Are you seeing this error anymore?

@mastercoms

This comment has been minimized.

Member

mastercoms commented Mar 12, 2016

Closing this as I haven't been seeing this bug recently when I had been before. (and bug reporter seems to be inactive 😦)

@mastercoms mastercoms closed this Mar 12, 2016

@DX94

This comment has been minimized.

DX94 commented May 3, 2016

could you please reopen this, im having kind of the same issue
java.io.IOException: Invalid length: 2013392284 > 4096 at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:196) at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:63) at net.glowstone.ChunkManager.loadChunk(ChunkManager.java:152) at net.glowstone.ChunkManager.populateChunk(ChunkManager.java:219) at net.glowstone.ChunkManager.forcePopulation(ChunkManager.java:252) at net.glowstone.GlowWorld.setKeepSpawnInMemory(GlowWorld.java:747) at net.glowstone.GlowWorld.<init>(GlowWorld.java:308) at net.glowstone.GlowServer.createWorld(GlowServer.java:1510) at net.glowstone.GlowServer.start(GlowServer.java:509) at net.glowstone.GlowServer.run(GlowServer.java:442) at net.glowstone.GlowServer.main(GlowServer.java:299)

@gdude2002

This comment has been minimized.

Member

gdude2002 commented May 3, 2016

What version of Glowstone++ are you using?

@gdude2002 gdude2002 reopened this May 3, 2016

@gdude2002

This comment has been minimized.

Member

gdude2002 commented May 6, 2016

There's been no discussion or response on this in four days, so I'm closing again. Please open another ticket if you're prepared to maintain it.

Not that this ticket had anything to do with your issue, though.

@gdude2002 gdude2002 closed this May 6, 2016

@Xatarch

This comment has been minimized.

Xatarch commented Jul 24, 2016

[SEVERE] Error while loading chunk (11,-55)
java.io.IOException: Unknown version: 0
    at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:210)
    at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:63)
    at net.glowstone.ChunkManager.loadChunk(ChunkManager.java:147)
    at net.glowstone.GlowChunk.load(GlowChunk.java:188)
    at net.glowstone.generator.populators.StructurePopulator.populate(StructurePopulator.java:36)
    at net.glowstone.ChunkManager.populateChunk(ChunkManager.java:232)
    at net.glowstone.ChunkManager.forcePopulation(ChunkManager.java:247)
    at net.glowstone.entity.GlowPlayer.streamBlocks(GlowPlayer.java:695)
    at net.glowstone.entity.GlowPlayer.pulse(GlowPlayer.java:560)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
    at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
    at java.util.LinkedList$LLSpliterator.forEachRemaining(Unknown Source)
    at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
    at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
    at java.util.stream.ReferencePipeline.forEach(Unknown Source)
    at net.glowstone.GlowWorld.pulsePlayers(GlowWorld.java:483)
    at net.glowstone.GlowWorld.pulse(GlowWorld.java:364)
    at net.glowstone.scheduler.WorldScheduler$WorldThread.run(WorldScheduler.java:139)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


Edited by gdude2002 for formatting and Discord messages

@gdude2002

This comment has been minimized.

Member

gdude2002 commented Jul 24, 2016

This has been confirmed to still be a problem on Discord.

@gdude2002 gdude2002 reopened this Jul 24, 2016

@mastercoms mastercoms changed the title from Chunkloading: Unknown Version: 0 to Chunk unknown version Dec 6, 2016

@gdude2002 gdude2002 added this to Backlog in March 2017 Feb 27, 2017

@gdude2002 gdude2002 moved this from Backlog to Stalled in March 2017 Feb 27, 2017

@mastercoms mastercoms added this to the 2017.3 milestone Mar 4, 2017

@mastercoms

This comment has been minimized.

Member

mastercoms commented Mar 9, 2017

Better version handling was added in 92d688e. Perhaps this fixed the issue? I haven't seen this problem for a while.

@mastercoms mastercoms closed this Mar 9, 2017

@wafflebot wafflebot bot removed the help wanted label Mar 9, 2017

@gdude2002 gdude2002 moved this from Stalled (Little activity since '16) to Completed in March 2017 Mar 9, 2017

@BSFishy

This comment has been minimized.

Contributor

BSFishy commented Mar 29, 2017

I just got this issue again 😝. Here are the errors(There are the two):

17:02:33 [SEVERE] Error while loading chunk (-7,8)
java.io.IOException: Invalid length: 136138398 > 4096
        at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:208)
        at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:67)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:149)
        at net.glowstone.chunk.ChunkManager.populateChunk(ChunkManager.java:216)
        at net.glowstone.chunk.ChunkManager.forcePopulation(ChunkManager.java:249)
        at net.glowstone.GlowWorld.setKeepSpawnInMemory(GlowWorld.java:773)
        at net.glowstone.GlowWorld.<init>(GlowWorld.java:319)
        at net.glowstone.GlowServer.createWorld(GlowServer.java:1531)
        at net.glowstone.GlowServer.start(GlowServer.java:515)
        at net.glowstone.GlowServer.run(GlowServer.java:439)
        at net.glowstone.GlowServer.main(GlowServer.java:311)

and:

17:02:34 [SEVERE] Error while loading chunk (0,-14)
java.io.IOException: Unknown version: -52
        at net.glowstone.io.anvil.RegionFile.getChunkDataInputStream(RegionFile.java:231)
        at net.glowstone.io.anvil.AnvilChunkIoService.read(AnvilChunkIoService.java:67)
        at net.glowstone.chunk.ChunkManager.loadChunk(ChunkManager.java:149)
        at net.glowstone.chunk.ChunkManager.populateChunk(ChunkManager.java:216)
        at net.glowstone.chunk.ChunkManager.forcePopulation(ChunkManager.java:249)
        at net.glowstone.GlowWorld.setKeepSpawnInMemory(GlowWorld.java:773)
        at net.glowstone.GlowWorld.<init>(GlowWorld.java:319)
        at net.glowstone.GlowServer.createWorld(GlowServer.java:1531)
        at net.glowstone.GlowServer.start(GlowServer.java:515)
        at net.glowstone.GlowServer.run(GlowServer.java:439)
        at net.glowstone.GlowServer.main(GlowServer.java:311)

Got 5 of these errors (Each different chunks)

@mastercoms mastercoms reopened this Mar 30, 2017

@gdude2002 gdude2002 added this to Backlog in April 2017 Apr 1, 2017

@gdude2002 gdude2002 removed this from Backlog in April 2017 May 4, 2017

@gdude2002 gdude2002 added this to Backlog in May 2017 May 4, 2017

@momothereal momothereal removed this from the 2017.3 milestone Jul 8, 2017

mastercoms added a commit that referenced this issue Dec 3, 2017

Region file init improvements
Cache the region file's initial length
Only seek to the end of file when needed
Optimized branching for grows
Alignment grows now grow the file to a multiple of 4KB, rather than the bytes already in a 4KB block (fixes #510, fixes #199)
Use constants and non-hex values for readability
@mastercoms

This comment has been minimized.

Member

mastercoms commented Dec 3, 2017

Fixed in 98aeb19

@mastercoms mastercoms closed this Dec 3, 2017

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