Bug 248001 - AJDT hangs on the project build
Summary: AJDT hangs on the project build
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: UI (show other bugs)
Version: 1.5.3RC1   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: 1.6.4   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 261009 (view as bug list)
Depends on: 258325
Blocks:
  Show dependency tree
 
Reported: 2008-09-19 13:08 EDT by Alexander Gavrilov CLA
Modified: 2009-03-13 12:41 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Gavrilov CLA 2008-09-19 13:08:38 EDT
The version of AJDT installed through Eclipse Software Update via http://download.eclipse.org/tools/ajdt/34/update is not working for my project. Whenever I try to build the project, the build just stalls with the message "Invoking AspectJ Builder". The CPU utilization of the Eclipse process is close to 0%, if it does matter.

The last version of AJDT that worked for me is 1.6.0.200807041530. After that, any version of AJDT I tried to install exhibited the same "hang" behavior.
Comment 1 Andrew Eisenberg CLA 2008-09-19 13:43:26 EDT
Can you please attach a test case or a project that exhibits the behavior you are describing?  I will look into it.
Comment 2 Andrew Eisenberg CLA 2008-12-10 12:34:55 EST
Still a problem?
Comment 3 Alexander Gavrilov CLA 2008-12-10 12:44:30 EST
We have found the workaround for this issue. 

Problem was that we have Perforce plug-in installed and 'class' files are generated in the subfolder 'classes' of the project folder. Perforce plug-in tried to check-out all 'class' files whenever AJDT was called, even though these are not in the Perforce repository. It lead to the very long waiting times.

The workaround is adding the pattern '*/classes/*' into 'Ignored resources' tab of Perforce preferences.
Comment 4 Andrew Eisenberg CLA 2008-12-10 12:49:02 EST
Would it have made any difference if files in the classes folder were marked as "derived"?

Currently, AspectJ does not do this, but there is a bug 258325 on AspectJ for this to happen.
Comment 5 Alexander Gavrilov CLA 2008-12-10 12:59:28 EST
If marking resources as 'derived' would allow Perforce plug-in recognize them as  'non-addable' to the Perforce repository, then yes, it should help.
Comment 6 Andrew Eisenberg CLA 2008-12-10 13:17:11 EST
It's a conjecture, really.  Could you try it out by marking one of the 'classes' folders as derived and see if perforce still tries to add it?

Then we can be certain that the proposed fix will work.
Comment 7 Alexander Gavrilov CLA 2008-12-10 14:45:14 EST
Yes, it did work. I marked 'classes' folder as 'Derived' in 'Project Explorer'. After that, I was be able to build the project. 

The problem starts again when I use 'Clean Project' command. The 'classes' folder gets deleted by Eclipse. The newly created 'classes' folder is not marked as 'Derived'. Even though I can build the project the first time after 'clean', invoking the 'clean' command again does hang Eclipse as before.
Comment 8 Andrew Eisenberg CLA 2008-12-10 14:59:50 EST
Good, then we can be sure that this bug depends on bug 258325.

Thanks for looking into this.
Comment 9 Andrew Eisenberg CLA 2008-12-14 00:14:23 EST
The fix is in head and available from this update site:
http://download.eclipse.org/tools/ajdt/34/dev/noweaving

Will move it over to the jdt weaving branch soon.  

I believe that this will solve your problem because now all build artifacts are marked as derived (but not the output folder itself).  This is mimicking the behavior of JDT.

Would you please try it out and let me know if it is working for you?
Comment 10 Andrew Eisenberg CLA 2009-01-14 11:44:05 EST
*** Bug 261009 has been marked as a duplicate of this bug. ***
Comment 11 Andrew Eisenberg CLA 2009-01-14 12:20:29 EST
This fix has been committed to head and addresses the bug.