Page 1 of 1

[Solved] java.lang.NullPointerException with 13.8.0

Posted: Sun Dec 10, 2023 2:07 am
by retosch
Hi all

Updating from 13.6.0 to 13.8.0 produces an error:
java.lang.NullPointerException: Cannot invoke "net.pms.configuration.FormatConfiguration.getMatchedMIMEtype(String, String, String)" because the return value of "net.pms.configuration.RendererConfiguration.getFormatConfiguration()" is null
at net.pms.configuration.RendererConfiguration.isVideoStreamTypeSupportedInTranscodingContainer(RendererConfiguration.java:601)

I still can browse the mediathek on my tv and select movies. but starting the movie produces this error. ZIP-file is attached.

Is this a bug on the app side or on my side?

Thx
Reto

Re: java.lang.NullPointerException with 13.8.0

Posted: Sun Dec 10, 2023 6:38 pm
by mik_s
From the first error in the logs it seems to have trouble loading MediaInfo

Code: Select all

net.pms.parsers.mediainfo.MediaInfoLibrary 
java.lang.UnsatisfiedLinkError: Unable to load library 'zen':
libzen.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
libzen.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
Native library (linux-x86-64/libzen.so) not found in resource path (update.jar:ums.jar)
	at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:323)
	at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:483)
	at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:425)
	at net.pms.parsers.mediainfo.MediaInfoLibrary.createInstance(MediaInfoLibrary.java:78)
	at net.pms.parsers.mediainfo.MediaInfoLibrary.<clinit>(MediaInfoLibrary.java:39)
	at net.pms.parsers.mediainfo.MediaInfoHelper.<init>(MediaInfoHelper.java:37)
	at net.pms.parsers.MediaInfoParser.<clinit>(MediaInfoParser.java:82)
	at net.pms.configuration.RendererConfiguration.isUseMediaInfo(RendererConfiguration.java:1181)
	at net.pms.configuration.RendererConfiguration.init(RendererConfiguration.java:402)
	at net.pms.configuration.RendererConfiguration.<init>(RendererConfiguration.java:213)
	at net.pms.configuration.RendererConfigurations.loadRendererConfigurations(RendererConfigurations.java:371)
	at net.pms.PMS.init(PMS.java:530)
	at net.pms.PMS.createInstance(PMS.java:868)
	at net.pms.PMS.main(PMS.java:1022)
	Suppressed: java.lang.UnsatisfiedLinkError: libzen.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
		at com.sun.jna.Native.open(Native Method)
		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:211)
		... 13 common frames omitted
	Suppressed: java.lang.UnsatisfiedLinkError: libzen.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
		at com.sun.jna.Native.open(Native Method)
		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:224)
		... 13 common frames omitted
	Suppressed: java.io.IOException: Native library (linux-x86-64/libzen.so) not found in resource path (update.jar:ums.jar)
		at com.sun.jna.Native.extractFromResourcePath(Native.java:1145)
		at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:295)
		... 13 common frames omitted
Something to do with "Native library (linux-x86-64/libzen.so) not found in resource path", and without MediaInfo UMS will not know how to handle your media.
It could be you have an old version on your system that did not get updated with UMS, or something is missing from UMS that should have been included when it was installed.

I don't see any mention of MediaInfoLib being loaded though. I'm testing V14 and mine shows as

Code: Select all

[main] Loaded MediaInfoLib - v23.10
I know little about linux to know exactly how to fix but try installing mediainfo yourself and see if that fixes it.

Re: java.lang.NullPointerException with 13.8.0

Posted: Mon Dec 11, 2023 12:47 am
by retosch
Great, that's it, the package mediainfo was not installed. Thanks for pointing this out. After installing it works as before. Up to now mediainfo was not required. Has this been changed as from 13.8.0?

Re: java.lang.NullPointerException with 13.8.0

Posted: Mon Dec 11, 2023 7:09 pm
by mik_s
AFAIK MediaInfo has been used for a long time and should have been installed along with UMS, at least on windows.

I'm not sure if this has always been a requirement though but UMS relies on it to know what format files are in so it can transcoded if it is not supported by your device.

My only guess is that mediainfo was missing from the install package and the old version was removed.

Re: [Solved] java.lang.NullPointerException with 13.8.0

Posted: Mon Jan 08, 2024 5:41 am
by retosch
I'm using now v13.8.1. This version works again like before v13.8.0, i.e. without libmediainfo and libzen installed. The server now use again the less accurate FFmpeg parsing method. So thanks for that.

Re: [Solved] java.lang.NullPointerException with 13.8.0

Posted: Mon Jan 08, 2024 3:24 pm
by boss
I don't believe it will work correctly without mediainfo being installed.
With the Linux version of UMS, it can be configured to use the included version of ffmpeg or use your system ffmpeg.
The included version of ffmpeg is located at: (UMS install directory)/linux. (/opt/ums-13.8.0/linux/ffmpeg)


In its standard configuration (for linux), it is configured to use your system ffmpeg.
In its standard configuration (for linux), this is changed in UMS.conf in the profile directory at this point. ("/home/reto/.config/UMS/UMS.conf")

# Example: /usr/bin/ffmpeg
# Default:
# Win: win32/ffmpeg.exe
# Mac: osx/ffmpeg
# Linux: ffmpeg + system PATH
ffmpeg_path =

It may be worth using the included version of ffmpeg as a test to see how that works.
To do that change:
ffmpeg_path =
TO
ffmpeg_path = /opt/ums-13.8.0/linux/ffmpeg

One thing to watch though is that because you have the version number (13.8.0) in the file name, you would have to change the path to ffmpeg (if using the included version) to whatever version you are using.

I have many versions of UMS on my linux server and I have a symbolic link pointing to whatever version I want to use.
That way the path is always "/opt/ums/
EG:
lrwxr-xr-x 1 root root 14 Dec 29 11:17 ums -> ums-14.0.0-b1/
drwxr-xr-x 8 root root 4096 Jan 31 2021 ums-10.0.1
drwxr-xr-x 8 root root 4096 Sep 19 2021 ums-10.12.0
drwxr-xr-x 8 root root 4096 Mar 14 2022 ums-10.17.1
drwxr-xr-x 7 root root 4096 Nov 2 2022 ums-11.5.0
drwxr-xr-x 7 root root 4096 Nov 30 2022 ums-11.6.0
drwxr-xr-x 7 root root 4096 Dec 30 2022 ums-12.0.1
drwxr-xr-x 7 root root 4096 Jul 7 2023 ums-13.4.1
drwxr-xr-x 8 root root 4096 Aug 6 10:57 ums-13.5.0
drwxr-xr-x 7 root root 4096 Nov 2 20:02 ums-13.6.0
drwxr-xr-x 7 root root 4096 Dec 10 11:23 ums-13.8.0
drwxr-xr-x 7 root root 4096 Dec 29 11:46 ums-14.0.0-b1
drwxr-xr-x 7 root root 4096 Oct 1 2020 ums-7.4.0.good
drwxr-xr-x 7 root root 4096 Nov 1 2022 ums-9.0.0
drwxr-xr-x 7 root root 4096 Sep 16 2021 ums-9.0.1
drwxr-xr-x 7 root root 4096 Jun 28 2023 ums-9.1.0
drwxr-xr-x 8 root root 4096 Sep 16 2021 ums-9.8.2
drwxr-xr-x 8 root root 4096 Dec 23 2020 ums-9.8.3

If I want to use a different version, I just change the symbolic link to point to what version I want to use and no other changes are needed.

Re: [Solved] java.lang.NullPointerException with 13.8.0

Posted: Wed Jan 10, 2024 10:11 am
by retosch
Adding this to UMS.conf "ffmpeg_path = /opt/ums-13.8.1/linux/ffmpeg" has no impact. Log data still states that the server uses the less accurate FFmpeg parsing method, and films are playable as ever before. So there is no issue recognizable.