I am experiencing this same issue with a similar exception to the one
listed above.  I think I can repro this every time, the NPE happens
when you open an XML resource with the "Android Resource Editor"
instead of the "Android XML Resources Editor", then go to the
"Resources" tab, that should get you several NPEs, then when you go
back to the filename tab every charachter you type throws an NPE.

I'm not sure exactly if the "Android Resource Editor" is the default
by default.

I've pasted more of these exceptions at http://pastie.org/1026261

On Jun 30, 9:42 pm, Bob Kerns <[email protected]> wrote:
> There are several possible editors to use to edit these files. I'd
> suggest trying a different one.
>
> First, close the editor that's giving you problems.
>
> Right click on the file in the Project Explorer, and choose Open
> With...   Try "Android Resource Editor" first, as that's probably the
> one you really want to be using, and there's nothing in the stacktrace
> that suggests that's what you're actually using. I'm not sure it's NOT
> using it, but it's worth trying the right one first.
>
> If that doesn't work, try another one. Text Editor is likely to work.
> System Editor/ and In Place Editor will depend on what's installed on
> your system, and since you're on a Mac, I won't make any predictions
> there, but might be good choices. System Editor will launch a separate
> window, which is a drawback.
>
> I have OxygenXML installed, and that provides Eclipse with an
> additional XML editor as well, with the Oxygen toolset and editing
> style available.
>
> Even if the Android tool is broken, explore and I think you'll
> probably find something that works acceptably for you.
>
> (It's still a bug, even if you are using the "wrong" editor. A side
> benefit of exploring is you'll identify the culprit and can file the
> suitable bug report!)
>
> On Jun 29, 9:46 pm, Gorman Ho <[email protected]> wrote:
>
> > I am also experiencing this issue. When I edit strings.xml directly, I
> > get 1 NullPointerException for each string in the file each time I
> > type a letter. I eventually did something to make it go away, but I'm
> > not sure what. However, I'm able to reproduce the behavior by creating
> > a new Android project.
>
> > I'm running Leopard, Eclipse Helios, Android SDK r06, Android Platform
> > 2.2, ADT 0.9.7.
>
> > I pasted the requested log file below. I had 2 strings in strings.xml,
> > so there were 2 NullPointerExeptions generated when I typed a letter
> > in strings.xml.
>
> > Hope that helps
> > Gorman
>
> > !ENTRY org.eclipse.jface 4 2 2010-06-29 22:43:12.696
> > !MESSAGE Problems occurred when invoking code from plug-in:
> > "org.eclipse.jface".
> > !STACK 0
> > java.lang.NullPointerException
> >         at
> > org.eclipse.wst.xml.core.internal.document.ElementImpl.getDefaultValue(Elem 
> > entImpl.java:
> > 259)
> >         at
> > org.eclipse.wst.xml.core.internal.document.ElementImpl.getAttributeNS(Eleme 
> > ntImpl.java:
> > 329)
> >         at
> > com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode.getShort 
> > Description(Unknown
> > Source)
> >         at
> > com.android.ide.eclipse.adt.internal.editors.ui.tree.UiModelTreeLabelProvid 
> > er.getText(Unknown
> > Source)
> >         at
> > org.eclipse.jface.viewers.WrappedViewerLabelProvider.getText(WrappedViewerL 
> > abelProvider.java:
> > 108)
> >         at
> > org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLa 
> > belProvider.java:
> > 164)
> >         at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:
> > 152)
> >         at
> > org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewe 
> > r.java:
> > 934)
> >         at org.eclipse.jface.viewers.AbstractTreeViewer
> > $UpdateItemSafeRunnable.run(AbstractTreeViewer.java:102)
> >         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> >         at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
> >         at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
> >         at
> > org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewe 
> > r.java:
> > 1014)
> >         at org.eclipse.jface.viewers.StructuredViewer
> > $UpdateItemSafeRunnable.run(StructuredViewer.java:481)
> >         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> >         at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
> >         at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
> >         at
> > org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java 
> > :
> > 2141)
> >         at
> > org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeVie 
> > wer.java:
> > 2689)
> >         at
> > org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(Abstract 
> > TreeViewer.java:
> > 1867)
> >         at
> > org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:
> > 721)
> >         at
> > org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeVi 
> > ewer.java:
> > 1842)
> >         at
> > org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeVi 
> > ewer.java:
> > 1799)
> >         at
> > org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeVi 
> > ewer.java:
> > 1785)
> >         at org.eclipse.jface.viewers.StructuredViewer
> > $7.run(StructuredViewer.java:1487)
> >         at
> > org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredVi 
> > ewer.java:
> > 1422)
> >         at
> > org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:
> > 403)
> >         at
> > org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredVi 
> > ewer.java:
> > 1383)
> >         at
> > org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:
> > 1485)
> >         at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:
> > 537)
> >         at
> > org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:
> > 1444)
> >         at com.android.ide.eclipse.adt.internal.editors.ui.tree.UiTreeBlock
> > $2.uiElementNodeUpdated(Unknown Source)
> >         at
> > com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode.invokeUi 
> > UpdateListeners(Unknown
> > Source)
> >         at
> > com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode.load>From
> >  XmlNode(Unknown
> > Source)
> >         at
> > com.android.ide.eclipse.adt.internal.editors.resources.ResourcesEditor.xmlM 
> > odelChanged(Unknown
> > Source)
> >         at com.android.ide.eclipse.adt.internal.editors.AndroidEditor
> > $XmlModelStateListener.modelChanged(Unknown Source)
> >         at
> > org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel.fireModelCh 
> > anged(AbstractStructuredModel.java:
> > 553)
> >         at
> > org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel.internalMod 
> > elChanged(AbstractStructuredModel.java:
> > 887)
> >         at
> > org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel.changedMode 
> > l(AbstractStructuredModel.java:
> > 382)
> >         at
> > org.eclipse.wst.xml.core.internal.document.DOMModelImpl.changedModel(DOMMod 
> > elImpl.java:
> > 167)
> >         at org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel
> > $DocumentToModelNotifier.regionsReplaced(AbstractStructuredModel.java:
> > 176)
> >         at
> > org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument._fireEvent(B 
> > asicStructuredDocument.java:
> > 571)
> >         at
> > org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.fireStructur 
> > edDocumentEvent(BasicStructuredDocument.java:
> > 1190)
> >         at
> > org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalRepl 
> > aceText(BasicStructuredDocument.java:
> > 1968)
> >         at
> > org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText( 
> > BasicStructuredDocument.java:
> > 2419)
> >         at
> > org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText( 
> > BasicStructuredDocument.java:
> > 2404)
> >         at
> > org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.access
> > $2(JobSafeStructuredDocument.java:1)
> >         at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument
> > $3.run(JobSafeStructuredDocument.java:141)
> >         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> >         at
> > org.eclipse.wst.sse.ui.EditorExecutionContext.execute(EditorExecutionContex 
> > t.java:
> > 149)
> >         at
> > org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.replaceTex 
> > t(JobSafeStructuredDocument.java:
> > 144)
> >         at
> > org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replace(Basi 
> > cStructuredDocument.java:
> > 2364)
> >         at
> > org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.access
> > $0(JobSafeStructuredDocument.java:1)
> >         at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument
> > $1.run(JobSafeStructuredDocument.java:103)
> >         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> >         at
> > org.eclipse.wst.sse.ui.EditorExecutionContext.execute(EditorExecutionContex 
> > t.java:
> > 149)
> >         at
> > org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.replace(Jo 
> > bSafeStructuredDocument.java:
> > 106)
> >         at
> > org.eclipse.jface.text.projection.ProjectionTextStore.replace(ProjectionTex 
> > tStore.java:
> > 111)
> >         at
> > org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:
> > 1184)
> >         at
> > org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:
> > 1210)
> >         at
> > org.eclipse.jface.text.projection.ProjectionDocument.replace(ProjectionDocu 
> > ment.java:
> > 629)
> >         at
> > org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange(DefaultDocum 
> > entAdapter.java:
> > 248)
> >         at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:
> > 7168)
> >         at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:
> > 7975)
> >         at org.eclipse.swt.custom.StyledText.doBackspace(StyledText.java:
> > 2267)
> >         at org.eclipse.swt.custom.StyledText.invokeAction(StyledText.java:
> > 6976)
> >         at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5932)
> >         at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:
> > 5958)
> >         at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:
> > 5652)
> >         at
>
> ...
>
> read more »

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to