Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343173 - NPE Unable to get CElement for Macro
Summary: NPE Unable to get CElement for Macro
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6   Edit
Assignee: Shawn Minto CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-18 12:34 EDT by Andrew Gvozdev CLA
Modified: 2011-05-06 12:46 EDT (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (2.77 KB, application/octet-stream)
2011-05-06 12:45 EDT, Shawn Minto CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gvozdev CLA 2011-04-18 12:34:25 EDT
I am getting following exception in the stack trace. Not sure what triggers it. Running last Hudson build.

Unable to get CElement for Macro
java.lang.NullPointerException
	at org.eclipse.mylyn.internal.cdt.ui.contentassist.DOMCompletionProposalComputer.getCElement(DOMCompletionProposalComputer.java:574)
	at org.eclipse.mylyn.internal.cdt.ui.contentassist.DOMCompletionProposalComputer.handleMacro(DOMCompletionProposalComputer.java:282)
	at org.eclipse.mylyn.internal.cdt.ui.contentassist.DOMCompletionProposalComputer.addMacroProposals(DOMCompletionProposalComputer.java:224)
	at org.eclipse.mylyn.internal.cdt.ui.contentassist.DOMCompletionProposalComputer.computeCompletionProposals(DOMCompletionProposalComputer.java:148)
	at org.eclipse.cdt.internal.ui.text.contentassist.ParsingBasedProposalComputer.computeCompletionProposals(ParsingBasedProposalComputer.java:55)
	at org.eclipse.mylyn.internal.cdt.ui.contentassist.FocusedDOMCompletionProposalComputer.computeCompletionProposals(FocusedDOMCompletionProposalComputer.java:38)
	at org.eclipse.cdt.internal.ui.text.contentassist.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:300)
	at org.eclipse.cdt.internal.ui.text.contentassist.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:261)
	at org.eclipse.cdt.internal.ui.text.contentassist.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:270)
	at org.eclipse.cdt.internal.ui.text.contentassist.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:223)
	at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1830)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:556)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:553)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$14.run(CompletionProposalPopup.java:1544)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.incrementalComplete(CompletionProposalPopup.java:1538)
	at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1655)
	at org.eclipse.cdt.internal.ui.editor.CEditor$AdaptedSourceViewer.doOperation(CEditor.java:337)
	at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)
	at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
	at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1509)
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4623)
	at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4511)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4957)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2525)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3737)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 1 Andrew Gvozdev CLA 2011-04-18 12:36:08 EDT
That is actually mylyn trace. Is there something out of sync between CDT and Mylyn?
Comment 2 Markus Schorn CLA 2011-04-20 03:47:10 EDT

*** This bug has been marked as a duplicate of bug 320518 ***
Comment 3 Andrew Gvozdev CLA 2011-04-20 09:48:12 EDT
Bug 320518 states that it's been fixed back in July 2010 but i am using Mylyn weekly builds
  Mylyn Commons	3.5.0.v20110316-0100	org.eclipse.mylyn.commons.feature.group
Comment 4 Steffen Pingel CLA 2011-04-20 10:03:45 EDT
Andrew, which version of the Mylyn CDT feature and plug-in do you have installed (org.eclipse.cdt.mylyn...)?

Shawn, do you know what could be causing this to popup again?
Comment 5 Andrew Gvozdev CLA 2011-04-20 11:02:50 EDT
(In reply to comment #4)
> Andrew, which version of the Mylyn CDT feature and plug-in do you have installed
> (org.eclipse.cdt.mylyn...)?
All the versions of mylyn plugins match version 3.5.0.v20110316-0100 that I provided in comment 3:

  Mylyn Builds Connector: Hudson/Jenkins (Incubation)	0.7.0.v20110316-0100	org.eclipse.mylyn.hudson.feature.group
  Mylyn Commons	3.5.0.v20110316-0100	org.eclipse.mylyn.commons.feature.group
  Mylyn Context Connector: C/C++ Development	5.2.200.v20110316-0100	org.eclipse.cdt.mylyn.feature.group
  Mylyn Context Connector: Eclipse IDE	3.5.0.v20110316-0100	org.eclipse.mylyn.ide_feature.feature.group
  Mylyn Context Connector: Java Development	3.5.0.v20110316-0100	org.eclipse.mylyn.java_feature.feature.group
  Mylyn Context Connector: Plug-in Development	3.5.0.v20110316-0100	org.eclipse.mylyn.pde_feature.feature.group
  Mylyn Context Connector: Team Support	3.5.0.v20110316-0100	org.eclipse.mylyn.team_feature.feature.group
  Mylyn HtmlText	0.7.0.v20110316-0100	org.eclipse.mylyn.htmltext.feature.group
  Mylyn Reviews Connector: Gerrit (Incubation)	0.7.0.I20110310-0502	org.eclipse.mylyn.gerrit.feature.feature.group
  Mylyn SDK	3.5.0.v20110316-0100	org.eclipse.mylyn.sdk_feature.feature.group
  Mylyn Task List	3.5.0.v20110316-0100	org.eclipse.mylyn_feature.feature.group
  Mylyn Task-Focused Interface	3.5.0.v20110316-0100	org.eclipse.mylyn.context_feature.feature.group
  Mylyn Tasks Connector: Bugzilla	3.5.0.v20110316-0100	org.eclipse.mylyn.bugzilla_feature.feature.group
  Mylyn Tasks Connector: Trac	3.5.0.v20110316-0100	org.eclipse.mylyn.trac_feature.feature.group
  Mylyn WikiText	1.4.0.v20110316-0100	org.eclipse.mylyn.wikitext_feature.feature.group
  Mylyn WikiText SDK	1.4.0.v20110316-0100	org.eclipse.mylyn.wikitext.sdk.feature.group
Comment 6 Shawn Minto CLA 2011-05-06 12:45:19 EDT
Oddly, it doesn't seem that this was actually fixed in July as the duplicate states.  I have added guards so that this exception will not occur anymore.
Comment 7 Shawn Minto CLA 2011-05-06 12:45:20 EDT
Created attachment 194961 [details]
mylyn/context/zip