I ve implemented a JavaFX Application for showing jpg and mp4 files using ImageView and MediaPlayer.
On my private Windows 10 PC everything works fine. But on my company's Windows 10 PC the Java Virtual machine crashes completely when I try to play an mp4 file (while jpgs also work well here). "Crashing" means no exception is thrown but a popup window appears:
Important code lines:
Path fileOnDisk = new Path(...);
Media media = new Media(fileOnDisk.toFile().toURI.toString())
MediaPlayer mediaPlayer = new MediaPlayer(media);
...
In the last line the crash takes place.
While trying to find the exact location of the crash I used IntelliJ's debugger to step into MediaPlayer.java
. Here there is the class MediaPlayerShutdownHook
. The crash happens inside void addMediaPlayer()
after executing the line if (jfxPlayer != null)
just before executing MediaPlayerShutdownHook.addMediaPlayer(this);
I tried this with JDK8 (serveral subversion), JDK9, Adopt OpenJDK8, Adopt Open JDK 11 (with OpenJFX): the effect remained the same.
Further investigations seeking for differences between the installations of the Windows-Versions brought me to the Windows Event Viewer which recorded the crash. It says that javaw.exe caused the exception 0xc000409
in the module PayloadRestrictions.dll
Here is the complete message (sorry for being german)
Name der fehlerhaften Anwendung: javaw.exe, Version: 8.0.2110.12, Zeitstempel: 0x5ca2e23b
Name des fehlerhaften Moduls: PayloadRestrictions.dll, Version: 10.0.16299.461, Zeitstempel: 0xc43cac91
Ausnahmecode: 0xc0000409
Fehleroffset: 0x000000000003a570
ID des fehlerhaften Prozesses: 0x1d50
Startzeit der fehlerhaften Anwendung: 0x01d54496ba4afa4b
Pfad der fehlerhaften Anwendung: C:\Program Files\Java\jre1.8.0_211\bin\javaw.exe
Pfad des fehlerhaften Moduls: C:\WINDOWS\SYSTEM32\PayloadRestrictions.dll
Berichtskennung: 9b2608fa-6792-4b17-9d0e-01411fb6ffb3
My investigations in the internet led me to a similar problem caused by ExportAdressFiltering (EAF) in the Windows Security.
Link to the article where firefox.exe causes a similar problem
This is possibly the 'difference' between the Windows installations I ve searched for: my private computer uses standard settings while the company's PC's settings are controlled by the IT department.
The jpg files and mp4 file are in the same (local) location so there should be no reason for access restrictions. But maybe ImageView uses a different access method to the the files than MediaPlayer?!?
Can I use MediaPlayer in a different way, so that EAF is no longer an obstacle?
Thank your for your help
Ingo
User contributions licensed under CC BY-SA 3.0