celluloid-player / celluloid

A simple GTK+ frontend for mpv
https://celluloid-player.github.io
GNU General Public License v3.0
1.16k stars 92 forks source link

'celluloid' terminated by signal SIGFPE #930

Open jonasmalacofilho opened 8 months ago

jonasmalacofilho commented 8 months ago

Overview Description: 'celluloid' starts but then immediately crashes with SIGFPE.

Steps to Reproduce:

  1. Start celluloid

Actual Results: the interface briefly comes up, but then the program immediately crashes.

$ celluloid
(io.github.celluloid_player.Celluloid:66797): Adwaita-WARNING **: 01:01:43.588: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.
fish: Job 1, 'celluloid' terminated by signal SIGFPE (Floating point exception)

Expected Results: for it to not crash.

Version: current Git HEAD: b8aa41deb7ad. Can't test 0.26 because of #921.

Additional Information:

Backtrace:

Thread 1 "celluloid" received signal SIGFPE, Arithmetic exception.
0x00007fffdd6175c7 in ?? () from /usr/lib/dri/nvidia_drv_video.so
(gdb) bt
#0  0x00007fffdd6175c7 in ??? () at /usr/lib/dri/nvidia_drv_video.so
#1  0x00007fffdd6176ad in ??? () at /usr/lib/dri/nvidia_drv_video.so
#2  0x00007fffdd61c6bb in __vaDriverInit_1_13 () at /usr/lib/dri/nvidia_drv_video.so
#3  0x00007ffff278a27c in va_openDriver (driver_name=<optimized out>, dpy=0x555556329980) at ../libva/va/va.c:478
#4  va_new_opendriver (dpy=0x555556329980) at ../libva/va/va.c:714
#5  vaInitialize (minor_version=0x7fffffffd228, major_version=0x7fffffffd22c, dpy=0x555556329980) at ../libva/va/va.c:743
#6  vaInitialize (dpy=dpy@entry=0x555556329980, major_version=major_version@entry=0x7fffffffd22c, minor_version=minor_version@entry=0x7fffffffd228) at ../libva/va/va.c:727
#7  0x00007ffff7179f7c in va_initialize (display=0x555556329980, plog=0x55555632d830, probing=probing@entry=true) at ../mpv/video/vaapi.c:116
#8  0x00007ffff7180191 in init (hw=0x5555562319e0) at ../mpv/video/out/hwdec/hwdec_vaapi.c:160
#9  0x00007ffff70fc702 in ra_hwdec_load_driver (is_auto=true, drv=0x7ffff72b2a60 <ra_hwdec_vaapi>, devs=0x55555632d6c0, global=0x555555940700, log=0x555556341cf0, ra_ctx=0x55555568d1d0) at ../mpv/video/out/gpu/hwdec.c:108
#10 load_add_hwdec (is_auto=true, drv=0x7ffff72b2a60 <ra_hwdec_vaapi>, devs=0x55555632d6c0, ctx=0x5555564e9318) at ../mpv/video/out/gpu/hwdec.c:240
#11 load_add_hwdec (ctx=0x5555564e9318, devs=0x55555632d6c0, drv=0x7ffff72b2a60 <ra_hwdec_vaapi>, is_auto=<optimized out>) at ../mpv/video/out/gpu/hwdec.c:230
#12 0x00007ffff7103b44 in load_hwdecs_all (devs=<optimized out>, ctx=<optimized out>) at ../mpv/video/out/gpu/hwdec.c:249
#13 load_hwdecs_all (devs=0x55555632d6c0, ctx=0x5555564e9318) at ../mpv/video/out/gpu/hwdec.c:245
#14 ra_hwdec_ctx_init (ctx=0x5555564e9318, devs=0x55555632d6c0, type=<optimized out>, load_all_by_default=load_all_by_default@entry=true) at ../mpv/video/out/gpu/hwdec.c:280
#15 0x00007ffff7104309 in gl_video_init_hwdecs (load_all_by_default=true, devs=<optimized out>, ra_ctx=<optimized out>, p=<optimized out>) at ../mpv/video/out/gpu/video.c:4356
#16 init (ctx=0x5555563c45c0, params=<optimized out>) at ../mpv/video/out/gpu/libmpv_gpu.c:91
#17 0x00007ffff7115346 in mpv_render_context_create (res=res@entry=0x55555593ece8, mpv=<optimized out>, params=params@entry=0x7fffffffd4f0) at ../mpv/video/out/vo_libmpv.c:191
#18 0x0000555555568b2c in celluloid_mpv_init_gl (mpv=<optimized out>) at ../src/celluloid-mpv.c:714
#19 celluloid_model_initialize_gl (model=<optimized out>) at ../src/celluloid-model.c:1162
#20 model_ready_handler (object=<optimized out>, pspec=<optimized out>, data=0x5555556a7500) at ../src/celluloid-controller.c:1022
#21 0x00007ffff7e7f6c0 in g_closure_invoke (closure=0x5555559a2c80, return_value=0x0, n_param_values=2, param_values=0x7fffffffd750, invocation_hint=0x7fffffffd6a0) at ../glib/gobject/gclosure.c:832
#22 0x00007ffff7eada36 in signal_emit_unlocked_R.isra.0 (node=node@entry=0x7fffffffd840, detail=detail@entry=850, instance=instance@entry=0x55555593ed30, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd750) at ../glib/gobject/gsignal.c:3980
#23 0x00007ffff7e9ea42 in signal_emit_valist_unlocked (instance=instance@entry=0x55555593ed30, signal_id=signal_id@entry=1, detail=detail@entry=850, var_args=var_args@entry=0x7fffffffd9a0) at ../glib/gobject/gsignal.c:3612
#24 0x00007ffff7e9ec77 in g_signal_emit_valist (instance=0x55555593ed30, signal_id=1, detail=850, var_args=var_args@entry=0x7fffffffd9a0) at ../glib/gobject/gsignal.c:3355
#25 0x00007ffff7e9ed34 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../glib/gobject/gsignal.c:3675
#26 0x00007ffff7e8a636 in g_object_dispatch_properties_changed (object=0x55555593ed30, n_pspecs=<optimized out>, pspecs=<optimized out>) at ../glib/gobject/gobject.c:1427
#27 0x00007ffff7e90d0f in g_object_notify_by_spec_internal (pspec=<optimized out>, object=0x55555593ed30) at ../glib/gobject/gobject.c:1551
#28 g_object_notify (property_name=0x555555582e5b "ready", object=0x55555593ed30) at ../glib/gobject/gobject.c:1601
#29 g_object_notify (object=object@entry=0x55555593ed30, property_name=property_name@entry=0x555555582e5b "ready") at ../glib/gobject/gobject.c:1578
#30 0x0000555555570e07 in initialize (mpv=0x55555593ed30) at ../src/celluloid-mpv.c:452
#31 0x0000555555573245 in initialize (mpv=0x55555593ed30) at ../src/celluloid-player.c:564
#32 0x000055555556be8c in celluloid_mpv_initialize (mpv=0x55555593ed30) at ../src/celluloid-mpv.c:699
#33 celluloid_model_initialize (model=0x55555593ed30) at ../src/celluloid-model.c:853
#34 initialize_model (data=<optimized out>) at ../src/celluloid-controller.c:457
#35 0x00007ffff7334f69 in g_main_dispatch (context=0x5555555e1f20) at ../glib/glib/gmain.c:3476
#36 0x00007ffff73933a7 in g_main_context_dispatch_unlocked (context=0x5555555e1f20) at ../glib/glib/gmain.c:4284
#37 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x5555555e1f20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#38 0x00007ffff7333162 in g_main_context_iteration (context=context@entry=0x5555555e1f20, may_block=may_block@entry=1) at ../glib/glib/gmain.c:4414
#39 0x00007ffff7506b66 in g_application_run (application=application@entry=0x5555555dc8c0, argc=argc@entry=1, argv=argv@entry=0x7fffffffdfa8) at ../glib/gio/gapplication.c:2577
#40 0x0000555555563087 in main (argc=1, argv=0x7fffffffdfa8) at ../src/celluloid-main.c:36

Additional² Information:

gnome-mpv commented 8 months ago

I don't think this is a bug in Celluloid — the SIGFPE is coming from nvidia_drv_video.so, which is part of libva-vdpau-driver.

jonasmalacofilho commented 8 months ago

I thought about that as I was finishing the issue description, but decided it was best left for you to decide. I don't know enough about celluloid, mpv or libva-vdpau-driver to easily decide whether the issue lies in caller or callee.

Also, for what it's worth, I can play a video with mpv just fine. So it seems that there's something here at least somewhat specific to how celluloid calls mpv.