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 31019 - NPE from NewTemplateAction
Summary: NPE from NewTemplateAction
Status: VERIFIED 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:
: 31023 31024 31105 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-02-13 09:37 UTC by Jiri Skrivanek
Modified: 2008-12-22 21:00 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE stack trace. (1.81 KB, text/plain)
2003-02-13 09:39 UTC, Jiri Skrivanek
Details
a proposed hotfix (1.51 KB, patch)
2003-02-13 10:43 UTC, Jiri Rechtacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2003-02-13 09:37:49 UTC
It started to happen after fix of #30986.
To reproduce:
- run IDE
- open popup menu on Filesystems node => NPE is
thrown (see att.)

Tested in build 200302130100, JDK1.4.1_01, Solaris.
Comment 1 Jiri Skrivanek 2003-02-13 09:39:25 UTC
Created attachment 8931 [details]
NPE stack trace.
Comment 2 Jiri Rechtacek 2003-02-13 09:59:46 UTC
The heart of problem is NewTemplateAction.getTemplateRoot() which
returns null. (an side effect of:
  User: dstrupl 
  Date: 03/02/12 09:21:40

  Modified:    src/org/openide/actions NewTemplateAction.java
  Log:
  #30986: Deadlock fixed by not calling getNodes(true) while holding
  Children.MUTEX.
)
Hint: rootFolder should be initialized, Davide, optionally contact me,
I investigate it.
Comment 3 Jiri Rechtacek 2003-02-13 10:43:00 UTC
Created attachment 8932 [details]
a proposed hotfix
Comment 4 Jiri Rechtacek 2003-02-13 10:48:27 UTC
I attached a hotfix which initialize rootFolder and setKeys not under
Mutex.readAccess. I fixes this problem.
Other hint: try avoid calling updateWizard under Mutex that the method
propertyChange does, Petr Nejedly recommends replace readAccess with
writeAccess, hope it helps.
Comment 5 Jiri Skrivanek 2003-02-13 12:14:11 UTC
*** Issue 31026 has been marked as a duplicate of this issue. ***
Comment 6 Marian Mirilovic 2003-02-13 12:23:28 UTC
*** Issue 31023 has been marked as a duplicate of this issue. ***
Comment 7 Marian Mirilovic 2003-02-13 12:23:57 UTC
*** Issue 31024 has been marked as a duplicate of this issue. ***
Comment 8 David Strupl 2003-02-13 12:37:10 UTC
Fixed in NewTemplateAction 1.75.
Comment 9 David Strupl 2003-02-13 13:15:15 UTC
Better fix (by jrechtacek) applied to NewTemplateAction.java 1.76 
Comment 10 Jiri Skrivanek 2003-02-13 19:13:27 UTC
Verified in build 20030213-1649.
Comment 11 Peter Zavadsky 2003-02-17 12:39:16 UTC
*** Issue 31105 has been marked as a duplicate of this issue. ***