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 119827 - IAE from SearchInfoFactory.createSearchInfo after deleting package
Summary: IAE from SearchInfoFactory.createSearchInfo after deleting package
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2007-10-23 18:42 UTC by Jesse Glick
Modified: 2008-03-25 16:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (2.53 KB, text/plain)
2007-10-23 18:42 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2007-10-23 18:42:36 UTC
071023. Had added JavaHelp to a standalone module; then selected the package containing the JavaHelp in the Projects tab
and deleted it.
Comment 1 Jesse Glick 2007-10-23 18:42:59 UTC
Created attachment 51520 [details]
Stack trace
Comment 2 Tomas Zezula 2007-10-24 08:27:07 UTC
Milan is responsible for PackageView
Comment 3 Milan Kubec 2007-10-30 10:49:00 UTC
I assume it's not reproducible.
Comment 4 Jesse Glick 2007-10-30 12:23:08 UTC
I was not able to reproduce it just now, probably a race condition.
Comment 5 Milan Kubec 2008-03-05 15:21:09 UTC
I think it should be handled in SearchInfoFactory by checking if fo.isValid() before creating SimpleSearchInfo. Please
evaluate. Thanks.
Comment 6 Tomas Pavek 2008-03-21 15:15:50 UTC
Looks really like a race condition. PackageViewChildren.createNodes checks if the folder is valid, but when PackageNode
later calls SearchInfoFactory, the folder is not valid anymore - so it had to be deleted in the meantime. But
SearchInfoFactory can't do anything reasonable if given a folder that is not valid - it can't return null, throwing
exception does not solve anything... To me it looks like PackageViewChildren should perhaps lock the folder to make sure
it is not deleted during creating PackageNode (or at least when calling SearchInfoFactory).
Comment 7 Jan Lahoda 2008-03-21 16:11:38 UTC
I do not think the folder can be locked in order not to be deleted/become invalid. SearchInfoFactory could return no-op
SearchInfo for invalid folders.
Comment 8 Milan Kubec 2008-03-25 15:39:17 UTC
Reassigning back, see jlahoda's comment.
Comment 9 Marian Petras 2008-03-25 16:28:04 UTC
Fixed.

Modified file:
    o.openidex.util/src/org/openidex/search/SearchInfoFactory.java

Changeset Id:
bc10056e03e6
(http://hg.netbeans.org/main/dev/bc10056e03e6)
Comment 10 Marian Petras 2008-03-25 16:29:35 UTC
Correction - the link to the changeset is http://hg.netbeans.org/main/dev/bc10056e03e6
Comment 11 Marian Petras 2008-03-25 16:30:06 UTC
Correction - the link to the changeset is http://hg.netbeans.org/main/rev/bc10056e03e6