RFR: 8357714: AudioClip.play crash on macOS when loading resource from jar [v3]
Andy Goryachev
angorya at openjdk.org
Thu Jul 10 17:44:45 UTC 2025
On Thu, 10 Jul 2025 07:45:26 GMT, Johan Vos <jvos at openjdk.org> wrote:
>> After JDK-8287822 (https://bugs.openjdk.org/browse/JDK-8287822), mpeg file content is no longer played via GSTPlatform but via OSXPlatform.
>> We need to correctly handle data in case the source is a file inside a jar, in which case CJavaInputStreamCallbacks is used.
>>
>> The 2 changes I made are:
>> 1. Use ConnectionHolder instead of Locator for CJavaInputStreamCallbacks in case a jar resource is used.
>> 2. In case of random access datasource, use readBlock instead of readNextBlock in AVMediaPlayer
>
> Johan Vos has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove whitespace
Got a reproducer for you: added AudioClip to the Monkey Tester
https://github.com/andy-goryachev-oracle/MonkeyTest
Build a jar and run it. Select AudioClip page, then pressing "Play XX" button would play .wav or .mp3 file from the said jar.
What I see is that while the .wav file is being played correctly, the .mp3 does not play (no audio).
The bad news is that if I randomly press these buttons, it crashes
# SIGSEGV (0xb) at pc=0x0000000104425918, pid=37242, tid=61703
#
# JRE version: Java(TM) SE Runtime Environment (23.0.1+11) (build 23.0.1+11-39)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.0.1+11-39, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# V [libjvm.dylib+0x509918] jni_IsInstanceOf+0x260
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1839#issuecomment-3058356049
More information about the openjfx-dev
mailing list