Sun JDK 1.5 has a focus problem that cripples Oxygen-XML

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ToneDeF
Posts: 3
Joined: Mon May 09, 2005 8:34 pm

Sun JDK 1.5 has a focus problem that cripples Oxygen-XML

Post by ToneDeF »

I am running Oxygen-XML under Windows XP using the latest Sun JRE 1.5 (update 3). I think there is a major bug in the Sun 1.5 JRE that can make using Java desktop applications unusable.

To demonstrate, make sure that Sun JDK 1.5 is your default JRE, and then start Oxygen-XML. Open an XML file into the editor. Press the "Configure Transformation Scenario" button. The "Configure Transformation Scenario" dialog box appears. Press the "New" button. The "Edit scenario" dialog box appears. Press the appropriate picture button to "browse for a local input XML file". The standard file chooser dialog box appears. Select your XSL file and press the "Open" button. The file chooser dialog box goes away and the fully-qualified path to the XSL file that you selected will appear in the text box labeled "XML URL:".

Here lies the problem: window focus does NOT get returned to the "Edit scenario" dialog box as it should. There is no way that I can find to manually return focus to the dialog box. Because it is a modal dialog box, the whole application becomes unresponsive. The user has no choice but to have the operating system forcefully terminate the application. There is no manual workaround for this as I see it.

I do not believe this to be a bug in Oxygen-XML -- I believe it to be a serious flaw in the Sun JDK 1.5. As far as I can tell, the Sun JDK 1.4.2 does NOT have this flaw.

Just thought I would bring this to everyone's attention. Until Sun fixes this flaw, Java desktop applications running under JDK 1.5 are vulnerable to this broken window focus bug and the complications that result from it.
ToneDeF
Posts: 3
Joined: Mon May 09, 2005 8:34 pm

Update

Post by ToneDeF »

There does seem to be an erratic way to return window focus back to the dialog box. There just may be some system window events that will cause the JRE to reevaluate which child window should have focus when the Java application itself regains focus from the operating system. Via a stroke of luck, I was able to return focus to the dialog by switching back and forth between Oxygen-XML and other applications running on my Windows XP desktop. Because this is such an erratic workaround, I haven't pin-pointed what exactly to do to get the dialog box focus to come back consistently. I will experiment some more, and if I figure it out, I will post another reply.
ToneDeF
Posts: 3
Joined: Mon May 09, 2005 8:34 pm

I think that I found a consistent workaround

Post by ToneDeF »

I think that I have found a consistent workaround to the particular scenario that I described at the beginning of this thread.

Basically, the focus issue seems to go away if you do the following:

1) When the "Edit scenario" dialog box appears, press the "Cancel" button instead.
2) The "Edit scenario" dialog box goes away, and focus returns to the "Configure Tranformation Scenario" dialog box.
3) Press the "New" button to bring up the "Edit scenario" dialog box again.
4) Proceed as normal and this time focus will return after a file has been opened with the file chooser dialog.

As strange as this sounds, the "cancel and redo" steps seem to disable the window focusing problem. Go figure.
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Post by Dan »

Hello,

Thank you for pointing this out.

The QA team discovered the problem occuring only on the latest JRE 1.5.0_03. We will add a note on the download page showing that this version is not recommeded.

In our next release we will package the JRE version 1.5.0_02 as it is more stable.

Thanks again,
Dan
dnedrow
Posts: 60
Joined: Wed Jan 28, 2004 10:51 pm

Same issue under Tiger with 1.5.0_02

Post by dnedrow »

I see the same problem running oXygen 6 under Tiger with JRE 1.5.0_02.

I'm able to work around it by clicking "past" the modal window, but it is "interesting".

-David
Post Reply