[Bug 857] New: gtk look and feel setting causes javaws to hang if accessibility used

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Thu Jan 19 07:59:24 PST 2012


             Bug #: 857
           Summary: gtk look and feel setting causes javaws to hang if
                    accessibility used
    Classification: Unclassified
           Product: IcedTea-Web
           Version: unspecified
          Platform: unspecified
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P3
         Component: General
        AssignedTo: unassigned at icedtea.classpath.org
        ReportedBy: webczat_200 at poczta.onet.pl
                CC: unassigned at icedtea.classpath.org

I am a blind linux user, using java atk wrapper for java swing applications to
be able to access them.
I am unable to use javaws, and maybe other parts of icedtea-web, but I am not
sure, because it hangs when starting up, no matter on what I'm doing with it.
I discovered that when I remove accessibility.properties from the jre's lib
directory, the problem is solved, but then java-atk-wrapper does not work and
provide me with any accessible windows.

Later, I've discovered what the issue is and how to fix it, although I do not
have a patch, because I don't know the code enough:
Throughout the code, icedtea has calls to setLookAndFeel, that resets the
current plaf to the system's plaf, that's gtk on unix.
The problem lies in placement of those calls:
Java documentation says that it's recommended to use setLookAndFeel as the
first thing ever done with swing, before any other swing classes could be
loaded, because failure to do so can have unexpected results.
Icedtea code doesn't follow this, I saw something, not sure what part of the
code is it, that before setting look and feel, it creates a security manager,
the line that does that has the comment saying that it's side effect is to
create a JWindow.
That means that the component is created before setting look and feel, that's a
violation of the rule stated above.
I've made a simple test case that created a frame, then set a plaf to the
native one, then creates and shows another frame.
When I ran it with accessibility enabled, I saw that it hangs as javaws does.
For comparison, removing the frame created before setLookAndFeel made it work.
I think some things need to be reordered, and plaf reset should be done as
early as possible before any swing class would get loaded, that would solve all

Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.

More information about the distro-pkg-dev mailing list