JDK-4476452 : Wrong AWT-Event-Queue-Thread is active with JWS 1.0.1
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 1.0.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2001-06-29
  • Updated: 2002-01-17
  • Resolved: 2002-01-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.0.1 02Fixed
Related Reports
Relates :  
Description

Name: tn108358			Date: 06/29/2001


java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

We have an Client-/Server-Application, which starts Swing-Frames/Dialogs via
RMI on the client.

With JWS 1.0.1 there is a second AWT-Event-Queue-Thread, which is active, when
we enter text in a textfield. Therefore the EventQueue.isDispatchThread()-
Method returns wrong result (false), although we are in the Event-Dispatch-
Thread.
The funny effect is, that the Caret in the Textfield got a wrong position while
editing. The text goes from right to left. This is, because the DefaultCaret
checks for an Dispatch-Thread in DefaultCaret.insertUpdate(DocumentEvent e).

Using JRE 1.3.1 without JWS all works fine.

Here some trace information with JWS:
Creating View on Client - Current-Thread: Thread[RMI TCP Connection(4)-
10.3.24.202,5,RMI Runtime]
Creating View on Client - Dispatch-Thread: Thread[AWT-EventQueue-
1,6,javawsApplicationThreadGroup]
Creating View on Client - isDispatchThread: false

Editing Textfield - CurrentThread: Thread[AWT-EventQueue-
0,6,javawsApplicationThreadGroup]
Editing Textfield - Dispatch-Thread: Thread[AWT-EventQueue-
1,6,javawsApplicationThreadGroup]
Editing Textfield - isDispatchThread: false

Without JWS we got this:
Creating View on Client - Current-Thread: Thread[RMI TCP Connection(8)-
10.3.24.202,5,RMI Runtime]
Creating View on Client - Dispatch-Thread: Thread[AWT-EventQueue-0,6,main]
Creating View on Client - isDispatchThread: false

Editing Textfield - CurrentThread: Thread[AWT-EventQueue-0,6,main]
Editing Textfield - Dispatch-Thread: Thread[AWT-EventQueue-0,6,main]
Editing Textfield - isDispatchThread: true

Note, that without JWS there is only one Event-Dispatch-Thread. With JWS the
comparison in EventQueue.isDispatchThread: "return (Thread.currentThread() ==
eq.dispatchThread)" compares Thread[AWT-EventQueue-
0,6,javawsApplicationThreadGroup] with Thread[AWT-EventQueue-
1,6,javawsApplicationThreadGroup]. This returns false.

I'v tested it with jdk1.3.0 - 1.3.1.

Maybe it has something to do with the Bug 4429811 - Comment 2001-04-06.
Also there may be a dependence to the RMI-Thread, because it seems, that only
the Views created via the RMI-Thread are problematic.
(Review ID: 126456) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.0.1_02 FIXED IN: 1.0.1_02 INTEGRATED IN: 1.0.1_02
31-08-2004

EVALUATION This is fixed in javaws 1.0.1_02 by moving toolkit initialization to before starting new AppContext ###@###.### 2002-01-17
17-01-2002