MMD OreSpawn

MMD OreSpawn

11M Downloads

better error reoprting on json files

frakier opened this issue ยท 5 comments

commented

OreSpawn-1.12-3.3.0.155

Took me awhile to figure out what was going on. I had converted over content from a older version
where "minecraft:Swampland M" did not throw a error. Doing the conversion over I copied the list in.
This causes a crash but gives no real feedback [or maybe it just went over my head].
Even a hint on the line being process like "minecraft:Swampland M" is in error would help.
My other error was BOP removed two blocks, took for ever to figure that out.

Hopes this helps, love the mods.

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from OreSpawn (orespawn) Caused by: java.lang.NullPointerException at com.mcmoddev.orespawn.impl.location.BiomeLocationSingle.<init>(BiomeLocationSingle.java:18) at com.mcmoddev.orespawn.impl.os3.BiomeBuilder.lambda$create$0(BiomeBuilder.java:85) at java.util.stream.ReferencePipeline$3$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.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.util.stream.ReferencePipeline.collect(Unknown Source) at com.mcmoddev.orespawn.impl.os3.BiomeBuilder.create(BiomeBuilder.java:86) at com.mcmoddev.orespawn.json.OreSpawnReader.loadSingleEntry(OreSpawnReader.java:201) at com.mcmoddev.orespawn.json.OreSpawnReader.lambda$tryReadFile$0(OreSpawnReader.java:87) at java.util.Iterator.forEachRemaining(Unknown Source) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source) at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) at com.mcmoddev.orespawn.json.OreSpawnReader.tryReadFile(OreSpawnReader.java:84) at com.mcmoddev.orespawn.impl.os3.OS3APIImpl.lambda$loadConfigFiles$0(OS3APIImpl.java:100) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.Iterator.forEachRemaining(Unknown Source) at java.util.Spliterators$IteratorSpliterator.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 com.mcmoddev.orespawn.impl.os3.OS3APIImpl.loadConfigFiles(OS3APIImpl.java:98) at com.mcmoddev.orespawn.OreSpawn.init(OreSpawn.java:93) 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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:624) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196) 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 com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:744) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:534) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377) at net.minecraft.client.main.Main.main(SourceFile:123) 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.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 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 org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) at org.multimc.EntryPoint.listen(EntryPoint.java:143) at org.multimc.EntryPoint.main(EntryPoint.java:34)

commented

I don't know how this ever worked, actually. The biome name is a "resource location" - those are always lowercase and cannot have spaces. But yes, better error reporting is needed... seems I didn't do enough checking in some places.

commented

Wait.. so this error


net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from OreSpawn (orespawn)
Caused by: java.lang.NullPointerException

is from something messed up in your ore generation config? I was just about to create an issue on this error, because I only have a single test entry in orespawn.json and my game is crashing with that error on load. Figured it was an incompatibility or something that I couldn't fix myself. Glad I stumbled into this issue. I'll empty my config and see if the crash goes away. In the mean time, +1 for better error reports.

commented

@frakier This issue appears to be because of 2 things:

  1. Minecraft does not allow spaces or uppercase letters in "Resource Locations", which is what the biome name is, now (try minecraft:swampland_m)
  2. I did not expect errors in the biome loading code and didn't test it heavily. For that reason I'm not closing this outright...

To give me a bit of help on this can you post the spawn entry that has the issue as well as try against the latest release for 1.12.2 ?

commented

@MechanosG only in the specific case here - there was a very specific issue in this case, where the Biome Name in the restriction was incorrect in the extreme.

The part that points to it being a bad config is:

com.mcmoddev.orespawn.impl.location.BiomeLocationSingle.<init>(BiomeLocationSingle.java:18) at 
com.mcmoddev.orespawn.impl.os3.BiomeBuilder.lambda$create$0(BiomeBuilder.java:85) at 

The only way for it to fail there was that it couldn't find the biome at all in a very specific, corner-case manner.

commented

Sorry but I had gotten rid of the old configs by the time I reported this. I removed the mods from the modpack when I was trying to cut down on the number of mods but yes it was working correctly and without errors for 1.12.2 once i fixed all the biome names. I intend to put it all back eventually [i was looking for a memory leak] just have not got back to the project.