Expected:
No crash - lack of render - maybe some failure message
Current Output:
:9:96 '=' expected.
at guru.nidi.graphviz.parse.ParserImpl.fail(ParserImpl.java:331)
at guru.nidi.graphviz.parse.ParserImpl.checkToken(ParserImpl.java:326)
at guru.nidi.graphviz.parse.ParserImpl.nextToken(ParserImpl.java:315)
at guru.nidi.graphviz.parse.ParserImpl.attrListElement(ParserImpl.java:289)
at guru.nidi.graphviz.parse.ParserImpl.attributeList(ParserImpl.java:277)
at guru.nidi.graphviz.parse.ParserImpl.nodeStatement(ParserImpl.java:193)
at guru.nidi.graphviz.parse.ParserImpl.statement(ParserImpl.java:103)
at guru.nidi.graphviz.parse.ParserImpl.statementList(ParserImpl.java:78)
at guru.nidi.graphviz.parse.ParserImpl.lambda$parse$0(ParserImpl.java:66)
at guru.nidi.graphviz.model.ThrowingFunction.applyNotThrowing(ThrowingFunction.java:24)
at guru.nidi.graphviz.model.CreationContext.use(CreationContext.java:44)
at guru.nidi.graphviz.model.CreationContext.use(CreationContext.java:38)
at guru.nidi.graphviz.parse.ParserImpl.parse(ParserImpl.java:50)
at guru.nidi.graphviz.parse.Parser.read(Parser.java:81)
at guru.nidi.graphviz.parse.Parser.read(Parser.java:72)
at org.plugin.dot.preview.GraphPreviewFileEditor$ImagePanel.paintGraph(GraphPreviewFileEditor.java:277)
at org.plugin.dot.preview.GraphPreviewFileEditor$ImagePanel.paintComponent(GraphPreviewFileEditor.java:305)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1115)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at com.intellij.openapi.fileEditor.impl.EditorTabs.paintChildren(EditorTabbedContainer.kt:606)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5319)
at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1668)
at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1643)
at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1580)
at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1347)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1101)
at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:75)
at java.desktop/sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:112)
at java.desktop/java.awt.Container.paint(Container.java:2005)
at java.desktop/java.awt.Window.paint(Window.java:3987)
at com.intellij.openapi.wm.impl.IdeFrameImpl.paint(IdeFrameImpl.kt:112)
at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:893)
at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:865)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:865)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:838)
at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:787)
at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1909)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:690)
at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:593)
at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593)
at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:997)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:997)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:400)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
This has happened when I used pydot to generate file which contained style="rounded,filled"
Steps to reproduce:
Run the python code and see that style=rounded,filled instead of style="rounded,filled" Once that is taken by plugin it crashes it
`import pydot
Create the graph
graph = pydot.Dot(graph_type='digraph', fontname="Verdana", compound=True)
Set the graph attributes
graph.set_node_defaults(shape="box", style="rounded", fontname="Verdana", margin="0.3,0.2") graph.set_edge_defaults(fontname="Verdana") graph.set_rankdir('LR') graph.set_remincross(True) graph.set_pack(True)
Add the nodes
login = pydot.Node("Login", label="Login \n 100%", shape="doublecircle", fillcolor="cornflowerblue", color="black", style="rounded,filled", fontcolor="black") nodes = ["platformA", "platformB"] node_attrs = [ {"label": "platformA", "fillcolor": "gray", "fontcolor": "black", "style": "rounded,filled", "color": "black"}, {"label": "platformB", "color": "black", "fillcolor": "seagreen", "style": "rounded,filled", "color": "black"}, ]
for node, attr in zip(nodes, node_attrs): graph.add_node(pydot.Node(node, **attr))
Add the subgraphs
cluster_logins = pydot.Subgraph(graph_name="cluster_logins", graph_type='digraph', color='black', fillcolor='cornflowerblue', label='Logins', rank='same', style='rounded,filled')
logout = pydot.Node("logout", label="logout", fillcolor="cornflowerblue", color="black", style='rounded,filled', fontcolor="black")
cluster_logout = pydot.Subgraph(graph_name="cluster_logout", graph_type='digraph', style='rounded,filled', fillcolor='tan2', label='logout')
Add the edges
Add the nodes to the subgraphs
cluster_logins.add_node(pydot.Node("platformA")) cluster_logins.add_node(pydot.Node("platformB"))
cluster_logout.add_node(logout)
graph.add_edge(pydot.Edge(login, "platformA", color="gray")) graph.add_edge(pydot.Edge(login, "platformB", color="seagreen"))
Add the subgraphs to the main graph
graph.add_subgraph(cluster_logins) graph.add_subgraph(cluster_logout)
graph.add_edge(pydot.Edge("platformA", logout, color="seagreen")) graph.add_edge(pydot.Edge("platformB", logout, color="seagreen"))
Write the graph to a DOT file
graph.write_raw("reproduce.dot") graph.add_node(login)
Add the other nodes
`
Expected: No crash - lack of render - maybe some failure message
Current Output:
:9:96 '=' expected. at guru.nidi.graphviz.parse.ParserImpl.fail(ParserImpl.java:331) at guru.nidi.graphviz.parse.ParserImpl.checkToken(ParserImpl.java:326) at guru.nidi.graphviz.parse.ParserImpl.nextToken(ParserImpl.java:315) at guru.nidi.graphviz.parse.ParserImpl.attrListElement(ParserImpl.java:289) at guru.nidi.graphviz.parse.ParserImpl.attributeList(ParserImpl.java:277) at guru.nidi.graphviz.parse.ParserImpl.nodeStatement(ParserImpl.java:193) at guru.nidi.graphviz.parse.ParserImpl.statement(ParserImpl.java:103) at guru.nidi.graphviz.parse.ParserImpl.statementList(ParserImpl.java:78) at guru.nidi.graphviz.parse.ParserImpl.lambda$parse$0(ParserImpl.java:66) at guru.nidi.graphviz.model.ThrowingFunction.applyNotThrowing(ThrowingFunction.java:24) at guru.nidi.graphviz.model.CreationContext.use(CreationContext.java:44) at guru.nidi.graphviz.model.CreationContext.use(CreationContext.java:38) at guru.nidi.graphviz.parse.ParserImpl.parse(ParserImpl.java:50) at guru.nidi.graphviz.parse.Parser.read(Parser.java:81) at guru.nidi.graphviz.parse.Parser.read(Parser.java:72) at org.plugin.dot.preview.GraphPreviewFileEditor$ImagePanel.paintGraph(GraphPreviewFileEditor.java:277) at org.plugin.dot.preview.GraphPreviewFileEditor$ImagePanel.paintComponent(GraphPreviewFileEditor.java:305) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1115) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at com.intellij.openapi.fileEditor.impl.EditorTabs.paintChildren(EditorTabbedContainer.kt:606) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124) at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:586) at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955) at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5319) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1668) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1643) at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1580) at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1347) at java.desktop/javax.swing.JComponent.paint(JComponent.java:1101) at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39) at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:75) at java.desktop/sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:112) at java.desktop/java.awt.Container.paint(Container.java:2005) at java.desktop/java.awt.Window.paint(Window.java:3987) at com.intellij.openapi.wm.impl.IdeFrameImpl.paint(IdeFrameImpl.kt:112) at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:893) at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:865) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:865) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:838) at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:787) at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1909) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:690) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:593) at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:997) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:997) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:400) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)