Originally this problem was mentioned in Bug 354. Version 4.1.0 sometimes gives bunch of exceptions upon conversion (don't know how to reproduce in general): java.lang.IllegalArgumentException: Invalid substring range at java.text.AttributedString.addAttribute(AttributedString.java:332) at com.uppaal.gui.canvas.LabelViewHandler.draw(LabelViewHandler.java:169) at com.uppaal.gui.canvas.TemplateView.paintComponent(TemplateView.java:647) at javax.swing.JComponent.paint(JComponent.java:1002) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5084) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1360) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1291) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295) at javax.swing.RepaintManager.paint(RepaintManager.java:1106) at javax.swing.JComponent._paintImmediately(JComponent.java:5032) at javax.swing.JComponent.paintImmediately(JComponent.java:4842) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:670) at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:650) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:598) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) java.lang.IllegalArgumentException: Invalid substring range at java.text.AttributedString.addAttribute(AttributedString.java:332) at com.uppaal.gui.canvas.LabelViewHandler.draw(LabelViewHandler.java:169) at com.uppaal.gui.canvas.TemplateView.paintComponent(TemplateView.java:647) at javax.swing.JComponent.paint(JComponent.java:1002) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JViewport.paint(JViewport.java:742) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paint(JComponent.java:1011) at javax.swing.JLayeredPane.paint(JLayeredPane.java:559) at javax.swing.JComponent.paintChildren(JComponent.java:839) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5091) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1360) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1291) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295) at javax.swing.RepaintManager.paint(RepaintManager.java:1106) at javax.swing.JComponent.paint(JComponent.java:988) at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21) at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60) at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97) at java.awt.Container.paint(Container.java:1727) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:725) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:670) at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:650) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:598) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
This is most likely a result of a bug in the server in which the coordinates of an error message are wrong. I have adjusted the code in the GUI on the 4.0 branch to compensate for such problems and print a warning to stderr when it happens.
The changes on the 4.0 branch are from rev. 2755.
Fixed on the trunk from rev. 2760.