Bug 469418 - Null pointer exception in MemoryViewUtil
Summary: Null pointer exception in MemoryViewUtil
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 8
: P3 normal with 1 vote (vote)
Target Milestone: 4.6 M4   Edit
Assignee: Norman Yee CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2015-06-04 14:28 EDT by Norman Yee CLA
Modified: 2015-12-08 00:50 EST (History)
2 users (show)

See Also:


Attachments
I've attached a patch with a fix that checks if address is null in renderContent() in TableRenderingModel.java and if so, exit the function. (778 bytes, application/octet-stream)
2015-06-04 15:05 EDT, Norman Yee CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Norman Yee CLA 2015-06-04 14:28:57 EDT
I'm seeing a null pointer exception (NPE) when I connect to a QEMU ARM debug session using the GDB hardware debugger launch configuration type, open a memory browser view, enter an invalid address, and then enter an invalid address a second time.  The call stack shows that the NPE occurs in MemoryViewUtil.java:

java.lang.NullPointerException
	at org.eclipse.debug.internal.ui.views.memory.MemoryViewUtil.alignToBoundary(MemoryViewUtil.java:159)
	at org.eclipse.debug.internal.ui.views.memory.renderings.TableRenderingModel.convertMemoryBytesToSegments(TableRenderingModel.java:335)
	at org.eclipse.debug.internal.ui.views.memory.renderings.TableRenderingModel.rebuildContent(TableRenderingModel.java:310)
	at org.eclipse.debug.internal.ui.views.memory.renderings.TableRenderingModel.handleViewerChanged(TableRenderingModel.java:231)
	at org.eclipse.debug.internal.ui.views.memory.renderings.AsyncTableRenderingViewer$12.run(AsyncTableRenderingViewer.java:965)
	at org.eclipse.debug.internal.ui.views.memory.renderings.AsyncTableRenderingViewer.preservingSelection(AsyncTableRenderingViewer.java:519)
	at org.eclipse.debug.internal.ui.views.memory.renderings.AsyncTableRenderingViewer.doFormatViewer(AsyncTableRenderingViewer.java:956)
	at org.eclipse.debug.internal.ui.views.memory.renderings.AsyncTableRenderingViewer.formatViewer(AsyncTableRenderingViewer.java:944)
	at org.eclipse.debug.internal.ui.memory.provisional.AbstractAsyncTableRendering$15.runInUIThread(AbstractAsyncTableRendering.java:2236)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:97)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
Comment 1 Norman Yee CLA 2015-06-04 15:05:16 EDT
Created attachment 254127 [details]
I've attached a patch with a fix that checks if address is null in renderContent() in TableRenderingModel.java and if so, exit the function.
Comment 2 Sarika Sinha CLA 2015-06-04 22:43:21 EDT
Can you Please sign CLA and mention in this bug

"This contribution complies with http://www.eclipse.org/legal/CoO.php"
Comment 3 Norman Yee CLA 2015-06-05 08:55:40 EDT
Ok, I've signed the CLA.
Comment 4 Sarika Sinha CLA 2015-09-03 06:10:26 EDT
Can you mention in the bug ?

"This contribution complies with http://www.eclipse.org/legal/CoO.php"


Also a testcase for this scenario will be great.
Comment 5 Sarika Sinha CLA 2015-10-27 04:48:35 EDT
ping!!
Comment 6 Norman Yee CLA 2015-10-27 09:21:39 EDT
This contribution complies with http://www.eclipse.org/legal/CoO.php

What do you need for the test case?  My description has the steps that I used to reproduce the problem.
Comment 7 Sarika Sinha CLA 2015-11-02 06:29:31 EST
I hope you have signed the CLA with the same name and email id ? 

When I try to commit it complains , that CLA has not been signed by the author.
Comment 8 Norman Yee CLA 2015-11-02 07:33:00 EST
I'm not sure why it didn't work.  I re-signed the CLA.  Try it again.
Comment 9 Sarika Sinha CLA 2015-11-02 22:30:16 EST
Hi,
Have you used "nyee" as your id somewhere ?
Comment 11 Sarika Sinha CLA 2015-12-08 00:50:57 EST
@Norman
Can you verify if it fixes your scenario with the build ?