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 125965 - NullPointerException at javax.faces.component.UIComponentBase.getRenderer
Summary: NullPointerException at javax.faces.component.UIComponentBase.getRenderer
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Winston Prakash
: 125333 (view as bug list)
Depends on:
Reported: 2008-01-24 23:44 UTC by _ krystyna
Modified: 2008-01-30 17:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 22173

stacktrace (2.45 KB, text/plain)
2008-01-24 23:44 UTC, _ krystyna
screenshot (165.71 KB, image/jpeg)
2008-01-24 23:55 UTC, _ krystyna

Note You need to log in before you can comment on or make changes to this bug.
Description _ krystyna 2008-01-24 23:44:42 UTC
Build: NetBeans IDE Dev (Build 20080124125258)
VM: Java HotSpot(TM) Client VM, 10.0-b19
OS: Windows XP, 5.1, x86

User Comments: 
-grabbing resize handles of Woodstock button in attempt to widen
Comment 1 _ krystyna 2008-01-24 23:44:46 UTC
Created attachment 55540 [details]
Comment 2 _ krystyna 2008-01-24 23:54:13 UTC
I also lost completely the woodstock suntheme in designer as a consequence
of this. Attaching screenshot. Will attempt to reproduce.
Comment 3 _ krystyna 2008-01-24 23:55:01 UTC
Created attachment 55541 [details]
Comment 4 Peter Zavadsky 2008-01-24 23:57:26 UTC
This issue was already filed before, so this is a duplicate. Passing to insync (setting the context classloader, which
should assure this NPE won't happen).

But here are more info:
This issue caused the themes of the components to be gone. Also Krys, is trying to get reproducible case.
Comment 5 _ krystyna 2008-01-24 23:59:40 UTC
Note, this happens in trunk. (Exceptions reporter is defaulting to 6.0)
Here is build info:

: NetBeans IDE Dev (Build 20080124125258)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1
Comment 6 _ krystyna 2008-01-25 02:32:04 UTC
I have found a simple reproducible cases that outputs about multiple
NPE at javax.faces.component.UIComponentBase.getRenderer, hence making this a P2.

To reproduce:

1. Restart ide and create a vw ee5 project
2. Drop a textfield component
3. Create a second vw ee5 project and also drop a textfield 
4. File -> close "webappXX" that second project. 
5. The first project is now fronted, click on Page1 tab of first project
6. Then drag and drop another component from palette to designer
> will get 3 or more NPE's (depending on the component dropped)

I've reproduced this at least 5 times in case you have any problems reproducing.

Comment 7 _ sandipchitale 2008-01-25 19:15:13 UTC
Looks like the facesContext.release() call introduced in the FacesContainer.destroy() for a memory leak fix may have
exposed this. The right fix may be to add a new method in FacesContainer which for wraps the
javax.faces.component.UIComponentBase.getRendersChildren() and takes care of setting up the FacesContext etc. That is
the method that should be used by Designer code.
Comment 8 Winston Prakash 2008-01-25 19:35:07 UTC
For now I'm reverting back the Fix for memory leak to fix this bug.
We need to understand the implications of the memory leak fix first.

Comment 9 _ krystyna 2008-01-29 00:16:03 UTC
update: trunk NetBeans IDE Dev (Build 200801271318) with reverted fix. The
NPE's are gone as a result of the given scenario, but further testing, i.e a third project
created and closed show the same loss of theme in designer. No NPEs however.

The base issue however exists in 6.1M1 and we need a better workaround than restart
of the IDE: refresh designer does not help.
Comment 10 _ krystyna 2008-01-30 00:44:35 UTC
*** Issue 125333 has been marked as a duplicate of this issue. ***
Comment 11 Winston Prakash 2008-01-30 04:38:09 UTC
Fixed by reverting the Memory Leak fix
Comment 12 _ krystyna 2008-01-30 17:48:11 UTC
Marking verified for NPE; original memory leak
issue is under bug