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 182069 - Duplicate file object, duplicate FileName
Summary: Duplicate file object, duplicate FileName
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 179655 180388 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-15 19:08 UTC by budgie67
Modified: 2010-06-15 23:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 166458


Attachments
stacktrace (4.64 KB, text/plain)
2010-03-15 19:08 UTC, budgie67
Details

Note You need to log in before you can comment on or make changes to this bug.
Description budgie67 2010-03-15 19:08:00 UTC
This bug was originally marked as duplicate of bug 122295, 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 201003110200)
VM: Java HotSpot(TM) Client VM, 14.3-b01, Java(TM) SE Runtime Environment, 1.6.0_17-b04
OS: Windows XP

User Comments:
budgie67: After xml file was opened




Stacktrace: 
java.lang.IllegalArgumentException: Duplicate in children list: D:/Users/Tomek/Moje dokumenty/NetBeansProjects/echo-sport-1.x/view/echo/userfiles/doc_images/_big/image-58.jpg
Children: [MasterFileObject[D:\Users\Tomek\Moje dokumenty\NetBeansProjects\echo-sport-1.x\view\echo\userfiles\doc_images\_big\image-10.jpg@1c15cd0:14cdeb0,valid=true], MasterFileObject[D:\Users\Tomek\Moje dokumenty\NetBeansProjects\echo-sport-1.x\view\echo\userfiles\doc_images\_big\image-100.jpg@1b463c4:1da7e1b,valid=true], MasterFileObject[D:\Users\Tomek\Moje dokumenty\NetBeansProjects\echo-sport-1.x\view\echo\userfiles\doc_images\_big\image-101.jpg@209f2:190f782,valid=true], MasterFileObject[D:\Users\Tomek\Moje dokumenty\NetBeansProjects\echo-sport-1.x\view\echo\userfiles\doc_images\_big\image-102.jpg@1db0da5:b6377c,valid=true], MasterFileObject[D:\Users\Tomek\Moje dokumenty\NetBeansProjects\echo-sport-1.x\view\echo\userfiles\doc_images\_big\image-11.jpg@5ce11a:12c5383,valid=true], MasterFileObject[D:\Users\Tomek\Moje dokumenty\NetBean
   at org.openide.filesystems.Ordering.getOrder(Ordering.java:98)
   at org.openide.filesystems.FileUtil.getOrder(FileUtil.java:2044)
   at org.openide.loaders.FolderList.carefullySort(FolderList.java:640)
   at org.openide.loaders.FolderList.getObjects(FolderList.java:597)
   at org.openide.loaders.FolderList.access$200(FolderList.java:74)
   at org.openide.loaders.FolderList$1.run(FolderList.java:343)
Comment 1 budgie67 2010-03-15 19:08:05 UTC
Created attachment 95212 [details]
stacktrace
Comment 2 Jaroslav Tulach 2010-03-16 14:33:53 UTC
Log file at #353266 exception report shows that there is duplicated item for image-58.jpg:

[_big\image-58.jpg@1d7a25b:af47f8,valid=true]
[_big\image-58.jpg@1e4230e:1cb05b9,valid=true]

both hashcodes are different. This means that the file object itself is different:
  String mineHex = Integer.toHexString(System.identityHashCode(this));
as well as internal filename is different:
  String fnHex = Integer.toHexString(System.identityHashCode(getFileName()));

I don't think there shall be two different name objects for the same file. So it seems to indicate the bug is in FileName cache(!?). CCing Radek Matouš.
Comment 3 Jaroslav Tulach 2010-03-16 14:35:46 UTC
*** Bug 180388 has been marked as a duplicate of this bug. ***
Comment 4 Quality Engineering 2010-03-19 05:10:50 UTC
Integrated into 'main-golden', will be available in build *201003190200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/691904c7af0a
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #182069: Ensuring access to nameMap is always under proper lock. Probably not full fix, but a step forward.
Comment 5 Jaroslav Tulach 2010-04-01 21:15:19 UTC
Looks fixed. No new report since the last improvement in synchronization.
Comment 6 Jesse Glick 2010-06-15 23:40:04 UTC
*** Bug 179655 has been marked as a duplicate of this bug. ***