-
Bug
-
Resolution: Fixed
-
P3
-
6, 7, 8, 9, 10, 11, 12
-
b22
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8214660 | 8u211 | Sergey Bylokhov | P3 | Resolved | Fixed | b01 |
JDK-8211405 | 8u202 | Sergey Bylokhov | P3 | Resolved | Fixed | b01 |
JDK-8221006 | emb-8u211 | Sergey Bylokhov | P3 | Resolved | Fixed | master |
JDK-8211679 | 7u211 | Sergey Bylokhov | P3 | Resolved | Fixed | b01 |
AudioClip.loop() may not play sound just after call AudioClip.stop().
A Java thread for DirectAudioDevice$DirectClip isn't created
on the folowing cases:
1) loop() -> isOpen(): true, isActive(): true
2) stop() -> isOpen(): true, isActive(): false
3) next loop() -> isOpen(): true, so thread is not created.
4) CLOSE event -> isOpen(): false, isActive(): false, so thread is stopping
(thread = null).
AbstractLine
+- AbstractDataLine
+- DirectAudioDevice$DirectDL
+- DirectAudioDevice$DirectClip
"Direct Clip" thread is created only when AbstractLine.isOpen() is false.
And, this thread is stopped at dispatching CLOSE event on Java Sound Event
Dispatcher thread, if AbstractDataLine.isActive() is false.
AbstractDataLine.isActive() becomes false at DirectClip.stop(), and
becomes true at write() on "Direct Clip" thread.
There is a race condition that "Direct Clip" thread is stopped unexpectedly.
A Java thread for DirectAudioDevice$DirectClip isn't created
on the folowing cases:
1) loop() -> isOpen(): true, isActive(): true
2) stop() -> isOpen(): true, isActive(): false
3) next loop() -> isOpen(): true, so thread is not created.
4) CLOSE event -> isOpen(): false, isActive(): false, so thread is stopping
(thread = null).
AbstractLine
+- AbstractDataLine
+- DirectAudioDevice$DirectDL
+- DirectAudioDevice$DirectClip
"Direct Clip" thread is created only when AbstractLine.isOpen() is false.
And, this thread is stopped at dispatching CLOSE event on Java Sound Event
Dispatcher thread, if AbstractDataLine.isActive() is false.
AbstractDataLine.isActive() becomes false at DirectClip.stop(), and
becomes true at write() on "Direct Clip" thread.
There is a race condition that "Direct Clip" thread is stopped unexpectedly.
- backported by
-
JDK-8211405 Race condition in AudioClip.loop()
-
- Resolved
-
-
JDK-8211679 Race condition in AudioClip.loop()
-
- Resolved
-
-
JDK-8214660 Race condition in AudioClip.loop()
-
- Resolved
-
-
JDK-8221006 Race condition in AudioClip.loop()
-
- Resolved
-
- relates to
-
JDK-8207150 Clip.isRunning() may return true after Clip.stop() was called
-
- Resolved
-
- links to
(1 links to)