Bug 228529 - [buildpath] External class file folders are sometimes empty
Summary: [buildpath] External class file folders are sometimes empty
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.5 M2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-23 17:29 EDT by Olivier Thomann CLA
Modified: 2008-09-15 09:59 EDT (History)
3 users (show)

See Also:


Attachments
Logs (60.80 KB, application/octet-stream)
2008-04-23 22:12 EDT, Olivier Thomann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2008-04-23 17:29:16 EDT
I am using the latest build and inside a self-hosting workspace I checked out org.eclipse.jdt.ui.

Sometimes (looks like a timing issue), I end up with empty external class file folders for the jdt.ui dependent plugins that we loaded in the workspace I used to start the self-hosting workspace.

The end result of this is that API tooling is completely broken as it cannot initialize properly the api profiles used for the comparison and it ends up reporting lot of problems that don't really exist.
Comment 1 Olivier Thomann CLA 2008-04-23 17:30:54 EDT
Sometimes when I close and reopen the project, the PDE container is then properly initialized. This doesn't work all the times.
If I know where the external class file folders are populated, I might be able to debug the problem since I do get it regularly.
Comment 2 Jerome Lanneluc CLA 2008-04-23 17:53:40 EDT
To debug it, see org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(IContainer, boolean, String[], ArrayList, char[][], char[][])

The pkg fragment root should be an instance of ExternalPackageFragmentRoot.
Comment 3 Olivier Thomann CLA 2008-04-23 21:20:20 EDT
Something is wrong since I never enter this method. I'll continue to investigate.
Comment 4 Olivier Thomann CLA 2008-04-23 22:12:04 EDT
Created attachment 97345 [details]
Logs

These are two logs.
classpath_init.txt is a log when the PDE container could not be properly initialized.
classpath_init2.txt is the same log + all the logged event after the project was closed and reopened. After this, the PDE container was properly initialized. Hopefully this will help to track this down.
Comment 5 Jerome Lanneluc CLA 2008-04-24 05:17:25 EDT
These 2 logs show that the container intialization was successful. The problem seems to be in the root's chidren calculation. I was expecting that you would hit computeFolderChildren(). But it looks like something went wrong before. 

So let's start at an earlier point. Can you please put a breakpoint in org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(Object, IProgressMonitor) ? And activate this brekpoint for the external root only.
Comment 6 Philipe Mulet CLA 2008-05-16 04:36:40 EDT
Is this still critical for 3.4 ?
Comment 7 Olivier Thomann CLA 2008-05-16 07:32:33 EDT
This is critical when it happens. It would be nice to be able to reproduce this.
Comment 8 Jerome Lanneluc CLA 2008-05-21 05:39:05 EDT
According to bugzilla's help, "critical" corresponds to "crashes, loss of data, severe memory leak". This bug doesn't correspond to this description of "critical". "major" seems more appropriate as it corresponds to "major loss of function". Lowering severity then.

Also note that there is no other report of this bug, so it is going to be hard to debug as it looks like it is very specific to your setup. Maybe you can start Eclipse with the following VM argument: "-agentlib:jdwp=transport=dt_socket,suspend=n,server=y,address=51001"
and contact me when it happens. I'll try to connect to your machine and debug it.
Comment 9 Jerome Lanneluc CLA 2008-09-02 04:43:11 EDT
Olivier, does this still happen?
Comment 10 Olivier Thomann CLA 2008-09-02 09:24:15 EDT
I am not using this setting right now.
Comment 11 Jerome Lanneluc CLA 2008-09-05 09:55:30 EDT
Closing for now. Please reopen if you see it again.
Comment 12 Olivier Thomann CLA 2008-09-15 09:59:16 EDT
Verified for 3.5M2 using I20080914-2000