This issue tracker is closed. Please visit UPPAAL issue tracker at Github instead.

Bug 354

Summary: Syntax converter duplicates template parameters
Product: UPPAAL Reporter: Marius Mikučionis <marius>
Component: GUIAssignee: Gerd Behrmann <behrmann>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 4.0.2   
Hardware: PC   
OS: All   
Architecture:

Description Marius Mikučionis 2006-10-11 15:54:33 CEST
perhaps someone will find it interesting..

I have the following template parameters in old syntax:

const id; int[0,N] in, out, qe, len

After conversion to new syntax I get the following:

const int id, int[0,N]& in, int[0,N]& out, int[0,N]& in, int[0,N]& qe, int[0,N]& in, int[0,N]& out, int[0,N]& in, int[0,N]& len

Version 4.1.0 also 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)
Comment 1 Gerd Behrmann 2006-10-12 18:24:30 CEST
Fixed on the 4.0 branch from rev. 2751.
Comment 2 Gerd Behrmann 2006-10-14 00:16:40 CEST
Fixed on the trunk from rev. 2759.