Bug 391568 - NPE in DebugHooksAspect.isInterestingLaunch
Summary: NPE in DebugHooksAspect.isInterestingLaunch
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 2.2.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 2.2.2   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-10 10:52 EDT by Tomasz Zarna CLA
Modified: 2012-10-10 13:19 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 Tomasz Zarna CLA 2012-10-10 10:52:30 EDT
After a debugging session in STS I noticed a dozen of following errors in Error Log:

java.lang.NullPointerException
	at org.eclipse.contribution.jdt.debug.DebugHooksAspect.isInterestingLaunch(DebugHooksAspect.aj:253)
	at org.eclipse.contribution.jdt.debug.DebugHooksAspect.ajc$inlineAccessMethod$org_eclipse_contribution_jdt_debug_DebugHooksAspect$org_eclipse_contribution_jdt_debug_DebugHooksAspect$isInterestingLaunch(DebugHooksAspect.aj:1)
	at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.getStepFilters_aroundBody1$advice(JDIDebugTarget.java:195)
	at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.getStepFilters(JDIDebugTarget.java:1)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.attachFiltersToStepRequest(JDIThread.java:2424)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.createStepRequest(JDIThread.java:2325)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.createStepRequest(JDIThread.java:2294)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.step(JDIThread.java:2239)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread.stepOver(JDIThread.java:1596)
	at org.eclipse.jdt.internal.debug.core.model.JDIStackFrame.stepOver(JDIStackFrame.java:454)
	at org.eclipse.debug.internal.core.commands.StepOverCommand.step(StepOverCommand.java:27)
	at org.eclipse.debug.internal.core.commands.StepCommand.doExecute(StepCommand.java:34)
	at org.eclipse.debug.core.commands.AbstractDebugCommand$1.run(AbstractDebugCommand.java:213)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

Not sure if this is the right inbox.
Comment 1 Andrew Eisenberg CLA 2012-10-10 12:04:03 EDT
That would be something in AJDT.  Can you give the precise version of org.eclipse.contribution.weaving.jdt?
Comment 2 Tomasz Zarna CLA 2012-10-10 12:07:10 EDT
From what I can see the DebugHooksAspect class comes from org.eclipse.contribution.weaving.jdt_2.2.1.e42x-RELEASE-20120921-1400.jar
Comment 3 Andrew Eisenberg CLA 2012-10-10 12:10:26 EDT
Ahhhh yes.  Looks like if you have JDT weaving installed without AJDT installed you will get this exception.

The exception is being logged and things are just continuing correctly, so there are no bad side-effects (except for a bloated error log).

I'm a little surprised since STS should come with AJDT pre-installed.  The fix is trivial and I should be able to get this into a snapshot build today.
Comment 4 Andrew Eisenberg CLA 2012-10-10 12:45:50 EDT
Fix has been pushed and will be available in next snapshot.

And looks like the problem is related to not having grails-ide installed.  There was a missing null check in a piece of the code.  The odd thing is that this missing null check has been in the aspect for almost 2 years and has never been reported.  I'm surprised that no one else has reported this error earlier (so thanks for raising the bug).
Comment 5 Tomasz Zarna CLA 2012-10-10 13:03:24 EDT
Wow, that was fast! Thx Andrew. Closing as resolved?
Comment 6 Andrew Eisenberg CLA 2012-10-10 13:19:51 EDT
Marking as resolved.  Please let me know if you get a chance to verify.