Bug 132884

Summary: NPE when open projects of newer versions
Product: cnd Reporter: alexandrov <alexandrov>
Component: ProjectAssignee: Thomas Preisler <thp>
Status: VERIFIED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: sustaining
Version: 6.x   
Target Milestone: 6.x   
Hardware: All   
OS: Linux   
Whiteboard: 61fixes1-fixed
Issue Type: DEFECT Exception Report:
Attachments: log with NPE

Description alexandrov 2008-04-15 14:13:50 UTC
Create any sample project on 6.1rc1
Try to open this project on 6.1 beta => attached NPE occurs
issue #114036 about the same problem but with the older versions of IDE in its summary and it's told there that NPE were
fixed before 6.1beta were released
Comment 1 alexandrov 2008-04-15 14:17:05 UTC
Created attachment 60206 [details]
log with NPE
Comment 2 alexandrov 2008-04-15 14:29:10 UTC
This problem is more critical for Sunstudio where Welcome project opens in IDE by default, so we can receive NPE just
starting IDE
Comment 3 Alexander Pepin 2008-04-15 14:46:03 UTC
A bit different NPE occured in SunStudio IDE based on NB6.0.1 when I tried to open a project modified with SS IDE base
on NB6.1 (preliminary build). First of all a message appeared saying that XML was created with a newer version, that's
OK. Then I close the project, delete it from console and restored original version (made with 6.0.1) from archive. When
I tried to open restored project I got the following NPE:
java.lang.NullPointerException
	at
org.netbeans.modules.cnd.makeproject.MakeProjectConfigurationProvider.addPropertyChangeListener(MakeProjectConfigurationProvider.java:80)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction.activeProjectChanged(ActiveConfigAction.java:380)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction.access$900(ActiveConfigAction.java:81)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction$3.propertyChange(ActiveConfigAction.java:129)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.netbeans.modules.project.ui.OpenProjectList.setMainProject(OpenProjectList.java:510)
	at org.netbeans.modules.project.ui.actions.OpenProject.actionPerformed(OpenProject.java:136)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
	at java.awt.Component.processMouseEvent(Component.java:6038)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
	at java.awt.Component.processEvent(Component.java:5803)
	at java.awt.Container.processEvent(Container.java:2058)
	at java.awt.Component.dispatchEventImpl(Component.java:4410)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Component.dispatchEvent(Component.java:4240)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
	at java.awt.Container.dispatchEventImpl(Container.java:2102)
	at java.awt.Window.dispatchEventImpl(Window.java:2429)
	at java.awt.Component.dispatchEvent(Component.java:4240)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

The new project appeared in the Projects tab as broken. It seems that NB tried to operate with a new project like with
old one (both projects had the same name). So I had to restart IDE to be able to open my correct project.
Comment 4 Alexander Pepin 2008-04-15 14:56:57 UTC
sorry, I unintentionally changed the priority set by Thomas
Comment 5 Thomas Preisler 2008-04-16 16:36:11 UTC
6.1 patch candidate. Need to have it fixed first though....
Comment 6 Thomas Preisler 2008-04-16 22:57:29 UTC
Fixed:

changeset:   78217:13c24f7d1e60
tag:         tip
user:        Thomas Preisler <thp@netbeans.org>
date:        Wed Apr 16 14:52:10 2008 -0700
summary:     132884 NPE when open projects of newer versions

Comment 7 Thomas Preisler 2008-04-16 23:24:39 UTC
changeset 13c24f7d1e60 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=13c24f7d1e60
description:
	132884 NPE when open projects of newer versions
Comment 8 alexandrov 2008-04-18 19:04:56 UTC
verified in trunk 200804180004
Comment 9 rbalada 2008-04-29 15:15:34 UTC
I've transplanted the changeset http://hg.netbeans.org/main?cmd=changeset;node=13c24f7d1e60
into release61_fixes repository as http://hg.netbeans.org/release61_fixes/rev/6003b544f88d

changeset:   77503:6003b544f88d
user:        Thomas Preisler <thp@netbeans.org>
date:        Wed Apr 16 14:52:10 2008 -0700
summary:     132884 NPE when open projects of newer versions
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo