casete
Posts: 23
Joined: Sun Jun 01, 2014 3:09 pm

JavaFX MediaPlayer crash

Sat Jan 26, 2019 7:04 pm

Now that I've resolved the "bleed through" issue from https://www.raspberrypi.org/forums/view ... 1&t=231427 by switching to OpenJFX on my Pi, I'm struggling to get simple MP3 audio media to play from within my JavaFX application. It doesn't seem to matter what I do, I end up with the application crashing when I start to play the MP3 file. I turned on core file dumps, but they aren't really telling me much. In some cases, I will get a hotspot error log file, but not always. The error logs seem to show different causes. I've also tried giving Java most of the RAM on the Pi to see if I could work around it, but that hasn't gotten me anywhere.

Does anyone have any working audio playing via JavaFX on Raspberry Pi? Am I chasing something that is just not going to work? This is all with version 8. I know that version 11 switches to GStreamer 1.0, so I'm wondering if that would help?

Any suggestions greatly appreciated.
Craig

stratocaster
Posts: 1
Joined: Tue Mar 19, 2019 8:48 pm

Re: JavaFX MediaPlayer crash

Tue Mar 19, 2019 9:04 pm

Did you have any success with this? I am able to get mp3 files to play. I am running this on Raspbian stretch lite (11/13/2018 release)
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)

I overlayed this with: armv6hf-sdk-8.60.9.zip

I also loaded all the plugins from gstreamer0.10. I had to futz around with getting the gstreamer0.10-ffmpeg loaded by messing with the sources.list and adding a previous distro version.

What kind of crash is it? Is it a java exception stack? What is the error you are getting?

strat

knute
Posts: 415
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: JavaFX MediaPlayer crash

Wed Mar 20, 2019 7:02 pm

stratocaster wrote:
Tue Mar 19, 2019 9:04 pm
Did you have any success with this? I am able to get mp3 files to play. I am running this on Raspbian stretch lite (11/13/2018 release)
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)

I overlayed this with: armv6hf-sdk-8.60.9.zip

I also loaded all the plugins from gstreamer0.10. I had to futz around with getting the gstreamer0.10-ffmpeg loaded by messing with the sources.list and adding a previous distro version.

What kind of crash is it? Is it a java exception stack? What is the error you are getting?

strat
I think Craig's problem is what most folks are running into that there is no MediaPlayer in the JavaFX that they are using. I'm curious where you got the armv6hf-sdk-8.60.9.zip JavaFX? And if you could provide detailed instructions to get it to work?

Thanks

casete
Posts: 23
Joined: Sun Jun 01, 2014 3:09 pm

Re: JavaFX MediaPlayer crash

Wed Mar 20, 2019 7:34 pm

While I was able to get things set up to use Mediaplayer using much the same steps you described, I was unable to get it set up in any stable way. It kind of worked, but was more likely to crash for me. For now, I'm using http://www.javazoom.net/javalayer/docs/ ... layer.html to play MP3 files. This is somewhat temporary for me. My hope is that a newer version of Java and JavaFX using gstreamer 1.0 will show up for the Pi and that that will be more stable when it does.

Return to “Java”