Running SpongeForge from dev environment

So i’m updating a plugin i’m working on for 1.8.9 and when i updated SpongeForge it seems that i can no longer run it from my IDE. I’ve tried on both client and server and it crashes on both. Here is the crash report for the client and the server. I followed the steps on the SpongeForge github for updating and even tried deleting SpongeForge and reinstalling from scratch, I’m not sure what i’m doing wrong as it worked previously using with the same procedure. If anyone can tell me what i need to do i would very much appreciate it.

There is currently an issue with Forge and Eclipse so it’s probably that.

Also the crash report show the effect not the cause. It is recommended to post the entire fml-server-latest.log so we get the full picture of what’s going on.

oh sorry about that, here’s the server-log

Ah yes, as I thought

[16:47:29] [main/ERROR] [mixin/]: String index out of range: 2
java.lang.StringIndexOutOfBoundsException: String index out of range: 2
    at java.lang.String.charAt(Unknown Source) ~[?:1.8.0_66]
    at org.objectweb.asm.signature.SignatureReader.a(Unknown Source) ~[asm-5.0.3.jar:5.0.3]
    at org.objectweb.asm.signature.SignatureReader.acceptType(Unknown Source) ~[asm-5.0.3.jar:5.0.3]
    at org.objectweb.asm.commons.Remapper.mapSignature(Unknown Source) ~[asm-commons-5.0.3.jar:5.0.3]
    at org.objectweb.asm.commons.RemappingMethodAdapter.visitLocalVariable(Unknown Source) ~[asm-commons-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.a(Unknown Source) ~[asm-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.b(Unknown Source) ~[asm-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.0.3.jar:5.0.3]
    at net.minecraftforge.fml.common.asm.transformers.DeobfuscationTransformer.transform(DeobfuscationTransformer.java:44) ~[forgeSrc-1.8.9-11.15.1.1722-PROJECT(SpongeForge).jar:?]

My temporary solution, replace injectData in SpongeCoremod with this:


    @Override
    public void injectData(Map<String, Object> data) {
        try {
            Field fTransormers = LaunchClassLoader.class.getDeclaredField("transformers");
            fTransormers.setAccessible(true);
            List<IClassTransformer> transformers = (List<IClassTransformer>) fTransormers.get(Launch.classLoader);
            fTransormers.set(Launch.classLoader, new ForwardingList<IClassTransformer>() {

                @Override
                protected List<IClassTransformer> delegate() {
                    return transformers;
                }

                @Override
                public boolean add(IClassTransformer element) {
                    if (element.getClass() == DeobfuscationTransformer.class) {
                        return false;
                    }
                    return super.add(element);
                }
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
        if ((Boolean)data.get("runtimeDeobfuscationEnabled")) {
            MixinEnvironment.getDefaultEnvironment()
                    .registerErrorHandlerClass("org.spongepowered.mod.mixin.handler.MixinErrorHandler");
        }
        SpongeJava6Bridge.modFile = (File) data.get("coremodLocation");
        if (SpongeJava6Bridge.modFile == null) {
            SpongeJava6Bridge.modFile = new File(getClass().getProtectionDomain().getCodeSource().getLocation().getPath());
        }
    }
1 Like

Thanks alot simon, your temporary solution worked :smiley: I hope this issue gets fixed soon though.

The problem has now been fixed so update Forge and SpongeForge and it should be fine.