Chicken-Bones / ForgeMultipart

An API for dynamically handling different functional parts in the one block space.
Other
119 stars 56 forks source link

Trait ASM Mixin Crash #280

Open calclavia opened 10 years ago

calclavia commented 10 years ago

I wrote a custom MultiPart trait. The trait uses a Scala match statement and causes the following crash upon registering the trait:

java.util.NoSuchElementException: key not found: i at scala.collection.MapLike$class.default(MapLike.scala:228) ~[scala-library-2.11.1.jar:?] at scala.collection.AbstractMap.default(Map.scala:59) ~[scala-library-2.11.1.jar:?] at scala.collection.MapLike$class.apply(MapLike.scala:141) ~[scala-library-2.11.1.jar:?] at scala.collection.AbstractMap.apply(Map.scala:59) ~[scala-library-2.11.1.jar:?] at codechicken.multipart.asm.ASMMixinCompiler$.codechicken$multipart$asm$ASMMixinCompiler$$fname$1(ASMMixinCompiler.scala:390) ~[ForgeMultipart-1.7.10-1.1.0.300-dev.jar:?] at codechicken.multipart.asm.ASMMixinCompiler$.staticTransform$1(ASMMixinCompiler.scala:431) ~[ForgeMultipart-1.7.10-1.1.0.300-dev.jar:?] at codechicken.multipart.asm.ASMMixinCompiler$.codechicken$multipart$asm$ASMMixinCompiler$$convertMethod$1(ASMMixinCompiler.scala:494) ~[ForgeMultipart-1.7.10-1.1.0.300-dev.jar:?] at codechicken.multipart.asm.ASMMixinCompiler$$anonfun$registerJavaTrait$2.apply(ASMMixinCompiler.scala:497) ~[ForgeMultipart-1.7.10-1.1.0.300-dev.jar:?] at codechicken.multipart.asm.ASMMixinCompiler$$anonfun$registerJavaTrait$2.apply(ASMMixinCompiler.scala:497) ~[ForgeMultipart-1.7.10-1.1.0.300-dev.jar:?] at scala.collection.Iterator$class.foreach(Iterator.scala:743) ~[scala-library-2.11.1.jar:?] at scala.collection.AbstractIterator.foreach(Iterator.scala:1174) ~[scala-library-2.11.1.jar:?] at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) ~[scala-library-2.11.1.jar:?] at scala.collection.AbstractIterable.foreach(Iterable.scala:54) ~[scala-library-2.11.1.jar:?] at codechicken.multipart.asm.ASMMixinCompiler$.registerJavaTrait(ASMMixinCompiler.scala:497) ~[ForgeMultipart-1.7.10-1.1.0.300-dev.jar:?] at codechicken.multipart.asm.ASMMixinFactory$.registerTrait(ASMMixinFactory.scala:176) ~[ForgeMultipart-1.7.10-1.1.0.300-dev.jar:?] at codechicken.multipart.MultipartGenerator$.registerTrait(MultipartGenerator.scala:166) ~[ForgeMultipart-1.7.10-1.1.0.300-dev.jar:?] at codechicken.multipart.MultipartGenerator$.registerTrait(MultipartGenerator.scala:150) ~[ForgeMultipart-1.7.10-1.1.0.300-dev.jar:?] at resonantinduction.core.ResonantPartFactory$.init(ResonantPartFactory.scala:27) ~[Resonant-Induction/:?] at resonantinduction.core.ResonantInduction$.init(ResonantInduction.scala:78) ~[Resonant-Induction/:?] at resonantinduction.core.ResonantInduction.init(ResonantInduction.scala) ~[Resonant-Induction/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_55] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_55] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_55] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_55] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) ~[forgeSrc-1.7.10-10.13.0.1208.jar:?] at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_55] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_55] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[forgeSrc-1.7.10-10.13.0.1208.jar:?] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[forgeSrc-1.7.10-10.13.0.1208.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_55] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_55] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_55] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_55] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691) [Loader.class:?] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:596) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:941) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_55] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_55] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_55] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_55] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_55] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_55] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_55] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_55] at GradleStart.bounce(GradleStart.java:107) [start/:?] at GradleStart.startClient(GradleStart.java:100) [start/:?] at GradleStart.main(GradleStart.java:55) [start/:?]

Chicken-Bones commented 9 years ago

Sorry I've taken so long to get to this, if it's still an issue, can you send me a test trait?