TAPAAL 1.4 fails when opening a DEV version net

Bug #781502 reported by Kenneth Yrke Jørgensen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TAPAAL
Invalid
Low
Unassigned
1.4
Fix Released
Low
Kenneth Yrke Jørgensen
VerifyTAPN
Invalid
Undecided
Unassigned

Bug Description

Try to open a net created in TAPAAL DEV using TAPAAL 1.4, this fails with an exception. TAPAAL should report the file can be read and give a pointer to open it using TAPAAL DEV

<code>

[Fatal Error] ObjectList.xml:3:1: Premature end of file.
org.xml.sax.SAXException thrown in getDom(String pnmlFileName) : dataLayer Class : dataLayer Packageorg.xml.sax.SAXParseException; systemId: file:/tmp/ObjectList.xml; lineNumber: 3; columnNumber: 1; Premature end of file.
Workaround: delete the xmlns attribute from the PNML root node. Probably not ideal, to be fixed when time allows.
runtime except
java.lang.RuntimeException: java.lang.NullPointerException
 at pipe.dataLayer.DataLayer.createFromPNML(DataLayer.java:2347)
 at pipe.gui.GuiFrame.createNewTabFromFile(GuiFrame.java:1016)
 at pipe.gui.GuiFrame$FileAction.actionPerformed(GuiFrame.java:1916)
 at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
 at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
 at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
 at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
 at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
 at java.awt.Component.processMouseEvent(Component.java:6203)
 at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
 at java.awt.Component.processEvent(Component.java:5968)
 at java.awt.Container.processEvent(Container.java:2105)
 at java.awt.Component.dispatchEventImpl(Component.java:4564)
 at java.awt.Container.dispatchEventImpl(Container.java:2163)
 at java.awt.Component.dispatchEvent(Component.java:4390)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
 at java.awt.Container.dispatchEventImpl(Container.java:2149)
 at java.awt.Window.dispatchEventImpl(Window.java:2478)
 at java.awt.Component.dispatchEvent(Component.java:4390)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
 at java.awt.EventQueue.access$000(EventQueue.java:96)
 at java.awt.EventQueue$1.run(EventQueue.java:608)
 at java.awt.EventQueue$1.run(EventQueue.java:606)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
 at java.awt.EventQueue$2.run(EventQueue.java:622)
 at java.awt.EventQueue$2.run(EventQueue.java:620)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: java.lang.NullPointerException
 at pipe.dataLayer.DataLayer.createFromPNML(DataLayer.java:2332)
 ... 39 more
</code>

Related branches

Changed in verifytapn:
status: New → Invalid
Changed in tapaal:
milestone: none → 1.4.3
importance: Undecided → Low
summary: - TAPAAL 1.4 fails hard when opening a 1.5 nets
+ TAPAAL 1.4 fails when opening a DEV version net
Revision history for this message
Lasse Jacobsen (lassejacobsen-deactivatedaccount) wrote :

This is obvious since the XML structure for the nets has been changed in TAPAAL 1.5 to make it easier to parse... TAPAAL 1.5 is backwards compatible with models created in TAPAAL 1.4, but in my opinion it doesn't make sense to spend time making TAPAAL 1.4 forward compatible with TAPAAL 1.5 models...

If you start down that road you are just introducing major maintainance issues whenever we add something to the model or make small changes to the XML structure in the future... For instance, say you introduce a new modelling feature in TAPAAL 1.6... Then you would have to add support for the same feature in 1.4 and 1.5... On the next release you introduce a small change in the XML structure, now you have to do maintainance on TAPAAL 1.4, 1.5 and 1.6 to support this change. I think this time would be better spent fixing bugs or adding new features... Backward compatibility is all we need in my opinion...

Revision history for this message
Jiri Srba (srba) wrote :

I agree, we cannot support backward compatibility. However, I would vote for adding a tag
to the XML file saying what is the version of UPPAAL where the net was created. We could do
this in 1.4.3 and well as in 1.5. Then if you try to open net created in 1.5 in 1.4.3 it will not
return the errors but first check the version number and if higher then it will simply report
that the net cannot be open and the user should upgrade.

Revision history for this message
Kenneth Yrke Jørgensen (yrke) wrote :

This is not a bug request for backward support, but for nice error handling. However, for all development great care should be taken not to not break the XML support between version, unless its absolute required.

Changed in tapaal:
milestone: 1.4.3 → none
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.