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

Caused by: java.lang.NullPointerException: Cannot invoke "com.kitfox.svg.SVGDiagram.setIgnoringClipHeuristic(boolean)" because "diagram" is null #249

Open
vanniktech opened this issue Jul 2, 2023 · 1 comment

Comments

@vanniktech
Copy link

I'm updating my Gradle Plugin with all of the latest dependency, and I'm required to use JDK 17 now, which might explain the following:

Caused by: java.lang.NullPointerException: Cannot invoke "com.kitfox.svg.SVGDiagram.setIgnoringClipHeuristic(boolean)" because "diagram" is null
    	at guru.nidi.graphviz.engine.SalamanderRasterizer.createDiagram(SalamanderRasterizer.java:45)
    	at guru.nidi.graphviz.engine.SalamanderRasterizer.doRasterize(SalamanderRasterizer.java:31)
    	at guru.nidi.graphviz.engine.SvgRasterizer.rasterize(SvgRasterizer.java:40)
    	at guru.nidi.graphviz.engine.Renderer.toImage(Renderer.java:123)
    	at guru.nidi.graphviz.engine.Renderer.toFile(Renderer.java:75)
    	at guru.nidi.graphviz.engine.Renderer.lambda$toFile$4(Renderer.java:61)
    	at guru.nidi.graphviz.engine.EngineResult.mapIO(EngineResult.java:72)
    	at guru.nidi.graphviz.engine.Renderer.toFile(Renderer.java:59)
    	at com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorTask.run(DependencyGraphGeneratorTask.kt:34)

Public reproducer: vanniktech/gradle-dependency-graph-generator-plugin#228

This is the problematic line: https://github.com/nidi3/graphviz-java/blob/f0c1fdfa37c8b9876ef1dcccec1a6c19219e727e/graphviz-java/src/main/java/guru/nidi/graphviz/engine/SalamanderRasterizer.java#L45C17-L45C41

@iamkhalidcse
Copy link

Facing the same issue using guru.nidi:graphviz-java:0.18.1 and org.graalvm.js:js:22.3.2 after Java 17 migration. I am using gradle 7.6.1.

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