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.
use sample program JavaApplication as the test case : add println statement into main: public static void main(String[] args) { // TODO code application logic here System.out.println("this is test"); } set bpt on line "System.out..." start debugging, stop at bpt line - open watch view, make sure only value column is visible - drag and drop "Main" from source window to watch view to create "Main" watch node - step into println, Type and toString() columns shown in watch views Sometime this sequence can not always reproduce the problem, you need to play with it couple more times. But with solstudio this problem can always be reproduced, following is from solstudio CR 6965612 : Steps to reproduce: - run IDE with a fresh userdir - create Welcome sample - do step into - open Watches, it contains two columns "Name" and "Value" - drag and drop 'argc' from editor into Watches Result: "Type" column appears unexpectedly on the first place (before Name and Value), Name and Value can change its place, e.g. the order could be Type, Value, Name. If user removes Type column and finish debug session then very often the following exception appears: java.lang.ArrayIndexOutOfBoundsException: 2 at org.netbeans.modules.viewmodel.OutlineTable.setColumnsOrder(OutlineTable.java:711) at org.netbeans.modules.viewmodel.OutlineTable.updateTableColumns(OutlineTable.java:674) at org.netbeans.modules.viewmodel.OutlineTable.setModel(OutlineTable.java:444) at org.netbeans.spi.viewmodel.Models.createView(Models.java:130) [catch] at org.netbeans.modules.debugger.ui.views.ViewModelListener$2.run(ViewModelListener.java:486) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) It also could be java.lang.ArrayIndexOutOfBoundsException: 3 instead of 2 After that it's impossible to use Watches any more as the same exception appears after any action and Watches shows nothing. Restarting IDE does not help. *** (#1 of 1): 2010-06-30 08:56:01 PDT alexander.pepin@sun.com
Reproduced. The same problem is with Variables window when it contains watches. I did not get the exception, but the columns are added back as you described.
Exception usually appears after some manipulation with columns e.g. hide Type column, add a new watch , hide Type column once again etc.
This is really a piquant issue. It seems to be a bug in Outline, witch discards the list of hidden columns and create new ones in ETable.createDefaultColumnsFromModel() in a response to tableChanged event that rebuilds the whole table. Such event is thrown because we call refresh in the root node. And when the node has set it's display name, we call Node.fireDisplayNameChange(). The root node does not have set display name by default, unless someone ask for it. Therefore refreshes do not rebuild the whole table unless someone asks for a display name of the root node. Since the root is not visible, nobody cares about it's display name. But there's "log("canDrop " + n);" line in OutlineViewDropSupport.canDrop(OutlineViewDropSupport.java:584) And that logging asks for the display name of the root node! Therefore the drop action into Watches initializes display name of the root node. After that, events that rebuild the whole table are sent, which results in discard of the hidden columns.
Martin, will you be able to fix it in 6.9.1 ? otherwise, we need to diable drag & drop watch node in solstudio 12.2
I've made a safe fix, that just masks the problem by preventing from calling getDisplayName on the root node. changeset: 173860:c01887dd86b4 http://hg.netbeans.org/main/rev/c01887dd86b4 Please verify in trunk builds that this helps and also that the exception does not occur. Since the fix can not break anything, it's very safe for 6.9.1. To fix the problem in ETable.createDefaultColumnsFromModel() I've submitted issue #188341. That can be more risky to change so close before release of 6.9.1.
Integrated into 'main-golden', will be available in build *201007040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/c01887dd86b4 User: mentlicher@netbeans.org Log: #188295 Mask the problem with table refreshing when root node fires it's display name change.
verified in OSS IDE built on nb6.9 with updated org-openide-explorer.jar provided by developers. Please push the fix into 6.9.1.
I verified this as well. - started with an older trunk and no d&d functionality : no problems. - added toolshg d&d fix: can see the problem, but only with d&d and not any watch creation as mentioned somewhere else. - added current nb trunk, including fixes for this: no problems. Also no regressions wrt previous column rearrangement bug. Thanks Martin!
Please approve integration into 6.9.1 as this fix is highly needed for OSS IDE. Without this fix we will not be able to expose a new feature in debugger and will have to drop it.
approved for integration into 6.9.1
Petr please integrate the fix today so that it will appear in nightly build.
The fix has been ported into the release691 branch. http://hg.netbeans.org/release691/rev/6c9709ae59ba