Bug 300036 - [Memory View] NPE in AbstractAsyncTableRendering#getSelectedAddress on rendering creation
Summary: [Memory View] NPE in AbstractAsyncTableRendering#getSelectedAddress on render...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Samantha Chan CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2010-01-19 05:30 EST by Teodor Madan CLA
Modified: 2010-04-23 12:17 EDT (History)
1 user (show)

See Also:


Attachments
test-case plugin (5.74 KB, application/zip)
2010-01-19 05:31 EST, Teodor Madan CLA
no flags Details
Fix (955 bytes, patch)
2010-01-19 05:32 EST, Teodor Madan CLA
no flags Details | Diff
patch with additional null checks in public methods (1.88 KB, patch)
2010-04-23 11:04 EDT, Jeremiah Swan CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Teodor Madan CLA 2010-01-19 05:30:13 EST
Build Identifier: I20091210-1301

CDT import/export memory dialog queries IRepositionableMemoryRendering.getSelectedAddress() when selection is changed in rendering.

When rendering is in process of being created, handling the selection change will end in a NPE.



Reproducible: Always

Steps to Reproduce:
1. Install attached plugin. The plugin will install a memory view action called (NPE test)
2. Start a debug session 
3. Open Memory View and add a memory monitor
4. Select the memory monitor and add a Hex rendering
5. A message dialog with NPE details will be displayed.
Comment 1 Teodor Madan CLA 2010-01-19 05:31:08 EST
Created attachment 156487 [details]
test-case plugin

Test case plugin to expose NPE
Comment 2 Teodor Madan CLA 2010-01-19 05:32:41 EST
Created attachment 156488 [details]
Fix

Proposed fix. Return NULL from AbstractAsyncTableRendering#getSelectedAddress if the rendering is not created yet
Comment 3 Jeremiah Swan CLA 2010-04-23 11:04:08 EDT
Created attachment 165923 [details]
patch with additional null checks in public methods

This patch builds adds additional null checks to other public methods that might also be called in similar situations
Comment 4 Samantha Chan CLA 2010-04-23 12:17:04 EDT
applied Jeremiah's patch.
Comment 5 Samantha Chan CLA 2010-04-23 12:17:17 EDT
verified.