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 31026 - NPE: when Filesystems->Mount-> ???
Summary: NPE: when Filesystems->Mount-> ???
Status: VERIFIED DUPLICATE of bug 31152
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2003-02-13 12:03 UTC by dmladek
Modified: 2008-12-22 21:16 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE stacktrace (1.81 KB, text/plain)
2003-02-13 12:04 UTC, dmladek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dmladek 2003-02-13 12:03:36 UTC
Product Version       = NetBeans IDE Dev (Build
200302130100)
  IDE Versioning        = IDE/1 spec=3.37
impl=200302130100
  Operating System      = Linux version 2.4.18
running on i386
  Java; VM; Vendor      = 1.4.1_01; Java
HotSpot(TM) Client VM 1.4.1_01-b01; Sun
Microsystems Inc.
  Java Home             =
/usr/java/j2sdk1.4/sun/jdk1.4.1_01/jre
  System Locale; Encod. = cs_CZ; ISO-8859-2
  Home Dir; Current Dir = /home.local/danielm;
/DISKS/storage3/forte/NBdev-last/netbeans/bin
  IDE Install; User Dir =
/home.local/danielm/NBdev-last;
/home.local/danielm/.netbeans/dev
-------------------------------------------------------------------------------

There's some problem with the (empty) item when
try mount some FS
using Filesystems node in Explorer.

Jirka reported to us, but he didn't get any E.
But Martin and me also get NPE which I'm attaching
Comment 1 dmladek 2003-02-13 12:04:55 UTC
Created attachment 8933 [details]
NPE stacktrace
Comment 2 dmladek 2003-02-13 12:09:16 UTC
To be more exac: Jirka reported us that we have "Empty" item when you
try mount VCS FS via 
 Main Menu->Mount Versioning Control-> ???
In that case no NPE is trown.

Reproductable, also breaking automated tests.
(even though that after a time .... lots of attemps, the "Empty" item
disapears and is replaced by normal items)


Comment 3 Jiri Skrivanek 2003-02-13 12:14:13 UTC
Duplicate of issue 31019 and issue 25143.

*** This issue has been marked as a duplicate of 31019 ***
Comment 4 Marian Mirilovic 2003-02-13 12:46:48 UTC
It's not a duplicate of issue 31019, but it is has been caused by fix
of issue 30986 too, so please guys from VCS, fix your part of issue in 
vcscore/src/org/netbeans/modules/vcscore/actions/VcsMountFromTemplateAction.java

David, provide more info if they will need it , thanks in advance.

I would like only suggest to commit this fix to QBE branch too!
Comment 5 Martin Entlicher 2003-02-13 14:33:35 UTC
It's not clear to me where is the problem.
It simply works for me after issue #31019 was fixed. There's no
exception thrown from VCS modules.

Comment 6 Jiri Skrivanek 2003-02-13 19:27:14 UTC
No exception but "Empty" submenu is shown when "Versioning -> Mount
Version Control" is invoked for the first time. Please, fix it. I
assume it should be fixed the same way as NewTemplateAction in issue
31019 because it stopped to show "Empty" submenu on the Filesystems
node after the fix.
Comment 7 Marian Mirilovic 2003-02-14 09:30:05 UTC
Martin, please fix it ASAP.
Without the fix we cannot commit deadlock fix, or it will be better to
fix it together. It's still reproducible in [nb_dev](20030214),
thanks.
Comment 8 Martin Entlicher 2003-02-14 09:30:48 UTC
Well, you're right. The Empty is there only for the first time.

There were more changes to the NewTemplateAction since
VcsMountFromTemplateAction was written, so it's not so easy to apply
the latest difference.
Comment 9 Martin Entlicher 2003-02-14 10:12:48 UTC
Fixed in the main trunk.

/cvs/vcscore/src/org/netbeans/modules/vcscore/actions/VcsMountFromTemplateAction.java,v 
<--  VcsMountFromTemplateAction.java
new revision: 1.12; previous revision: 1.11

The design of NewTemplateAction is bad. It's not extensible enough and
thus when someone need to implement a similar functionality need to
copy the whole class. This fact leads to issues like this.
Comment 10 dmladek 2003-02-14 12:56:09 UTC
I think so, have you fired a new bug against this design yet, Martin?
Comment 11 Peter Zavadsky 2003-02-14 13:26:20 UTC
When putting the RFE for NewTemplateAction, describe more concretelly
what you would need from it.
Comment 12 Peter Zavadsky 2003-02-14 13:27:36 UTC
Moreover, I don't think NewTemplateAction was designed to be subclassed.
Comment 13 dmladek 2003-02-14 13:51:27 UTC
Yes, I know it. but from my point of view and my basic knowledge about
 oop, I think that if Martin has to copy almost whole class
NewTemplateAction (and as he told me hi's not probably one who did
it), that live would be easier if this class had been designed it
could be reused.

my 2 Kc:-)
Comment 14 Martin Entlicher 2003-02-14 14:01:46 UTC
Yes, the point is, that the NewTemplateAction class was not designed
to be extensible. And my fault probably is, that I've copied the class
but did not force anyone to rewrite the action to be extensible ;-)
Comment 15 Martin Entlicher 2003-02-14 14:27:35 UTC
> When putting the RFE for NewTemplateAction, describe more
> concretelly what you would need from it.

Before I'll file the RFE, I'll make sure whether I need this action to
be present in 4.0, because the new projects will change the way how
the VCS modules are integrated.
The problem was: static TemplateWizard getWizard (Node n)
that does not enable to put a different wizard there.
Comment 16 Jiri Kovalsky 2003-02-19 10:54:59 UTC
Okay, I am verifying this issue in development build #200302190100 of
NetBeans 3.5.
Comment 17 David Kaspar 2003-02-19 16:51:50 UTC
Reopening - 100% reproducible in dev #200302190100.

Just have NB build and clean user_dir and immediatelly after IDE
starts select "Versioning|Mount Version Control menu item.

"Empty" menu item appears in "Versioning|Mount Version Control" menu
and  "VcsMountFromTemplateAction.MountMenu.getPopupMenu" method is NOT
called.

When you close menus and select "Versioning|Mount Version Control menu
item once again, all is ok and
"VcsMountFromTemplateAction.MountMenu.getPopupMenu" method IS called.
Comment 18 Jiri Kovalsky 2003-02-22 07:51:46 UTC
Confirming in #200302210100. This is very annoying issue and can't be
waived for Sun ONE Studio 5.0
Comment 19 Tomas Zezula 2003-02-27 14:17:26 UTC
Fixed
Comment 20 dmladek 2003-03-12 17:26:25 UTC
I'm sorry, even thought it seems fixed I have reopen it :-(
(seems to me that it is fixed only to dev and I need it also for 3.5
for which it was reported)

Reason:
=======
By hand is now hard to reproduce it, or your eye doesn't catch the
blink of empty menu item
But automatical tests are (discovering) reproducing it day by day and
failing :-( At least on branch 'release35' (test's results are
unfortunately not available at netbeans.org site for this branch)

(I'm sorry that reopening it so late  ... I was on vacation and ill so
I realy didn't time to check the result)

I decided make in my code some hacky WRKAROUND (like selecting other
items in different menu and going back... but as you see, it's not
pure & clean solution)

Thus I also decreasing the priority to say P3.

Daily Results are available at:
http://www.netbeans.org/download/xtest-results/

and one example for all is here:
http://ffjqa.czech.sun.com/automatedtests/xtest/netbeans_3.5/200303112350/qa-functional_validation/qa-fiji.czech/testrun_030312-061014/testbag_29/user/validation/JavaCVSValidationTest/testMount/screen.png
Comment 21 dmladek 2003-03-12 17:39:56 UTC
To clarify:
no NPE is throwing, but Empty item is still offered
Comment 22 Marian Mirilovic 2003-03-12 17:42:36 UTC
Dan, please have a look at issue 31152, it's about FS|Mount|empty.
Comment 23 dmladek 2003-03-12 18:16:05 UTC
Thank you Marian for pointing to that issue. I wrote there small comment.


BTW:
There is something unclear about where and when it was fixed....
IHMO, this bug was fixed only to dev not into 'release35` 
But time of fix is before branching AFAIK 
Fix is dated  to  2003-02-27 06:17 PST
and branch 'release35' was created 2003-02-28 I think.

So in this case fix must be in bouth branches, but behaviour points
that it isn't...

Comment 24 dmladek 2003-03-12 18:48:10 UTC
Manual reproduction on NB3.5-dev is quiet easy and reliable:
(in NBdev, it is unreproductable)

Just start ide (me and automat tests using SDI mode)
Do what ever you can and how long you wish (but don't mount anything!!!)
When you "play" enough, go to the MainMenu->Versioning->Mount Version
Control.
And you'll see "Empty" (sub/sub)menu item
Comment 25 Tomas Zezula 2003-03-13 15:20:16 UTC
Sorry for that.
This bug seems to be some kind of race condition in the MountView.Menu
or Nodes behind the MountView.Menu.
Dan Mladek is saying that it can be reproduced only in 3.5 branch in
main trunk it behaves fine.
The race condition causes, that sometimes appers "Empty" in the menu
instead of the required content. It is hard to debug, under a debuger
or when I put debug messages into the doSetKeys method it is nearly
unreproduceable.
I find out that the setKeys is done correctli with 2 keys, but the
menu displayes "Empty" :-(
Comment 26 David Konecny 2003-03-13 15:28:33 UTC

*** This issue has been marked as a duplicate of 31152 ***
Comment 27 dmladek 2003-07-08 19:01:28 UTC
ok. This is a dup