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.
When I checkout a new project from subversion (Netbeans 5.5 projects to be specific); It keeps throwing java.lang.IllegalArgumentException error message Debug below: The following is for Web project, however similar error occured when I tried importing a Mobile Project as well. It seems to me that the project is being set as main project before its opened. But all in all once the Error box is dismissed; the project is loaded without any issues. If you need any further testing; do let me know, I am glad to help. SEVERE [global] java.lang.IllegalArgumentException: Project FarmLinxWeb is not open and cannot be set as main. at org.netbeans.modules.project.ui.OpenProjectList.setMainProject(OpenProjectList.java:474) at org.netbeans.modules.project.ui.actions.SetMainProject.actionPerformed(SetMainProject.java:70) at org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed(LookupSensitiveAction.java:139) at org.netbeans.modules.subversion.ui.checkout.CheckoutCompleted.openProject(CheckoutCompleted.java:211) at org.netbeans.modules.subversion.ui.checkout.CheckoutCompleted.actionPerformed(CheckoutCompleted.java:172) 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.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) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177) at java.awt.Dialog$1.run(Dialog.java:1039) at java.awt.Dialog$3.run(Dialog.java:1091) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1089) at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:812) at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:846) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:834) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:82) at org.openide.util.Mutex.doEventAccess(Mutex.java:1201) at org.openide.util.Mutex.readAccess(Mutex.java:220) at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:819) at java.awt.Component.show(Component.java:1419) at java.awt.Component.setVisible(Component.java:1372) at java.awt.Window.setVisible(Window.java:801) at java.awt.Dialog.setVisible(Dialog.java:979) at org.netbeans.modules.subversion.ui.checkout.CheckoutCompleted$1.run(CheckoutCompleted.java:154) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) 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)
Forgot to add that I am using Netbeans 6.0 M9. R.
Oops just noticed that the Project did not open automatically... I may have been looking at another project with a similar name. R.
Please could you sumarize your problem? Describe all steps. You used NB6.0M9 to checkout project from subversion repository, the project was created in NB5.5 and you got the exception during opening the project? Did you have the project already opened? What type of project was it? Thanks
Created attachment 42374 [details] OpenOffice Document describing the bug.
Its a new installation. The SVN sources did get imported into a New Directory. So no conflcts. But once I clicked on open project > the error came up. However this time around when I tried to repeat the same steps Netbeans as a whole crashed. I am able to open the projects once restarted without any issues.
Do you have any new exception from the crash? What type of project is the FMCGLinxMobile project is it j2me project? Are you able to reproduce the problem when starting IDE with clean userdir? To do so provide different userdir on cmd line when starting IDE via argument --userdir 'some dir'.
I am sorry I thought I updated the issue; looks like I missed it. When I used the --userdir argument, it worked just great! I am wondering what went wrong, as I mentioned its a new installation. May be my trials with earlier versions of 6.0 did some corruption.
Does it mean that you are reusing one userdir for couple or previous NB 6.0 verions? If it's the case then it's not supported and you might hit various problems.
This is a fresh and clean installation in a new directory, if I remember it right the .netbeans directory for earlier versions was in the dev folder not the 6.0m9. I apologize for missing the log as I found it got overwritten somehow. I have repeated the same steps on my earlier userdir and I get the following error again. This project is a web project again; Please read below the error for the Mobile Project (Which is different) ---------------------------------------------- WEB Project Error SEVERE [global] java.lang.IllegalArgumentException: Project FI is not open and cannot be set as main. at org.netbeans.modules.project.ui.OpenProjectList.setMainProject(OpenProjectList.java:474) at org.netbeans.modules.project.ui.actions.SetMainProject.actionPerformed(SetMainProject.java:70) at org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed(LookupSensitiveAction.java:139) at org.netbeans.modules.subversion.ui.checkout.CheckoutCompleted.openProject(CheckoutCompleted.java:211) at org.netbeans.modules.subversion.ui.checkout.CheckoutCompleted.actionPerformed(CheckoutCompleted.java:172) 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.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) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177) at java.awt.Dialog$1.run(Dialog.java:1039) at java.awt.Dialog$3.run(Dialog.java:1091) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1089) at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:812) at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:846) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:834) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:82) at org.openide.util.Mutex.doEventAccess(Mutex.java:1201) at org.openide.util.Mutex.readAccess(Mutex.java:220) at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:819) at java.awt.Component.show(Component.java:1419) at java.awt.Component.setVisible(Component.java:1372) at java.awt.Window.setVisible(Window.java:801) at java.awt.Dialog.setVisible(Dialog.java:979) at org.netbeans.modules.subversion.ui.checkout.CheckoutCompleted$1.run(CheckoutCompleted.java:154) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) 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) SEVERE [global] java.lang.NullPointerException at org.openide.windows.WindowManager.findTopComponentID(WindowManager.java:491) at org.netbeans.core.windows.model.TopComponentSubModel.getID(TopComponentSubModel.java:337) at org.netbeans.core.windows.model.TopComponentSubModel.containsTopComponent(TopComponentSubModel.java:232) at org.netbeans.core.windows.model.DefaultModeModel.containsTopComponent(DefaultModeModel.java:238) at org.netbeans.core.windows.model.DefaultModel.containsModeTopComponent(DefaultModel.java:777) at org.netbeans.core.windows.Central.containsModeTopComponent(Central.java:1357) at org.netbeans.core.windows.ModeImpl.containsTopComponent(ModeImpl.java:342) at org.netbeans.core.windows.WindowManagerImpl.isEditorTopComponent(WindowManagerImpl.java:1206) at org.netbeans.modules.visualweb.insync.ModelSet$WindowManagerPropertyRegistry.propertyChange(ModelSet.java:133) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) at org.netbeans.core.windows.RegistryImpl.doFirePropertyChange(RegistryImpl.java:292) at org.netbeans.core.windows.RegistryImpl.tryFireChanges(RegistryImpl.java:265) at org.netbeans.core.windows.RegistryImpl.selectedNodesChanged(RegistryImpl.java:211) at org.netbeans.core.windows.RegistryImpl.topComponentActivated(RegistryImpl.java:148) at org.netbeans.core.windows.WindowManagerImpl.notifyRegistryTopComponentActivated(WindowManagerImpl.java:972) at org.netbeans.core.windows.Central.setModeSelectedTopComponent(Central.java:687) at org.netbeans.core.windows.Central.userActivatedTopComponent(Central.java:1728) at org.netbeans.core.windows.view.DefaultView.userSelectedTab(DefaultView.java:621) at org.netbeans.core.windows.view.ui.TabbedHandler.stateChanged(TabbedHandler.java:266) [catch] at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:101) at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:87) at org.netbeans.core.windows.view.ui.slides.TabbedSlideAdapter.postSelectionEvent(TabbedSlideAdapter.java:152) at org.netbeans.core.windows.view.ui.slides.SlideBar.stateChanged(SlideBar.java:236) at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:116) at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:50) at org.netbeans.core.windows.view.ui.slides.SlideBar.userClickedSlidingButton(SlideBar.java:299) at org.netbeans.core.windows.view.ui.slides.SlideGestureRecognizer.actionPerformed(SlideGestureRecognizer.java:88) 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.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:291) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) 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) 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) -------------------------------- Error while opening A SVN Mobile Project SEVERE [org.openide.util.RequestProcessor] java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:537) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:535) at org.openide.util.Mutex.readAccess(Mutex.java:269) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper.getBuildScriptState(GeneratedFilesHelper.java:534) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$3.run(GeneratedFilesHelper.java:755) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$3.run(GeneratedFilesHelper.java:754) at org.openide.util.Mutex.writeAccess(Mutex.java:357) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper.refreshBuildScript(GeneratedFilesHelper.java:753) at org.netbeans.modules.mobility.project.J2MEProject$6.run(J2MEProject.java:501) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)
Can you attach at least any other ide log from the same IDE? It might help. Don't you have multicore machine with hyperthreading on?
*** Issue 104338 has been marked as a duplicate of this issue. ***
Since the issue is impossible to reproduce I added some logging to better diagnose the problem. Add following line on cmd line when starting ide: -J-Dorg.netbeans.modules.project.ui.OpenProjectList.level=10 to enable logging or add it to the end of line "netbeans_default_options=" in etc/netbeans.conf under NB install dir. Checking in OpenProjectList.java; /cvs/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java,v <-- OpenProjectList.java new revision: 1.69; previous revision: 1.68 done
I forgot to mention that when it happens again attach the log to this issue. Logging should be available on next dev build of NB 6.0.
*** Issue 108366 has been marked as a duplicate of this issue. ***
Is there anybody from reporters who could try to run IDE with the logging on and attach the log?
I will try this. Do you want me to check on m9 or m10? I have been using m10 in the recent past, and I haven't got this error (But lots of other errors) R.
Please try M10, it contains logging (or you can use trunk build). Sending log file makes only sense if you happen to reproduce the issue. Thanks.
One more call: Is there anybody from reporters who could try to run IDE with the logging on and attach the log after the error happens? Thanks
Lowering priority, since it's random issue, no way to reproduce was provided and reporters didn't provide more info.
*** Issue 114807 has been marked as a duplicate of this issue. ***
*** Issue 115536 has been marked as a duplicate of this issue. ***
Issue #115536 (duplicate of this one) is 100% reproducible with clean user dir, on single-core Linux, dual-core Windows XP. Just try to create Identity blueprint sample project. I've tried it with latest daily build of FULL IDE, with command line parameters suggested by you. I'll attach messages.log.
Created attachment 48837 [details] complete log
If this is really the same issue as Issue #115536 then it should definitely have higher priority than P3.
Setting back to P3 since the duplicate issue turned to be a different problem.
Build: NetBeans IDE Dev (Build 200709190000) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06 OS: Windows XP, 5.1, x86 User Comments: creating new stock client example
Created attachment 49304 [details] stacktrace
Build: NetBeans IDE Dev (Build 200709190000) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06 OS: Windows XP, 5.1, x86 User Comments: regenerate stock client example
Created attachment 49307 [details] stacktrace
Last reports are in fact covered by issue #115536.
Build: NetBeans IDE Dev (Build 200707160000) VM: Java HotSpot(TM) Client VM, 1.6.0-beta2-b86 OS: Linux, 2.6.22.4-65.fc7, i386 User Comments:
Created attachment 50419 [details] stacktrace
Build: NetBeans IDE 6.0 Beta 1 (Build 200709141330) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06 OS: Windows XP, 5.1, x86 User Comments:
Created attachment 50427 [details] stacktrace
Created attachment 50434 [details] stacktrace
Without any comments those reported stack traces are useless.
THIS ISSUE HAS 5 MORE DUPLICATES
Please provide steps to reproduce or at least describe what you were doing when the exc. was thrown. Thanks
I had the same problem when opening a project - I reported (anonymous) bug few minutes ago. Problem occurs, when you have opened projects in workspace. When opening next one - the error occurs. Project I tried to open was previously opened in NB without any errors. This is a Maven2 project, checked out from Subversion repository using built-in SVN client. I removed the content of $USER_HOME\.netbeans\6.0\var\cache\ but it changed nothing.
When I removed bundled Tomcat container from servers the project opened without any problems. Project was attached (when it was opened for first time) to Tomcat (project properties -> RUN tab).
90 reports in exceptions DB so far ...
the mentioned exception stacktrace that aggregates the reports to look like duplicates is actually just a result of various different issues that happen within the project opening loop, most frequently in the OpenProjectHook's projectOpened() callback. I suggest we only fix the reporting problem somehow to get the real sources of exceptions.
THIS ISSUE HAS ALREADY 100 DUPLICATES
I've improved exceptions reporting from openProjectHook, so we'll see where are those exceptions really coming from. http://hg.netbeans.org/main/rev/83da4029a17a
No need for assertion trick, logging with Level.WARNING does the same. http://hg.netbeans.org/main/rev/7eb007a6d8f8
Build: NetBeans IDE Dev (Build 200803111205) VM: Java HotSpot(TM) Client VM, 1.5.0_13-119 OS: Mac OS X, 10.5.2, i386 User Comments: I have created a project X, imported in in the repository, then I copied it into a new directory in "Branches" folder, then switched to the copy. Half of the files disappeared from the project (I got a SVN warning about locally modified files). So I closed the project (there was "???" in "File" menu instead of the project name) and attempted to reopen X again (from local copy).
Created attachment 58250 [details] stacktrace
Please provide whole ide.log file, very probably there was some other exception before this one that caused it. Thanks.
Build: NetBeans IDE Dev (Build 200803261205) VM: Java HotSpot(TM) 64-Bit Server VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13 OS: Linux, 2.6.22-14-generic, amd64 User Comments: After NPE during opening of project (xtest from our repository - see issue 131295 I got another exception ...
Created attachment 59210 [details] stacktrace
This exception is caused by the NPE.
moving opened issues from TM <= 6.1 to TM=Dev
the issue has 159 duplicates. Marking as candidate for 61 patch1
OK then, please get at least couple messages.log files from all those duplicates. IAE is only result of some other exception happening before that.
Build: NetBeans IDE Dev (Build 080428) VM: Java HotSpot(TM) Client VM, 1.5.0_13-119, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05-237 OS: Mac OS X, 10.5.2, i386 User Comments: opening web project
Created attachment 60750 [details] stacktrace
Please provide whole ide.log file IAE is only result of some other exception happening before that.
Created attachment 60787 [details] exception logs from latest reports at exceptionreporter. It isn't very readable in the XML however you asked for it Milane. Go ahead and evaluate, please. More details can be found at the URL and XML view on the log. HTH
Created attachment 62262 [details] stacktrace
Better logging will be provided for patch3 as Milan promised. Changing the status whiteboard accordingly.
*** Issue 135550 has been marked as a duplicate of this issue. ***
The problem of this issue is exceptions reporter and handling of XML file on the server. The exception that is reported is in fact result of other exception that is thrown prior that and statistics server reports only *last* exception as the main one. The real exception is logged as WARNING (http://hg.netbeans.org/main/rev/83da4029a17a, http://hg.netbeans.org/main/rev/7eb007a6d8f8) so it should be reported as well, but it is in fact "overriden" by the last one. I've looked at couple of last reports and filed following issues that were real cause of the failure: Most failures: NPE from org.openoffice.extensions.util.ProjectTypeHelper http://www.netbeans.org/issues/show_bug.cgi?id=137404 http://www.netbeans.org/issues/show_bug.cgi?id=137409 http://www.netbeans.org/issues/show_bug.cgi?id=137410 I don't see any real solution of this issue on side on projects/ui side. Duplicate issue #135550 had priority of P1, but I don't consider it as adequate since the problem is in bug reporting infrastructure and should be fixed there. Leaving the issue opened until solved in bug reporting infrastructure.
Exceptions reporter functionality was extended to allow to ignore some exception by prepending NB_REPORTER_IGNORE to exception message. http://hg.netbeans.org/main/rev/9db6e4cb6089
I don't like this fix. Leave the IAE alone; fix whatever code is calling OPL.sMP (NewProject, OpenProject) to check the precondition and not try to call it if the argument is not open, or if that is not possible (e.g. due to race conditions), catch the IAE and log it at INFO or lower. Perhaps the problem (beyond the specific root problems with e.g. OO.o projects) is some poor error handling earlier in the projectui infrastructure before OPL.sMP; perhaps some exceptions are caught and reported but then processing of an action's logic incorrectly continues.
> perhaps some exceptions are caught and reported but then processing of an action's logic incorrectly continues. That's exactly what's happening there and it's actually your code that does following: try { ProjectOpenedTrampoline.DEFAULT.projectOpened(hook); } catch (RuntimeException e) { LOGGER.log(Level.WARNING, null, e); // Do not try to call its close hook if its open hook already failed: INSTANCE.openProjects.remove(p); INSTANCE.removeModuleInfo(p); ok = false; } catch (Error e) { LOGGER.log(Level.WARNING, null, e); INSTANCE.openProjects.remove(p); INSTANCE.removeModuleInfo(p); ok = false; } I just changed logging from ErrorManager to Logger. We shouldn't probably catch RuntimeExceptions. I supposed this code is there on some purpose.(?)
The catching of errors from ProjectOpenedHook is natural - any code calling hooks should do this. I don't think that's the problem. My current guess is that error reporting is not the issue at all; OpenProject.actionPerformed is just mistaken in assuming that OPL.open is really done when the call returns. It calls OPL.sMP right after calling OPL.open(..., /*asynch*/true). How can this guarantee that the desired main project is actually opened by the time sMP is called, if the projects are to be opened asynchronously? Same with NewProject (the other stack trace here). It seems the only reason it (usually) works is that OPL.open creates a dialog window which is not supposed to be closed until doOpen has finished, and setVisible(false) blocks on a modal dialog, which all feels rather fragile. In fact if you add OPENING_RP.post(new Runnable() { public void run() { { // XXX added for debugging dialog.setVisible(false); try {Thread.sleep(1000);} catch (InterruptedException x) {} } try { doOpen(projects, openSubprojects, handle, panel); then after opening a project as main you in fact get the exception of this issue. I would suggest changing OpenProjectList.open to take a parameter Project/*|null*/ mainProject which if not null (must be an element of 'projects' param) would be set as main after the projects were opened, i.e. inside the OPENING_RP task, and use this in OpenProject and NewProject rather than calling sMP as a separate step.
Better fix. Jesse, thanks for suggestions. http://hg.netbeans.org/main/rev/fc2f87a798bb
Created attachment 63011 [details] stacktrace
Mariane, it seems that you have build without last changes, stack trace doesn't match current sources. Let's wait for next dev build with the last fix to test if it's still reproducible. Next time this happens, please attach *complete* ide.log file. Thanks.
*** Issue 130122 has been marked as a duplicate of this issue. ***
As the nomination process goes forward with NetBeans 6.1 Patch 3 and beyond, low priority defects from P3 to P5 should include a justification and a safety assessment when nominated for patch inclusion. Could QE provide that info? Also please note that the NB 6.1 Patch3 nomination cut-off is on COB of Aug 5. Unverified bugfixes don't get into this patch.
verified there is ~850 duplicates but none after the latest fix. The number of duplicate reports in the exception reporter should be enough for justification of this issue for patch.
Changesets 83da4029a17a and 7eb007a6d8f8 were already part of release61_fixes repository (originally from trunk/release61 repository). I've transplanted another two changesets in following way http://hg.netbeans.org/main/rev/9db6e4cb6089 as http://hg.netbeans.org/release61_fixes/rev/200f15783bf5 http://hg.netbeans.org/main/rev/fc2f87a798bb as http://hg.netbeans.org/release61_fixes/rev/38747b980305
*** Issue 142911 has been marked as a duplicate of this issue. ***
verified in patch3 (2008-08-12_03-59-31), i'm not able to reproduce
Seemingly related issues (what is the relationship among them?): issue #139965, issue #141766, issue #141242.
*** Issue 155273 has been marked as a duplicate of this issue. ***