Bug 269689 - multimedia/kodi: Kodi crashes on startup after updating to v.20
Summary: multimedia/kodi: Kodi crashes on startup after updating to v.20
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2023-02-19 17:32 UTC by vgBSD
Modified: 2023-07-25 12:40 UTC (History)
3 users (show)

See Also:
yzrh: maintainer-feedback+


Attachments
kodi crashlog with debug (25.88 KB, text/plain)
2023-02-19 17:32 UTC, vgBSD
no flags Details
kodi (ports) crashlog with debug (25.68 KB, text/plain)
2023-02-20 16:59 UTC, vgBSD
no flags Details
kodi-standalone crashlog (18.29 KB, text/plain)
2023-02-20 17:50 UTC, vgBSD
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description vgBSD 2023-02-19 17:32:36 UTC
Created attachment 240261 [details]
kodi crashlog with debug

FreeBSD vg@BSD 13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 GENERIC amd64

Kodi v.19.5 worked without any problems. After updating to v.20 it does not start:

% kodi
libva info: VA-API version 1.17.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Crash report available at /home/kodi_crashlog-20230219_231520.log

Installed the package 'libva-vdpau-driver' - does not start:

% env LIBVA_DRIVER_NAME=vdpau kodi
libva info: VA-API version 1.17.0
libva info: User environment variable requested driver 'vdpau'
libva info: Trying to open /usr/local/lib/dri/vdpau_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
Crash report available at /home/kodi_crashlog-20230219_232032.log

%  vainfo
Trying display: x11
libva info: VA-API version 1.17.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
vaInitialize failed with error code -1 (unknown libva error),exit

%  env LIBVA_DRIVER_NAME=vdpau vainfo
Trying display: x11
libva info: VA-API version 1.17.0
libva info: User environment variable requested driver 'vdpau'
libva info: Trying to open /usr/local/lib/dri/vdpau_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.17.1)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG4Simple            :	VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    :	VAEntrypointVLD
      <unknown profile>               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
Comment 1 yzrh 2023-02-19 19:24:37 UTC
Could you also post the output of `glxinfo -B'?
Comment 2 vgBSD 2023-02-20 02:36:22 UTC
% glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 1024 MB
    Total available memory: 1024 MB
    Currently available dedicated video memory: 873 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 610/PCIe/SSE2
OpenGL core profile version string: 4.5.0 NVIDIA 390.154
OpenGL core profile shading language version string: 4.50 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.5.0 NVIDIA 390.154
OpenGL shading language version string: 4.50 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 390.154
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
Comment 3 yzrh 2023-02-20 10:27:47 UTC
Looks like it is connected to VAAPI.
Is it possible for you to install from
ports with option VAAPI off?
Comment 4 vgBSD 2023-02-20 13:54:49 UTC
Yes. I built Kodi from the ports, disabling the VAAPI option... It won't start. Silently crashes, doesn't show any error information.

%kodi
Crash report available at /home/kodi_crashlog-20230220_195404.log
%
Comment 5 yzrh 2023-02-20 16:36:00 UTC
Could you attach the new crash log?
Comment 6 vgBSD 2023-02-20 16:59:37 UTC
Created attachment 240287 [details]
kodi (ports) crashlog with debug
Comment 7 yzrh 2023-02-20 17:25:21 UTC
Does it work with startx?

Like with `exec kodi-standalone' in .xinitrc
Comment 8 vgBSD 2023-02-20 17:50:35 UTC
Created attachment 240291 [details]
kodi-standalone crashlog
Comment 9 vgBSD 2023-02-20 17:51:40 UTC
No, it doesn't.

exec kodi-standalone 

Crash report available at /home/kodi_crashlog-20230220_234232.log
Crash report available at /home/kodi_crashlog-20230220_234235.log
Crash report available at /home/kodi_crashlog-20230220_234237.log
/usr/local/bin/kodi --standalone  has exited in an unclean state 3 times in the last 7 seconds.
Something is probably wrong
Comment 10 yzrh 2023-02-21 10:36:08 UTC
Looks like it is reported upstream as well.
Do you think
        https://github.com/xbmc/xbmc/issues/22491
is similar to what you are experiencing?
Comment 11 yzrh 2023-02-21 10:43:03 UTC
It seems to only affect NVIDIA.
There is one more thing to try: install from ports again,
this time, select GLES and deselect WAYLAND.
Comment 12 vgBSD 2023-02-21 14:35:47 UTC
"install from ports again, this time, select GLES and deselect WAYLAND"

That didn't work either.

"Do you think https://github.com/xbmc/xbmc/issues/22491 is similar to what you are experiencing?"

Yes, that's my case. This command solves it:

%  env LD_PRELOAD=/usr/local/lib/libGL-NVIDIA.so kodi

Kodi starts up and works.
Thank you!
Comment 13 yzrh 2023-02-21 19:33:33 UTC
It is always strange when nvidia-driver is involved :)
Comment 14 Florian Walpen 2023-04-09 02:07:59 UTC
(In reply to vgBSD from comment #12)
> Yes, that's my case. This command solves it:
> 
> %  env LD_PRELOAD=/usr/local/lib/libGL-NVIDIA.so kodi
> 
> Kodi starts up and works.

Does it work for you with port default options, or is this with options VAAPI, GLES and WAYLAND modified? After resolving the crash with the command above, I'm running into secondary problems, using binary packages (default options):

...
critical <general>: CApplication::CreateGUI - unable to init windowing system
...
Comment 15 vgBSD 2023-04-09 03:33:06 UTC
I don't use ports. Only binary packages. Recently, after another package update (I don't know which package affected which), kodi stopped launching with this command.

It would only start like this

% env LD_PRELOAD=/usr/local/lib/libGL.so kodi

but it had a heavy CPU load and lags. 

glxinfo gave me some error with OpenGL and also found a bug in Xorg.log:

...

(EE) NVIDIA(0): Failed to initialize the GLX module...

...

Forcefully updating nvidia driver solved the problem.
kodi starts:

% env LD_PRELOAD=/usr/local/lib/libGL-NVIDIA.so kodi

and works fine.
Comment 16 Florian Walpen 2023-04-09 11:39:41 UTC
(In reply to vgBSD from comment #15)

Thanks for the clarification - this means my problem still persists, but I can skip some unnecessary testing.
Comment 17 Florian Walpen 2023-07-25 12:40:16 UTC
If I understand correctly, kodi release 20.2 should fix the issue with GLX library mixups for older nvidia drivers. See:
https://github.com/xbmc/xbmc/releases/tag/20.2-Nexus

> [backport] Revert "[cmake] glx: find glx library instead of gl" by @lrusak in #23275

About my probably unrelated problem, kodi still crashes for me when started from CLI or the "slim" login manager. But I was able to setup an x11/sddm autologin which seems to work, don't know what the difference is.