This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Not sure what I was doing, I cannot reproduce anymore, perhaps something could be seen from the exception: Fri Nov 23 16:33:29 CET 2001: java.lang.ArrayIndexOutOfBoundsException: <no message> java.lang.ArrayIndexOutOfBoundsException at javax.swing.plaf.basic.BasicListUI.updateLayoutState (BasicListUI.java:717) at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState (BasicListUI.java:660) at javax.swing.plaf.basic.BasicListUI.getCellBounds (BasicListUI.java:536) at javax.swing.JList.getCellBounds(JList.java:800) at javax.swing.JList.ensureIndexIsVisible(JList.java:750) at org.openide.WizardDescriptor$WizardPanel.setSelectedIndex (WizardDescriptor.java:1285) at org.openide.WizardDescriptor$PropL.propertyChange (WizardDescriptor.java:997) at org.openide.WizardDescriptor$2.run(WizardDescriptor.java:408) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:337) at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchThread.java:131) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:98) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
IMHO this seems more like the wizard subsystem. Which template did you tried to use ? Wasn't it the Interface one ?
Target milestone -> 3.3.1.
Moving to openide.
From the code it seems to be a synch problem. While providing method BasicListUI.updateState, there has to be changed list model concurrently (performing code between lines 691 and 703 in the UI), i.e. its size. Since the updateLayout runs always in the AWT thread (see WD line about 406, used Mutex.EVENT), the quilty should be some another thread. To change the list model is possible via WD.updateState method, which can be called via WD.setTitleFormat, WD.setPanels which are both public methods (also from WD.Listener). So there could be more problematic code. There should be found if setTitleFormat or setPanels could be called from another than AWT thread and if yes probably fix it there. CC Svata. Please have a look in java wizard impl if something like that is not possible.
Created attachment 3695 [details] Suggested patch
I looked at it again and guess better it would be to synchronize in WD directly. There are two entry points which needs to be synchronized. The pieces in WizardPanel.setContent and setSelectedIndex method. I think the most natural way is ensure the critical codes are perfomed in AWT thread, see the attachment. I'll ask somebody on [nbdev] to revise the patch., if it is correct method.
The fix seems to make things just better.
Fixed in [release33]. Fix: openide/../openide/WizardDescriptor.java [1.56.2.1] Note: I looked at it again, tested a bit and decided to put in. Note the fix has just slight "syntax" difference from the patch. (EVENT.readAccess(Runnable) -> EVENT.writeAccess(Runnable) in setContent to be cosher, the inside impl's are same).
verified, closed