Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311302 - NPE getting address of a Relation
Summary: NPE getting address of a Relation
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: Carolyn MacLeod CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-01 23:37 EDT by Carolyn MacLeod CLA
Modified: 2010-05-03 22:40 EDT (History)
1 user (show)

See Also:
Silenio_Quarti: review+


Attachments
patch (5.62 KB, patch)
2010-05-01 23:37 EDT, Carolyn MacLeod CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carolyn MacLeod CLA 2010-05-01 23:37:04 EDT
Set Accessible.DEBUG = true, then run LiveRegionExample and then run JAWS.
NPE in Accessible.get_relation on the statement relation.objIAccessibleRelation.getAddress() because relation.objIAccessibleRelation is null. This is because relation.objIAccessibleRelation is created when AddRef is called, and it doesn't get called until the next line of code.

It should not matter whether Relation's AddRef or getAddress is called first. The object should be created in getAddress if it was not created yet.
Because of this bug, I noticed that some QueryInterface/getAddress() cleanup did not get done in the Relation class. The patch fixes both of these problems, and makes the code in Relation class consistent with the code in Accessible class.
Comment 1 Carolyn MacLeod CLA 2010-05-01 23:37:54 EDT
Created attachment 166726 [details]
patch
Comment 2 Carolyn MacLeod CLA 2010-05-03 22:40:08 EDT
Fixed > 20100503