Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory limitation exception #48

Closed
tahiat opened this issue Nov 21, 2023 · 2 comments
Closed

Memory limitation exception #48

tahiat opened this issue Nov 21, 2023 · 2 comments
Assignees

Comments

@tahiat
Copy link
Collaborator

tahiat commented Nov 21, 2023

Reproduction Steps:
For the twofilesimple test, delete the Baz.java class from the input. Execute the following command:
./gradlew run --args='--outputDirectory "tempDir" --root "src/test/resources/twofilesimple/input/" --targetFile "com/example/Foo.java" --targetMethod "com.example.Foo#bar()"'

Exception stack:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.base/java.io.BufferedReader.<init>(BufferedReader.java:106)
        at java.base/java.io.BufferedReader.<init>(BufferedReader.java:117)
        at com.github.javaparser.StreamProvider.<init>(StreamProvider.java:42)
        at com.github.javaparser.Providers.provider(Providers.java:54)
        at com.github.javaparser.Providers.provider(Providers.java:75)
        at com.github.javaparser.JavaParser.parse(JavaParser.java:232)
        at com.github.javaparser.StaticJavaParser.parse(StaticJavaParser.java:167)
        at org.checkerframework.specimin.SpeciminRunner.parseJavaFile(SpeciminRunner.java:255)
        at org.checkerframework.specimin.SpeciminRunner.performMinimization(SpeciminRunner.java:133)
        at org.checkerframework.specimin.SpeciminRunner.main(SpeciminRunner.java:61)

> Task :run FAILED

Exception occurs due to an infinite loop created by while (addMissingClass.gettingException()) in the SpeciminRunner.java

@LoiNguyenCS
Copy link
Collaborator

This bug is similar to #49.

In the visit method for ObjectCreationExpr, if the unresolved type lacks an import statement, no synthetic file will be created, and an exception will be thrown. But that exception is inside a try block. So instead of crashing, the program will end up in an infinite loop.

@tahiat
Copy link
Collaborator Author

tahiat commented Nov 29, 2023

Resolved with PR #57

@tahiat tahiat closed this as completed Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants