jbush001 / WaveView

Digital Waveform Viewer
Apache License 2.0
16 stars 3 forks source link

If a net has no transitions, will throw exception #11

Open jbush001 opened 7 years ago

jbush001 commented 7 years ago
Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException
    at waveview.TransitionVector$TransitionVectorIterator.next(TransitionVector.java:93)
    at waveview.TransitionVector$TransitionVectorIterator.next(TransitionVector.java:75)
    at waveview.NetNameList$NetNameRenderer.paintComponent(NetNameList.java:99)

It assumes there is at least one transition.

            Transition t = fTraceDataModel.findTransition(netId,
                           fTraceDisplayModel.getCursorPosition()).next();
            g.drawString(fTraceDisplayModel.getValueFormatter(fCurrentNet).format(t),
                         1, fValueBaseline);
jbush001 commented 7 years ago

I only caused this with a VCD file I hand created. Most simulators will put at least one transition to set the initial state.