Bug 369170 - Exceptions on eclipse startup.
Summary: Exceptions on eclipse startup.
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.12   Edit
Hardware: All All
: P3 major with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 23:21 EST by Andrei Sobolev CLA
Modified: 2012-06-18 06:54 EDT (History)
3 users (show)

See Also:


Attachments
org.aspectj.weaver.World$TypeMap.demote ConcurrentModification exception (8.48 KB, text/plain)
2012-01-19 23:21 EST, Andrei Sobolev CLA
no flags Details
NPE in org.aspectj.weaver.UnresolvedType.forSignature (12.91 KB, text/plain)
2012-01-19 23:22 EST, Andrei Sobolev CLA
no flags Details
Exceptions at Eclipse startup (14.01 KB, text/plain)
2012-06-14 13:22 EDT, Vladimir Nicolici CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Sobolev CLA 2012-01-19 23:21:56 EST
Created attachment 209786 [details]
org.aspectj.weaver.World$TypeMap.demote ConcurrentModification exception

Hi,

Following exceptions are happen periodically then starting Eclipse with weaving enabled.

The World$TypeMap.demote() related one is most annoying :-(

Problem is relevant for aspectj weaver in AJDT 2.1.3 and latest dev version.

If you need some additional information, please ask.

Thanks,
Andrey.
Comment 1 Andrei Sobolev CLA 2012-01-19 23:22:28 EST
Created attachment 209787 [details]
NPE in org.aspectj.weaver.UnresolvedType.forSignature
Comment 2 Andrew Clement CLA 2012-01-20 14:34:36 EST
possibly this particular concurrentmodificationexception could be worked around by turning off type demotion in the weaver - this option in one of the aop.xml files being used: -Xset:typeDemotion=false

However, that is basically a workaround for the more fundamental issue that two threads appear to be in the same weaver, which is not allowed.  (the UnresolvedType NPE could be a different manifestation of this same issue - one thread hasn't yet set the signature whilst the second thread is attempting to process it).
Comment 3 Andrew Eisenberg CLA 2012-02-15 12:09:48 EST
Andy, Is this an aspectj bug?
Comment 4 Andrew Eisenberg CLA 2012-02-29 18:52:51 EST
Converting to an AspectJ bug.
Comment 5 Andrew Clement CLA 2012-03-01 11:42:25 EST
the load time weaving used to modify eclipse on startup appears to be bypassing the guards that prevent two threads in the same weaver instance.  I can't fix the weaver as it was just never designed to support this.  To do anything here we would need to look at how the weaver is kicked off from equinox weaving and why it is skipping the classloader locks.
Comment 6 Vladimir Nicolici CLA 2012-06-14 13:22:23 EDT
Created attachment 217372 [details]
Exceptions at Eclipse startup

I have similar problems at Eclipse startup. NullPointerException and ConcurrentModificationException in aspectj.weaver code.
Comment 7 Andrew Eisenberg CLA 2012-06-14 13:56:30 EDT
It looks like you have Eclipse 3.7.2, is this right?  Also, what version of AJDT are you using?
Comment 8 Vladimir Nicolici CLA 2012-06-14 15:17:17 EDT
Yes, Eclipse 3.7.2.M20120208-0800.

About AJDT, I'm not really sure, and I didn't find any plugin named "ajdt" or similar. I certainly didn't install it. My guess is it's a dependency of another feature.

I suspect Scala IDE, because I found this plug-ins while searching for "weaving"

org.eclipse.equinox.weaving.aspectj (1.0.0.v20100503) "WeavingService Plug-in (Incubation)" [Active]

org.eclipse.equinox.weaving.hook (1.0.0.v20100503) "Aspect Weaving Hooks Plug-in (Incubation)" [Resolved]

org.scala-ide.sdt.aspects (2.0.1.v-2_09-201204232213-dae5cd4) "Scala JDT Weaving" [Active]

On the installed software list I have "JDT Weaving for Scala", a dependency of "Scala IDE for Eclipse", having this description: 

"This feature is necessary for the Scala IDE to function properly. It adds extension points inside the Java Development Tools through AspectJ weaving."

As far as I know, everything is up to date in my installation, checking for updates doesn't find any.
Comment 9 Andrew Eisenberg CLA 2012-06-14 16:28:58 EDT
Since you are using ScalaIDE, you are using an old version of JDT weaving.  Use this update site:

http://download.eclipse.org/tools/ajdt/37/dev/update/

And select the JDT weaving feature to install.  This will likely fix your problem.  Let me know.
Comment 10 Vladimir Nicolici CLA 2012-06-18 06:54:09 EDT
(In reply to comment #9)

Thanks, I didn't experience anymore errors since installing the update version.