BlockMap icon indicating copy to clipboard operation
BlockMap copied to clipboard

UnsupportedOperationException

Open Remideza opened this issue 3 years ago • 3 comments

Hello, upon running the program with Java 17 and on Raspbian, I have this exception that blocks the execution

It happens after some regions already being rendered, so it might be related to 1.18.1

I didn't investigate further, but I guess it could be enough for a fix

java.lang.UnsupportedOperationException
        at java.base/java.util.Collections$UnmodifiableCollection.retainAll(Collections.java:1083)
        at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder$1.rendered(RegionFolder.java:508)
        at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder$1.rendered(RegionFolder.java:505)
        at de.piegames.blockmap.world.ChunkMetadata$ChunkMetadataRendered.visit(ChunkMetadata.java:85)
        at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder.lambda$filterStructures$1(RegionFolder.java:505)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779)
        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
        at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder.filterStructures(RegionFolder.java:505)
        at java.base/java.util.Optional.ifPresent(Optional.java:178)
        at de.piegames.blockmap.standalone.CommandLineMain$CommandServer.call(CommandLineMain.java:370)
        at de.piegames.blockmap.standalone.CommandLineMain$CommandServer.call(CommandLineMain.java:276)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at de.piegames.blockmap.standalone.CommandLineMain.mainWithoutQuit(CommandLineMain.java:399)
        at de.piegames.blockmap.standalone.CommandLineMain.main(CommandLineMain.java:403)

Remideza avatar Jan 18 '22 15:01 Remideza

You appear to be using the server feature. I haven't used it in a while now, but I'll have a look. In the meantime, using the "normal" CLI should work just fine.

piegamesde avatar Jan 18 '22 21:01 piegamesde

Hello, I have to this error

22-03-27 18:19:26 WARN  LevelMetadata [455] - 'poi/r.-1.3.mca' is empty?!
java.lang.UnsupportedOperationException
        at java.base/java.util.Collections$UnmodifiableCollection.retainAll(Collections.java:1083)
        at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder$1.rendered(RegionFolder.java:508)
        at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder$1.rendered(RegionFolder.java:505)
        at de.piegames.blockmap.world.ChunkMetadata$ChunkMetadataRendered.visit(ChunkMetadata.java:85)
        at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder.lambda$filterStructures$1(RegionFolder.java:505)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779)
        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
        at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder.filterStructures(RegionFolder.java:505)
        at java.base/java.util.Optional.ifPresent(Optional.java:178)
        at de.piegames.blockmap.standalone.CommandLineMain$CommandServer.call(CommandLineMain.java:370)
        at de.piegames.blockmap.standalone.CommandLineMain$CommandServer.call(CommandLineMain.java:276)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at de.piegames.blockmap.standalone.CommandLineMain.mainWithoutQuit(CommandLineMain.java:399)
        at de.piegames.blockmap.standalone.CommandLineMain.main(CommandLineMain.java:403)

0xAAZZ avatar Mar 27 '22 16:03 0xAAZZ

Please try out running from the latest development branch, the issue should be fixed there now.

piegamesde avatar Mar 27 '22 16:03 piegamesde