#22973 closed defect (fixed)
mp3 support is broken
Reported by: | Adrian | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin javafx | Version: | tested |
Keywords: | template_report mp3 javafx openjfx | Cc: |
Description
What steps will reproduce the problem?
- Open a .gpx file
- From the layer context menu, import audio and open an .mp3 file
- In the audio menu, select
Play
What is the expected result?
The mp3 file plays and an arrow moves along the gpx track.
What happens instead?
There is a warning that JOSM was compiled without Java FX support and then an UnsupportedAudioFileException.
Please provide any additional information below. Attach a screenshot if possible.
Mp3 support was added under #2089. The status report doesn't say whether my JDK includes jfx support - it does. If it doesn't, you get an alert when installing the javafx plugin, and I'm not getting that alert.
I tried with the macOS package and there was the same warning and error. The macOS package contains a JRE which includes openjfx.
With a traditional svn and ant build, I tried commenting out lines 55-57 of build.xml
<not> <available classname="javafx.scene.media.Media"/> </not>
This did not fix the issue. I tried it because of the warning that JOSM was compiled without Java FX support.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2023-05-01 18:25:03 +0200 (Mon, 01 May 2023) Revision:18721 Build-Date:2023-05-02 01:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18721 en_GB) Mac OS X 11.7.7 OS Build number: macOS 11.7.7 (20G1345) Memory Usage: 274 MB / 4096 MB (92 MB allocated, but free) Java version: 17.0.7+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.apple.laf.AquaLookAndFeel Screen: Display 725375437 1920×1200 (scaling 1.00×1.00) Maximum Screen Size: 1920×1200 Best cursor sizes: 16×16→16×16, 32×32→32×32 Environment variable LANG: en_GB.UTF-8 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: en_GB Numbers with default locale: 1234567890 -> 1234567890 Dataset consistency test: No problems found Plugins: + ImportImagePlugin (36013) + InfoMode (35978) + PicLayer (1.0.2) + apache-commons (36034) + cadastre-fr (36021) + editgpx (36054) + ejml (35924) + geotools (36068) + http2 (35921) + imagery_offset_db (35978) + jackson (36034) + javafx (36034) + jaxb (35952) + jts (36004) + log4j (36034) + measurement (35978) + opendata (36076) + photo_geotagging (35933) + poly (35976) + reverter (36043) + turnrestrictions (36011) + undelete (36011) + utilsplugin2 (36011) + waydownloader (36011) Last errors/warnings: - 00097.682 W: JOSM compiled without Java FX support. Falling back to Java Sound API - 00097.699 E: org.openstreetmap.josm.io.audio.AudioException: javax.sound.sampled.UnsupportedAudioFileException: URL of unsupported format. Cause: javax.sound.sampled.UnsupportedAudioFileException: URL of unsupported format - 00097.700 E: org.openstreetmap.josm.io.audio.AudioException: javax.sound.sampled.UnsupportedAudioFileException: URL of unsupported format
Attachments (0)
Change History (5)
comment:1 by , 19 months ago
Component: | Core audio → Plugin javafx |
---|---|
Owner: | changed from | to
comment:4 by , 19 months ago
I have installed the new version of the javafx plugin, and mp3 playback is now working. Thank you for the quick fix.
comment:5 by , 19 months ago
No problem. It was trivial to fix once someone noticed the problem. It probably got broken (accidentally) when we moved the JavaFX player out of JOSM core and into the javafx plugin.
I've managed to reproduce locally, and the stack trace is as follows:
After a bit of debugging, it looks like there was another stack trace,
So the problem is probably due to the JavaFX audio player constructor visibility. Which is easy enough to fix.