rapidprom / rapidprom-source

Current development of the RapidProM Extension
http://www.rapidprom.org
12 stars 11 forks source link

Petri net visualizer crashes sometimes #28

Open joosbuijs opened 7 years ago

joosbuijs commented 7 years ago

This might be a vague error, but it's not listed in the known bugs list, and did occur so reporting anyway.

Error: Error executing background job 'Calculating result: petri_net_renderer': java.lang.NullPointerException.

Reproducable: not yet (although occurs after reruns, switching workflows solves it...)

Stacktrace: `Exception: java.lang.NullPointerException Message: null Stack trace:

org.jgraph.graph.EdgeRenderer.createShape(EdgeRenderer.java:866) org.jgraph.graph.EdgeView.getShape(EdgeView.java:227) org.jgraph.graph.EdgeRenderer.getPaintBounds(EdgeRenderer.java:598) org.jgraph.graph.EdgeRenderer.getBounds(EdgeRenderer.java:281) org.jgraph.graph.EdgeView.getBounds(EdgeView.java:257) org.jgraph.graph.GraphLayoutCache.getBounds(GraphLayoutCache.java:458) org.jgraph.graph.GraphLayoutCache$GraphLayoutCacheEdit.execute(GraphLayoutCache.java:2306) org.jgraph.graph.DefaultGraphModel.edit(DefaultGraphModel.java:563) org.jgraph.graph.DefaultGraphModel.edit(DefaultGraphModel.java:538) org.jgraph.graph.GraphLayoutCache.setVisible(GraphLayoutCache.java:1093) org.jgraph.graph.GraphLayoutCache.setVisible(GraphLayoutCache.java:1068) org.jgraph.graph.GraphLayoutCache.setVisible(GraphLayoutCache.java:1048) org.jgraph.graph.GraphLayoutCache.setVisible(GraphLayoutCache.java:1030) com.jgraph.layout.JGraphFacade.run(JGraphFacade.java:472) org.processmining.models.jgraph.ProMJGraphVisualizer.visualizeGraph(ProMJGraphVisualizer.java:117) org.processmining.models.jgraph.ProMJGraphVisualizer.visualizeGraph(ProMJGraphVisualizer.java:76) org.processmining.plugins.petrinet.PetriNetVisualization.visualizeWithAll(PetriNetVisualization.java:133) org.processmining.plugins.petrinet.PetriNetVisualization.visualize(PetriNetVisualization.java:538) org.rapidprom.ioobjectrenderers.PetriNetIOObjectRenderer.runVisualization(PetriNetIOObjectRenderer.java:25) org.rapidprom.ioobjectrenderers.PetriNetIOObjectRenderer.runVisualization(PetriNetIOObjectRenderer.java:13) org.rapidprom.ioobjectrenderers.abstr.AbstractRapidProMIOObjectRenderer.getVisualizationComponent(AbstractRapidProMIOObjectRenderer.java:23) com.rapidminer.gui.processeditor.results.ResultDisplayTools$1.run(ResultDisplayTools.java:168) com.rapidminer.gui.tools.ProgressThread$3.run(ProgressThread.java:550) java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.lang.Thread.run(Unknown Source)`

abolt commented 7 years ago

Does it happen in ProM?

joosbuijs commented 7 years ago

Did not experience it there yet. As I said, it is a vague error that is hard to reproduce.

abolt commented 7 years ago

We could solve this by only using the dot-based visualizers for a petri net... but it can cause conflicts with plugins that visually manipulate the petri nets such as the conformance checker...

joosbuijs commented 7 years ago

Let's not create more problems than we solve. Just wanted to signal this issue.

fmannhardt commented 7 years ago

I just encountered the exact same error.

Exception: java.lang.NullPointerException
Message: null
Stack trace:
  org.jgraph.graph.EdgeRenderer.createShape(EdgeRenderer.java:895)
  org.jgraph.graph.EdgeView.getShape(EdgeView.java:227)
  org.jgraph.graph.EdgeRenderer.getPaintBounds(EdgeRenderer.java:598)
  org.jgraph.graph.EdgeRenderer.getBounds(EdgeRenderer.java:281)
  org.jgraph.graph.EdgeView.getBounds(EdgeView.java:257)
  org.jgraph.JGraph.getCellBounds(JGraph.java:924)
  org.jgraph.JGraph.getCellBounds(JGraph.java:936)
  org.jgraph.JGraph.getClipRectangle(JGraph.java:3073)
org.jgraph.plaf.basic.BasicGraphUI$GraphLayoutCacheHandler.graphLayoutCacheChanged(BasicGraphUI.java:1800)
  org.jgraph.graph.GraphLayoutCache.fireGraphLayoutCacheChanged(GraphLayoutCache.java:382)
  org.jgraph.graph.GraphLayoutCache$GraphLayoutCacheEdit.execute(GraphLayoutCache.java:2320)
  org.jgraph.graph.DefaultGraphModel.insert(DefaultGraphModel.java:509)
  org.jgraph.graph.GraphLayoutCache.insert(GraphLayoutCache.java:1362)
  org.jgraph.graph.GraphLayoutCache.insert(GraphLayoutCache.java:1513)
  org.jgraph.graph.GraphLayoutCache.insert(GraphLayoutCache.java:1461)
  org.processmining.models.jgraph.ProMJGraph.<init>(ProMJGraph.java:173)
  org.processmining.models.jgraph.ProMJGraph.<init>(ProMJGraph.java:88)
  org.processmining.models.jgraph.ProMJGraphVisualizer.visualizeGraph(ProMJGraphVisualizer.java:100)
  org.processmining.models.jgraph.ProMJGraphVisualizer.visualizeGraph(ProMJGraphVisualizer.java:76)
  org.processmining.plugins.petrinet.PetriNetVisualization.visualizeWithAll(PetriNetVisualization.java:133)
  org.processmining.plugins.petrinet.PetriNetVisualization.visualize(PetriNetVisualization.java:538)
org.rapidprom.ioobjectrenderers.PetriNetIOObjectRenderer.runVisualization(PetriNetIOObjectRenderer.java:25)
org.rapidprom.ioobjectrenderers.PetriNetIOObjectRenderer.runVisualization(PetriNetIOObjectRenderer.java:13)
org.rapidprom.ioobjectrenderers.abstr.AbstractRapidProMIOObjectRenderer.getVisualizationComponent(AbstractRapidProMIOObjectRenderer.java:23)
  com.rapidminer.gui.processeditor.results.ResultDisplayTools$1.run(ResultDisplayTools.java:168)
  com.rapidminer.gui.tools.ProgressThread$3.run(ProgressThread.java:550)
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  java.lang.Thread.run(Thread.java:745)

And, the same exception with the Heuristics Miner:

Exception: java.lang.NullPointerException
Message: null
Stack trace:

  org.jgraph.graph.EdgeRenderer.createShape(EdgeRenderer.java:895)
  org.jgraph.graph.EdgeView.getShape(EdgeView.java:227)
  org.jgraph.graph.EdgeRenderer.getPaintBounds(EdgeRenderer.java:598)
  org.jgraph.graph.EdgeRenderer.getBounds(EdgeRenderer.java:281)
  org.jgraph.graph.EdgeView.getBounds(EdgeView.java:257)
  org.jgraph.graph.GraphLayoutCache.getBounds(GraphLayoutCache.java:458)
  org.jgraph.graph.GraphLayoutCache$GraphLayoutCacheEdit.execute(GraphLayoutCache.java:2306)
  org.jgraph.graph.DefaultGraphModel.edit(DefaultGraphModel.java:563)
  org.jgraph.graph.DefaultGraphModel.edit(DefaultGraphModel.java:538)
  org.jgraph.graph.GraphLayoutCache.setVisible(GraphLayoutCache.java:1093)
  org.jgraph.graph.GraphLayoutCache.setVisible(GraphLayoutCache.java:1068)
  org.jgraph.graph.GraphLayoutCache.setVisible(GraphLayoutCache.java:1048)
  org.jgraph.graph.GraphLayoutCache.setVisible(GraphLayoutCache.java:1030)
  com.jgraph.layout.JGraphFacade.run(JGraphFacade.java:472)
  org.processmining.plugins.heuristicsnet.miner.heuristics.miner.gui.HeuristicsNetVisualizer.createJGraph(HeuristicsNetVisualizer.java:87)
  org.processmining.plugins.heuristicsnet.miner.heuristics.miner.gui.HeuristicsNetVisualizer.getResultsPanel(HeuristicsNetVisualizer.java:49)
  org.processmining.plugins.heuristicsnet.miner.heuristics.miner.gui.HeuristicsNetVisualizer.visualizeGraph(HeuristicsNetVisualizer.java:253)
  org.processmining.plugins.heuristicsnet.visualizer.HeuristicsNetAnnotatedVisualization.visualize(HeuristicsNetAnnotatedVisualization.java:28)
  org.rapidprom.ioobjectrenderers.HeuristicsNetIOObjectRenderer.runVisualization(HeuristicsNetIOObjectRenderer.java:18)
  org.rapidprom.ioobjectrenderers.HeuristicsNetIOObjectRenderer.runVisualization(HeuristicsNetIOObjectRenderer.java:9)
  org.rapidprom.ioobjectrenderers.abstr.AbstractRapidProMIOObjectRenderer.getVisualizationComponent(AbstractRapidProMIOObjectRenderer.java:23)
  org.rapidprom.ioobjectrenderers.abstr.AbstractRapidProMIOObjectRenderer.createReportable(AbstractRapidProMIOObjectRenderer.java:33)
  com.rapidminer.gui.processeditor.results.SingleResultOverview.<init>(SingleResultOverview.java:191)
  com.rapidminer.gui.processeditor.results.ProcessExecutionResultOverview.<init>(ProcessExecutionResultOverview.java:210)
  com.rapidminer.gui.processeditor.results.ResultOverview.addResults(ResultOverview.java:128)
  com.rapidminer.gui.processeditor.results.DockableResultDisplay$8.run(DockableResultDisplay.java:226)
  com.rapidminer.gui.tools.ProgressThread$3.run(ProgressThread.java:550)
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  java.lang.Thread.run(Thread.java:745)

I just debugged it a little bit. It seems that the EdgeView field "view" is NULL for some reason.

abolt commented 7 years ago

Thanks Felix!

Could you send me the workflow and data that produced this crash? I still cannot reproduce it...

mderoode commented 7 years ago

The same exception occurred when I did the following:

1) Install RapidMiner and RapidProm on a new PC 2) Start RapidProm with a blank template 3) Add an Import Event Log node and set the file attribute (to the example set of APM Assignment 1) 4) Add an Inductive Miner (Process Tree) node 5) Connect the first node with the second node, and the second node with the result node. 6) Run

However, when I am running the workflow without the connection from second node to the result node via right click on the second node -> Show ProcessTreeIOObjectResult, no exception occurs. The exception did not occur when I tried another discovery algorithm such as Alpha Miner.

Exception:

Exception: java.lang.NullPointerException Message: null Stack trace:

org.jgraph.graph.EdgeView.getPoint(EdgeView.java:409) org.jgraph.graph.EdgeRenderer.createShape(EdgeRenderer.java:823) org.jgraph.graph.EdgeView.getShape(EdgeView.java:227) org.jgraph.graph.EdgeRenderer.getPaintBounds(EdgeRenderer.java:598) org.jgraph.graph.EdgeRenderer.getBounds(EdgeRenderer.java:281) org.jgraph.graph.EdgeView.getBounds(EdgeView.java:257) org.jgraph.JGraph.getCellBounds(JGraph.java:924) org.jgraph.JGraph.getCellBounds(JGraph.java:933) org.jgraph.JGraph.getClipRectangle(JGraph.java:3073) org.jgraph.plaf.basic.BasicGraphUI$GraphModelHandler.graphChanged(BasicGraphUI.java:1754) org.jgraph.graph.DefaultGraphModel.fireGraphChanged(DefaultGraphModel.java:1128) org.jgraph.graph.DefaultGraphModel$GraphModelEdit.execute(DefaultGraphModel.java:1416) org.jgraph.graph.DefaultGraphModel.insert(DefaultGraphModel.java:505) org.jgraph.graph.GraphLayoutCache.insert(GraphLayoutCache.java:1362) org.jgraph.graph.GraphLayoutCache.insert(GraphLayoutCache.java:1513) org.jgraph.graph.GraphLayoutCache.insert(GraphLayoutCache.java:1461) org.jgraph.graph.GraphLayoutCache.insert(GraphLayoutCache.java:1422) org.processmining.processtree.visualization.tree.TreeLayoutBuilder.drawEdge(TreeLayoutBuilder.java:444) org.processmining.processtree.visualization.tree.TreeLayoutBuilder.drawBlock(TreeLayoutBuilder.java:385) org.processmining.processtree.visualization.tree.TreeLayoutBuilder.drawNode(TreeLayoutBuilder.java:251) org.processmining.processtree.visualization.tree.TreeLayoutBuilder.drawBlock(TreeLayoutBuilder.java:375) org.processmining.processtree.visualization.tree.TreeLayoutBuilder.drawNode(TreeLayoutBuilder.java:251) org.processmining.processtree.visualization.tree.TreeLayoutBuilder.drawBlock(TreeLayoutBuilder.java:375) org.processmining.processtree.visualization.tree.TreeLayoutBuilder.drawNode(TreeLayoutBuilder.java:251) org.processmining.processtree.visualization.tree.TreeLayoutBuilder.getJGraph(TreeLayoutBuilder.java:124) org.processmining.processtree.visualization.tree.TreeVisualization.visualize(TreeVisualization.java:34) org.rapidprom.ioobjectrenderers.ProcessTreeIOObjectDefaultRenderer.runVisualization(ProcessTreeIOObjectDefaultRenderer.java:19) org.rapidprom.ioobjectrenderers.ProcessTreeIOObjectDefaultRenderer.runVisualization(ProcessTreeIOObjectDefaultRenderer.java:9) org.rapidprom.ioobjectrenderers.abstr.AbstractRapidProMIOObjectRenderer.getVisualizationComponent(AbstractRapidProMIOObjectRenderer.java:23) com.rapidminer.gui.processeditor.results.ResultDisplayTools$1.run(ResultDisplayTools.java:170) com.rapidminer.gui.tools.ProgressThread$3.run(ProgressThread.java:550) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745)

abolt commented 7 years ago

Thanks for reporting this. From the exception, I cannot make sense of why it works in one way but not the other... I will try to reproduce it and come back to you.

Cheers,