soot-oss / SootUp

A new version of Soot with a completely overhauled architecture
https://soot-oss.github.io/SootUp/
GNU Lesser General Public License v2.1
586 stars 78 forks source link

Problem with the released JimpleParser #542

Open swissiety opened 1 year ago

swissiety commented 1 year ago
    at sootup.jimple.parser.JimpleConverterUtil.createJimpleParser(JimpleConverterUtil.java:194)
    at com.github.swissiety.jimplelsp.resolver.SignaturePositionResolverTest.setUp(SignaturePositionResolverTest.java:27)
    at junit.framework.TestCase.runBare(TestCase.java:140)
    at junit.framework.TestResult$1.protect(TestResult.java:122)
    at junit.framework.TestResult.runProtected(TestResult.java:142)
    at junit.framework.TestResult.run(TestResult.java:125)
    at junit.framework.TestCase.run(TestCase.java:130)
    at junit.framework.TestSuite.runTest(TestSuite.java:241)
    at junit.framework.TestSuite.run(TestSuite.java:236)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
    at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: java.lang.UnsupportedOperationException: java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with UUID 59627784-3be5-417a-b9eb-8131a7286089 (expected aadb8d7e-aeef-4415-ad2b-8204d6cf042e or a legacy UUID).
    at org.antlr.v4.runtime.atn.ATNDeserializer.deserialize(ATNDeserializer.java:154)
    at sootup.jimple.JimpleLexer.<clinit>(JimpleLexer.java:478)
    ... 17 more
Caused by: java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with UUID 59627784-3be5-417a-b9eb-8131a7286089 (expected aadb8d7e-aeef-4415-ad2b-8204d6cf042e or a legacy UUID).
    ... 19 more

java.lang.NoClassDefFoundError: Could not initialize class sootup.jimple.JimpleLexer

    at sootup.jimple.parser.JimpleConverterUtil.createJimpleParser(JimpleConverterUtil.java:194)
    at com.github.swissiety.jimplelsp.resolver.SignaturePositionResolverTest.setUp(SignaturePositionResolverTest.java:27)
    at junit.framework.TestCase.runBare(TestCase.java:140)
    at junit.framework.TestResult$1.protect(TestResult.java:122)
    at junit.framework.TestResult.runProtected(TestResult.java:142)
    at junit.framework.TestResult.run(TestResult.java:125)
    at junit.framework.TestCase.run(TestCase.java:130)
    at junit.framework.TestSuite.runTest(TestSuite.java:241)
    at junit.framework.TestSuite.run(TestSuite.java:236)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
    at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

ANTLR Tool version 4.7 used for code generation does not match the current runtime version 4.5ANTLR Runtime version 4.7.2 used for parser compilation does not match the current runtime version 4.5

Somehow i seems the incorporated ANTLR runtime is just version 4.5..

swissiety commented 1 year ago

it seems the released jar contains the antlr4-maven-plugin in version 4.7.2 which itself uses the antlr4-runtime 4.5 - which then gets somehow used.. i guess because multiple uses of different versions of the same dependency in times before java modules are great

JonasKlauke commented 1 year ago

@swissiety is this issue fixed? can we close it?

swissiety commented 1 year ago

I dont know - now I get "The POM for com.googlecode.d2j:dex-tools:jar:2.2-SNAPSHOT is missing, no dependency information available" before it even compiles.

swissiety commented 1 year ago

the missing dependency error occurs when SootUp is added as a dependency (does not occur if SootUp is installed into the maven repo).

I will report back when my code is updated again to see whether the initial issue is still pops up

JonasKlauke commented 11 months ago

This is probably fixed or?

swissiety commented 11 months ago

didn't found the time to chekc it