Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311434 - eclipse crashes with some versions of JAWS for Windows screen reader
Summary: eclipse crashes with some versions of JAWS for Windows screen reader
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 RC2   Edit
Assignee: Carolyn MacLeod CLA
QA Contact: Carolyn MacLeod CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-03 16:59 EDT by Sérgio Neves CLA
Modified: 2010-08-19 10:12 EDT (History)
5 users (show)

See Also:
carolynmacleod4: review-
grant_gayed: review-


Attachments
log generated when the crash occurs (14.68 KB, text/plain)
2010-05-03 17:03 EDT, Sérgio Neves CLA
no flags Details
patch to fix JAWS 8 & 9 crash (2.02 KB, patch)
2010-05-17 00:52 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 Sérgio Neves CLA 2010-05-03 16:59:39 EDT
Build Identifier: N20100502-2000

After eclipse 3.6m4, eclipse has started to crash with some versions of JAWS screen reader.
Whichever version of JAWS I use with eclipse <= 3.6m4, eclipse doesn't crash.
I've tested with versions 6.20, 7.10, 8.0, 9.0 and 10.0 of JAWS and with NVDA screen reader.
Any version of eclipse >= 3.6m5 (I'm not able to download builds between 3.6m4 and 3.6m5) crashes when JAWS 8.0 or JAWS 9.0 are running.
I'll send in attachment the log generated (hs_err_pid3192.log).
The problem doesn't occur with both JAWS 6.20, 9.0 or 10.0 and NVDA screen reader.

Reproducible: Always

Steps to Reproduce:
1. Start JAWS 8.0 or 9.0.
2. Start a version of eclipse >= 3.6m5.
3. Go to help -> about eclipse sdk. You'll be focused on ok button.
4. Press tab to go to the information text box.
Expected results: the textbox should receive the focus.
Actual results: eclipse process dies and generates an error log file.
Note: there is many ways of reproducing this crash, for example, creating a project and clicking on a class to go to java editor.
Note: the log says that the problematic frame is related to jhook.dll, which is a JAWS library.
Comment 1 Sérgio Neves CLA 2010-05-03 17:03:15 EDT
Created attachment 166868 [details]
log generated when the crash occurs
Comment 2 Carolyn MacLeod CLA 2010-05-04 00:23:13 EDT
I only have JAWS 11.0 at the moment, and it does not crash running Eclipse with SWT from HEAD. I can try JAWS 8.0 and 9.0 tomorrow.

Many accessibility-related changes were released into Eclipse 3.6m5 because it was the Eclipse API freeze. Some of those changes were not fully implemented. Improvements have been made since then, but still more need to be made before Eclipse 3.6 ships.

Are you able to use NVDA reliably with Eclipse? I notice a performance problem when an Eclipse editor has focus.
Comment 3 Sérgio Neves CLA 2010-05-04 04:20:09 EDT
(In reply to comment #2)
> Are you able to use NVDA reliably with Eclipse? I notice a performance problem
> when an Eclipse editor has focus.
Unfortunately, I don't have yet the technical expertise to explain it well. In fact, I think it's not a performance problem; it's only NVDA that doesn't announce where the caret is. I've red that SWT uses MSAA to communicate information. I've also red that MSAA doesn't inform client applications where the caret is. Thus, it's impossible for applications to know it, unless they make low-level communication with the graphics card. JAWS implements this low-level communication, but NVDA doesn't. Thus, NVDA can't announce where the caret is.
I hope I haven't said so much absurdities, but it's only what I know for now.
Comment 4 Carolyn MacLeod CLA 2010-05-13 19:59:59 EDT
The NVDA problem was fixed in bug 312097.
The JAWS 8 and 9 problem, however, is real, and we need to fix this before 3.6 RC2 next week.
Comment 5 Carolyn MacLeod CLA 2010-05-17 00:52:17 EDT
Created attachment 168672 [details]
patch to fix JAWS 8 & 9 crash

This is one of those patches where the comment is much longer than the actual code fix. The problem is that the IA2 spec for IAccessible::appVersion has either changed since JAWS 8 & 9 were written, or perhaps it wasn't fully specified at the time, or perhaps it was just a JAWS 8/9 bug. So although the IA2 spec says to return NULL if there is nothing to return, JAWS 8 & 9 were expecting a string, and if we return NULL they dereference it and crash.
The workaround is to ignore the IA2 spec and return an empty string instead of NULL.
Comment 6 Carolyn MacLeod CLA 2010-05-17 00:53:16 EDT
SSQ, please review.
Comment 7 Carolyn MacLeod CLA 2010-05-17 13:28:49 EDT
I need this in today, and SSQ is away. McQ and GG, please review. Please drop by my office for a demo of this patch fixing the crash with JAWS 8/9.
Comment 8 Grant Gayed CLA 2010-05-17 14:42:42 EDT
This fixes this crash, but does not fix other JAWS 8/9 problems that happen in Eclipse with IA2 turned on.  During the review it was determined that a better approach for older screen readers like JAWS 8 and 9 is for the user turn off IA2.
Comment 9 Carolyn MacLeod CLA 2010-05-17 15:02:03 EDT
For info on how to "turn off IA2", please see bug 313182.

Closing bug.
Comment 10 Sérgio Neves CLA 2010-05-19 04:12:13 EDT
I have one question: this deactivation of iaccessible2 applies only to eclipse or to any program using swt? I explain better: If I make a program using swt, is iaccessible2 automatically activated? Is positive, is the property org.eclipse.swt.accessibility.UseIA2 available in swt api to allow programmers to disable iaccessible2?
By the way: is there any swt documentation that explains which accessibility specs it supports, etc, or it can only be seen by looking for code?
Sorry for these beginner questions.
Comment 11 Carolyn MacLeod CLA 2010-05-19 10:39:30 EDT
(In reply to comment 10)
> this deactivation of iaccessible2 applies only to eclipse or to any program
> using swt?
Any program using swt.

> If I make a program using swt, is iaccessible2 automatically activated? 
Sort-of <g>. If you use a StyledText, then it uses IAccessible2 automatically. But it still works without it. None of the other SWT controls use IAccessible2 automatically, but you can program any of the controls (and any custom controls you might write) to use IAccessible2 using the SWT accessibility API.

> Is positive, is the property org.eclipse.swt.accessibility.UseIA2 available
> in swt api to allow programmers to disable iaccessible2?
Yes. When you start your Java VM, give the following argument:
-Dorg.eclipse.swt.accessibility.UseIA2=false

> is there any swt documentation that explains which accessibility
> specs it supports, etc, or it can only be seen by looking for code?
No doc yet - sorry. We plan to work on that after the code freeze in a couple of weeks.

> Sorry for these beginner questions.
No worries! Everyone will have the same questions. Thanks!
Comment 12 Janice Li CLA 2010-07-29 15:09:35 EDT
We encounter the similar problem with JAWS 11, e.g. JAWS crashes when navigate to StyledText controls. Can I safely assume this is the same problem? 

Btw, using  -Dorg.eclipse.swt.accessibility.UseIA2=false seems fixed the problem.
Comment 13 Sérgio Neves CLA 2010-08-02 14:44:00 EDT
(In reply to comment #12)
> We encounter the similar problem with JAWS 11, e.g. JAWS crashes when navigate
> to StyledText controls. Can I safely assume this is the same problem? 
> Btw, using  -Dorg.eclipse.swt.accessibility.UseIA2=false seems fixed the
> problem.
I don't have knowledge to answer this. However, I tried eclipse 3.6.0 (I20100608-0911) with both jaws 8, 9 and 10, and this build of eclipse no longer crashes, even if I don't type the command line parameter to disable Iaccessible2. It seems Iaccessible2 was disabled by default or there was some other change to influence this behavior.