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 238093 - Exception at org.netbeans.modules.php.project.copysupport.CopySupport.assertProjectOpened
Summary: Exception at org.netbeans.modules.php.project.copysupport.CopySupport.assertP...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2013-11-07 13:00 UTC by Exceptions Reporter
Modified: 2013-12-14 05:10 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 205104


Attachments
stacktrace (1.13 KB, text/plain)
2013-11-07 13:00 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2013-11-07 13:00:11 UTC
This bug was originally marked as duplicate of bug 220893, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201308092300)
VM: OpenJDK Client VM, 23.7-b01, OpenJDK Runtime Environment, 1.7.0_25-b30
OS: Linux

User Comments:
qwerty7ng: System slow when existing project is opened

qwerty7ng: I noticd this error message after I accidentally shutdown or exit the NetBeans IDE

GUEST: delete the project file and change the them to dark

GUEST: Starting IDE

qwerty7ng: hh

GUEST: Launching netbeans

qwerty7ng: Too slow

GUEST: I've opened netBeans 7.1 RC (first open after instaled)

GUEST: I don't know




Stacktrace: 
java.lang.Exception
   at org.netbeans.modules.php.project.copysupport.CopySupport.assertProjectOpened(CopySupport.java:201)
   at org.netbeans.modules.php.project.copysupport.CopySupport.projectOpened(CopySupport.java:174)
   at org.netbeans.modules.php.project.PhpProject$PhpOpenedHook.projectOpened(PhpProject.java:839)
   at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:85)
   at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1230)
   at org.netbeans.modules.project.ui.OpenProjectList.access$1600(OpenProjectList.java:137)
Comment 1 Exceptions Reporter 2013-11-07 13:00:15 UTC
Created attachment 141938 [details]
stacktrace
Comment 2 Tomas Mysik 2013-12-10 09:29:42 UTC
From the IDE log:

INFO [org.netbeans.modules.php.project.copysupport.CopySupport]: Number of ProjectOpenedHook classes in project lookup: 1
INFO [org.netbeans.modules.php.project.copysupport.CopySupport]: Copy Support incorrectly opened/closed (opened: 2, closed: 0)

So, unless there is a bug in the CopySupport code, it seems to me that projectOpenedHook.projectOpened() has been called twice in a row, without calling projectClosed(). Reassigning to projects, please evaluate.

Thanks.
Comment 3 Milos Kleint 2013-12-13 08:41:55 UTC
this could be related to issue 238811, when a single project url appears multiple times in the list of projects, as stored in projectui.properties. I'm not yet aware how does one arrive at the situation though.
Comment 4 Tomas Mysik 2013-12-13 08:52:35 UTC
That would explain why it is a random issue. Thanks!
Comment 5 Milos Kleint 2013-12-13 09:19:38 UTC
another, likely legal case is in OpenProjectList.notifyOpened(). When projectOpened() throws runtimeexception or error, we remove it from the openedprojects list. So I suppose in that case it won't appear in opened projects after restart, but afterwards when manually opened, the POH is called again. If the exception is thrown after your multiple entry guard, the guard will trigger in this case as well.
Comment 6 Milos Kleint 2013-12-13 09:23:08 UTC
(In reply to Milos Kleint from comment #5)
> another, likely legal case is in OpenProjectList.notifyOpened(). When
> projectOpened() throws runtimeexception or error, we remove it from the
> openedprojects list. So I suppose in that case it won't appear in opened
> projects after restart, but afterwards when manually opened, the POH is
> called again. If the exception is thrown after your multiple entry guard,
> the guard will trigger in this case as well.

in this case there should be a relevant warning level log message logged in the messages file however.
Comment 7 Milos Kleint 2013-12-13 10:01:36 UTC
http://hg.netbeans.org/core-main/rev/df9d937d1f39

should handle all projectOpened() calls that come from initial project loading (loadOnBackground()). If there are exceptions that are coming from subsequent project opening, then we have a different problem here and the issue should be reopened.
Comment 8 Quality Engineering 2013-12-14 05:10:34 UTC
Integrated into 'main-silver', will be available in build *201312140002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/df9d937d1f39
User: Milos Kleint <mkleint@netbeans.org>
Log: #238093, #238811 if multiple entries point to the same project we end up with the same instance multiple times in the linked list, still not known what can cause the duplicate entries in the first place