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.

Bug 25143 - Sometimes submenu in Explorer contains only item "Empty"
Summary: Sometimes submenu in Explorer contains only item "Empty"
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: David Strupl
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2002-06-25 17:02 UTC by Marian Mirilovic
Modified: 2008-12-22 22:18 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
A test for FolderChildren (1.49 KB, text/plain)
2002-07-04 09:26 UTC, Petr Nejedly
Details
patch, place to lib/patches (19.17 KB, application/octet-stream)
2002-07-04 10:54 UTC, Petr Nejedly
Details
ide.log (7.29 KB, text/plain)
2002-07-04 13:07 UTC, Jaromir Uhrik
Details
You can verify it with this patch (openide only, not vcsmount) (11.01 KB, application/octet-stream)
2002-07-04 14:31 UTC, Petr Nejedly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2002-06-25 17:02:31 UTC
[nb_dev](20020624), [jdk1.4.0](fcs)

Sometimes submenu in Explorer contains only item "Empty". 
This behaviour cuase failures of too many GUI tests and 
it's annoying for user bacause (s)he must cancel submenu 
and expand it again.
Comment 1 Petr Nejedly 2002-06-25 17:10:41 UTC
It is caused by FolderChildren not returning the full content
even when using getNodes(true).
I'll investigate it.
Comment 2 Jiri Skrivanek 2002-06-25 17:17:51 UTC
In addition, sometimes only partial sub menu appears and user has to
move mouse away and move mouse back to view all sub menu items.
Comment 3 Marian Mirilovic 2002-06-26 09:50:53 UTC
I have been asked for rising priority - P2.
Comment 4 Jaromir Uhrik 2002-06-28 15:54:58 UTC
[#200206280100; jdk1.4.0 b92]
I have the test-case how to 100% reproduce it in my Win2K:
1.Start IDE
2.Invoke popup menu in the most top node Filesystems
3.Mount has just item Empty
When I try to invoke it second time then item Empty 
disappears and correct content is shown. After a couple of 
minutes I try it again (the same IDE session) and the 
problem repeats again. Similar is the situation for nodes 
of local filesystems - its popup menu contains "Empty" 
in "New" item.
Comment 5 Petr Nejedly 2002-07-02 11:10:08 UTC
It is not 100% on my machine but it is statistically testable
directly asking df.getChildren().getNodes(true) twice in a row.
It should return full result on the first call but sometimes
it returns only the first item and the full array on the subsequent
call.

FolderChildren id DataSystems or Nodes? :-)
Comment 6 Petr Nejedly 2002-07-03 15:18:22 UTC
Fixed in openide/src/org/openide/loaders/FolderChildren.java, v1.53.
Forces initialization in the case of the blocking lookup.
Comment 7 Jaromir Uhrik 2002-07-04 08:24:21 UTC
I have to reopen this issue - I am still able to reproduce 
it in new build (#200207040100, jdk1.4.0 - b92, Win2K) - 
see Steps to reproduce from my previous comment.
Comment 8 Petr Nejedly 2002-07-04 09:22:19 UTC
OK I had <5% reproducibility in on my machine but a FolderChildren
test that have revealed the problem with >50% accuracy.
I'll attach the test, compile it against the openide.jar
and try to run it using internal execution.
It should report working children with item count
or bad children with 1st time result and 2nd time result.
Comment 9 Petr Nejedly 2002-07-04 09:26:34 UTC
Created attachment 6526 [details]
A test for FolderChildren
Comment 10 Jaromir Uhrik 2002-07-04 10:41:01 UTC
Here is the output of the test:
..........Node Templates is OK with 15 children
Node Folder is OK with 0 children
Node Filesystems is OK with 3 children
Node Version Control is OK with 2 children
Node Services is OK with 13 children
Node Autoupdate Types is OK with 1 children
Node Browsers is OK with 1 children
Node Compiler Types is OK with 6 children
Node Debugger Types is OK with 4 children
Node Execution Types is OK with 8 children
Node External Javadoc process is OK with 1 children
Node Indentation Engines is OK with 3 children
Node Javadoc Search Types is OK with 2 children
Node Javadoc Executors is OK with 1 children
Node XML Node Views is OK with 3 children
Node Script Types is OK with 3 children
Node Search Types is OK with 4 children
Node Doclets is OK with 1 children
Node Java Classes is OK with 7 children
Node Java GUI Forms is OK with 8 children
Node AWT Forms is OK with 4 children
Node Sample Forms is OK with 3 children
Node Java Beans is OK with 5 children
Node JSPs & Servlets is OK with 6 children
Node Filters is OK with 2 children
Node Listeners is OK with 4 children
Node RMI is OK with 8 children
Node Sockets is OK with 9 children
Node XML is OK with 7 children
Node JAR Archives is OK with 1 children
Node Ant Build Scripts is OK with 4 children
Node Scripting is OK with 3 children
Node NetBeans Extensions is OK with 1 children
Node Other is OK with 5 children
Comment 11 Petr Nejedly 2002-07-04 10:53:55 UTC
So from the test is seems to work.
I've made a testing patch against openide
that will log number of nodes returned to MenuView during
menu building and also to log strange things in FolderChildren.
I'll attach it.
Please try it with the testing patch and post the results.
Comment 12 Petr Nejedly 2002-07-04 10:54:48 UTC
Created attachment 6527 [details]
patch, place to lib/patches
Comment 13 Jaromir Uhrik 2002-07-04 13:07:12 UTC
Created attachment 6528 [details]
ide.log
Comment 14 Jaromir Uhrik 2002-07-04 13:08:48 UTC
Comments to the previous ide.log:
I just did these steps:
1. Filesystems->Mount (Empty)
2. again Filesystems->Mount (3 items)
3. LocalDir->New (Empty)
4. again LocalDir->New (13 items)
5. LocalDir->New->Folder
6. Filesystems->Mount (3 items)
7. LocalDir->New (13 items)
8. LocalDir->New->Folder
Comment 15 Petr Nejedly 2002-07-04 13:28:01 UTC
OK, FolderChildren did not delivered nodes. Nor one.
The problem I was solving was 1 node (instead of all nodes) delivered,
so this is a bit different.

I wanted instruct you to enable FC and FL logging but when I was
trying it, I got empty menu so now I'm probably able to reproduce
it myself and I'll try to fix this problem too.
Thanks for your cooperation.
Comment 16 Petr Nejedly 2002-07-04 14:27:50 UTC
Hopefully finally fixed.
The rest of the problem was in NewTemplateAction itself.
It uses node translation but it didn't translate the full-find
request properly so it got partial result from the FolderChildren
and used it as its own final result.
I've also fixed VcsMountFromTemplateAction which is customized
copy of the NewTemplateAction.
Comment 17 Petr Nejedly 2002-07-04 14:31:14 UTC
Created attachment 6529 [details]
You can verify it with this patch (openide only, not vcsmount)
Comment 18 Jaromir Uhrik 2002-07-04 15:42:52 UTC
It's great - IDE works fine with this patch! I will try it 
and verify in continuous build as usual. Thanks for really 
important fix.
Comment 19 Jaromir Uhrik 2002-07-08 09:50:01 UTC
Verified in #200207080100.
Comment 20 Jiri Skrivanek 2003-02-13 10:33:57 UTC
Regression in build 20030213. It again showns "Empty" submenu in
"Versioning -> Mount Version Control" main menu and "Mount" context
menu on Filesystems node.
It was probably caused by fix of issue 30986 (see also issue 31019).
Comment 21 Marian Mirilovic 2003-02-13 12:28:23 UTC
Jirka:

You are right, it's the same issue as issue 31019, so please let this
one fixed, and verified, it's about another already fixed problem,
thanks.
Comment 22 Marian Mirilovic 2003-02-13 12:28:46 UTC
v
Comment 23 Quality Engineering 2003-07-01 16:34:33 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.