Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319582

Summary: AIOOBE calling IAHyperlink methods
Product: [Eclipse Project] Platform Reporter: Carolyn MacLeod <carolynmacleod4>
Component: SWTAssignee: Carolyn MacLeod <carolynmacleod4>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Silenio_Quarti
Version: 3.7Flags: Silenio_Quarti: review+
Target Milestone: 3.6.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
test case that shows the failure
none
patch to fix the problem none

Description Carolyn MacLeod CLA 2010-07-12 10:40:37 EDT
Created attachment 174033 [details]
test case that shows the failure

Run the attached snippet, which sets up a hyperlink listener with a name and description. Run AccProbe, and try to look at the IAHyperlink name and description. There is an array index out of bounds calling "method5" which is IAccessibleHyperlink::getDescription. The number of parameters is incorrect - it should be 2, but instead, there are 0.
Comment 1 Carolyn MacLeod CLA 2010-07-12 10:43:31 EDT
Created attachment 174036 [details]
patch to fix the problem
Comment 2 Carolyn MacLeod CLA 2010-07-12 10:52:51 EDT
The attached patch specifies the correct number of parameters for IAHyperlink methods. The problem was that when the IAAction method parameters were included in the IAHyperlink spec (because IAHyperlink derives from IAAction), QueryInterface, AddRef, and Release were included twice.

SSQ please review the patch for 3.6.1.
Comment 3 Carolyn MacLeod CLA 2010-07-12 11:57:47 EDT
Fixed > 20100712 in 3.6.1 and in HEAD (3.7).