Sushi segfaults gjs when previewing a m4a file
GJS segfaults a few seconds after previewing an m4a file and also after finishing to preview an mp3.
Commands to run:
gdb --args gjs -d /usr/lib/org.gnome.NautilusPreviewer
- in the gdb prompt,
run
thenc
gdbus call --session --dest org.gnome.NautilusPreviewer --object-path /org/gnome/NautilusPreviewer --method org.gnome.NautilusPreviewer.ShowFile "file:///path/to/Voix_011.m4a" 0 true
File causing the backtrace: Voix_011.m4a
Backtrace:
Thread 1 "gjs" received signal SIGSEGV, Segmentation fault.
ObjectBase::invalidate_all_closures (this=this@entry=0x5555559e8000)
at /usr/include/c++/9.2.0/bits/forward_list.h:716
716 begin() noexcept
(gdb) bt
#0 0x00007ffff7eb3640 in ObjectBase::invalidate_all_closures() (this=this@entry=0x5555559e8000)
at /usr/include/c++/9.2.0/bits/forward_list.h:716
#1 0x00007ffff7eb3a03 in ObjectInstance::~ObjectInstance() (this=0x5555559e8000, __in_chrg=<optimized out>)
at gi/object.cpp:1549
#2 0x00007ffff7eba04a in GIWrapperInstance<ObjectBase, ObjectPrototype, ObjectInstance, _GObject>::finalize_impl(JSFreeOp*, JSObject*) (this=0x5555559e8000) at ./gi/wrapperutils.h:1091
#3 0x00007ffff7eba04a in GIWrapperBase<ObjectBase, ObjectPrototype, ObjectInstance>::finalize(JSFreeOp*, JSObject*) (fop=<optimized out>, obj=0x7fffed23a4f0) at ./gi/wrapperutils.h:470
#4 0x00007ffff69592c3 in () at /usr/lib/libmozjs-60.so.0
#5 0x00007ffff695aadd in () at /usr/lib/libmozjs-60.so.0
#6 0x00007ffff695c194 in () at /usr/lib/libmozjs-60.so.0
#7 0x00007ffff695de8f in () at /usr/lib/libmozjs-60.so.0
#8 0x00007ffff6937617 in () at /usr/lib/libmozjs-60.so.0
#9 0x00007ffff6937503 in () at /usr/lib/libmozjs-60.so.0
#10 0x00007ffff6937404 in () at /usr/lib/libmozjs-60.so.0
#11 0x00007ffff694552a in () at /usr/lib/libmozjs-60.so.0
#12 0x00007ffff6945cf0 in () at /usr/lib/libmozjs-60.so.0
#13 0x00007ffff696b3d2 in () at /usr/lib/libmozjs-60.so.0
#14 0x00007ffff696c6c6 in () at /usr/lib/libmozjs-60.so.0
#15 0x00007ffff696cdbe in () at /usr/lib/libmozjs-60.so.0
#16 0x00007ffff696d4dc in () at /usr/lib/libmozjs-60.so.0
#17 0x00007ffff7ecb87e in GjsContextPrivate::trigger_gc_if_needed(void*) (data=0x5555555850b0)
at gjs/context.cpp:588
#18 0x00007ffff7b91ab4 in () at /usr/lib/libglib-2.0.so.0
#19 0x00007ffff7b922bf in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#20 0x00007ffff7b94201 in () at /usr/lib/libglib-2.0.so.0
#21 0x00007ffff7b94241 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#22 0x00007ffff7d45a3e in g_application_run () at /usr/lib/libgio-2.0.so.0
#23 0x00007ffff79166d0 in ffi_call_unix64 () at /usr/lib/libffi.so.6
#24 0x00007ffff79160a0 in ffi_call () at /usr/lib/libffi.so.6
#25 0x00007ffff7ea4b65 in gjs_invoke_c_function(JSContext*, Function*, JS::HandleObject, JS::HandleValueArray const&, mozilla::Maybe<JS::MutableHandle<JS::Value> >, GIArgument*)
(context=0x5555555844e0, function=0x555555a2c180, obj=..., args=..., js_rval=..., r_value=0x0)
at gi/function.cpp:1106
#26 0x00007ffff7ea694c in function_call(JSContext*, unsigned int, JS::Value*)
(context=0x5555555844e0, js_argc=1, vp=<optimized out>) at /usr/include/mozjs-60/js/RootingAPI.h:1090
#27 0x00007ffff6262265 in () at /usr/lib/libmozjs-60.so.0
#28 0x00007ffff6253882 in () at /usr/lib/libmozjs-60.so.0
#29 0x00007ffff6261aa6 in () at /usr/lib/libmozjs-60.so.0
#30 0x00007ffff62637cf in () at /usr/lib/libmozjs-60.so.0
#31 0x00007ffff65e2407 in () at /usr/lib/libmozjs-60.so.0
#32 0x00007ffff65e4229 in JS::Evaluate(JSContext*, JS::AutoVector<JSObject*>&, JS::ReadOnlyCompileOptions const&, JS::SourceBufferHolder&, JS::MutableHandle<JS::Value>) () at /usr/lib/libmozjs-60.so.0
#33 0x00007ffff7ece093 in GjsContextPrivate::eval_with_scope(JS::Handle<JSObject*>, char const*, long, char const*, JS::MutableHandle<JS::Value>)
(this=0x5555555850b0, scope_object=..., script=<optimized out>, script_len=<optimized out>, filename=0x55555557e190 "/usr/lib/org.gnome.NautilusPreviewer", retval=...) at gjs/context.cpp:1009
#34 0x00007ffff7ece408 in GjsContextPrivate::eval(char const*, long, char const*, int*, _GError**)
(this=0x5555555850b0, script=0x55555557f230 "#!/usr/bin/gjs\n\nimports.package.init({\n name: 'sushi',\n version: '3.34.0',\n prefix: '/usr',\n libdir: '/usr/lib',\n});\nimports.package.run(imports.ui.main);\n", script_len=167, filename=0x55555557e190 "/usr/lib/org.gnome.NautilusPreviewer", exit_status_p=0x7fffffffdc68, error=0x7fffffffdc20) at /usr/include/mozjs-60/js/RootingAPI.h:1116
#35 0x00007ffff7ece72e in gjs_context_eval(GjsContext*, char const*, gssize, char const*, int*, GError**)
(js_context=0x5555555851a0, script=0x55555557f230 "#!/usr/bin/gjs\n\nimports.package.init({\n name: 'sushi',\n version: '3.34.0',\n prefix: '/usr',\n libdir: '/usr/lib',\n});\nimports.package.run(imports.ui.main);\n", script_len=167, filename=0x55555557e190 "/usr/lib/org.gnome.NautilusPreviewer", exit_status_p=0x7fffffffdc68, error=0x7fffffffdc20) at gjs/context.cpp:862
#36 0x0000555555556811 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at gjs/console.cpp:366
I also tried with an mp3 file and while it didn't crash after a few seconds, it crashed at the end. I don't know if it's related to the fact the GUI after showing the overview got hidden.
Backtrace:
Thread 1 "gjs" received signal SIGSEGV, Segmentation fault.
0x00007ffff7b6da9d in g_slice_alloc () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0 0x00007ffff7b6da9d in g_slice_alloc () at /usr/lib/libglib-2.0.so.0
#1 0x00007ffff7930d7a in () at /usr/lib/libgirepository-1.0.so.1
#2 0x00007ffff7eaf15d in find_vfunc_on_parents(GIObjectInfo*, char const*, bool*)
(info=<optimized out>, name=0x555555c182a6 "get_preferred_width", out_defined_by_parent=0x7fffffffa7a0) at gi/object.cpp:568
#3 0x00007ffff7eb2c38 in ObjectPrototype::resolve_impl(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, char const*, bool*)
(this=0x555555a311e0, context=0x5555555844e0, obj=..., id=..., name=0x555555c182a0 "vfunc_get_preferred_width", resolved=0x7fffffffa908) at gi/object.cpp:762
#4 0x00007ffff7eb9f15 in GIWrapperBase<ObjectBase, ObjectPrototype, ObjectInstance>::resolve(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool*)
(cx=0x5555555844e0, obj=..., id=..., resolved=0x7fffffffa908) at ./gi/wrapperutils.h:233
#5 0x00007ffff6717f83 in () at /usr/lib/libmozjs-60.so.0
#6 0x00007ffff653f675 in () at /usr/lib/libmozjs-60.so.0
#7 0x00000b97fc8f622b in ()
#8 0x00007fffffffb550 in ()
#9 0x00007fffffffaca8 in ()
#10 0x0000000000002043 in ()
#11 0xfff9800000000000 in ()
#12 0x00007ffff78a2d20 in () at /usr/lib/libmozjs-60.so.0
#13 0x00000b97fc97b538 in ()
#14 0x0000000000007821 in ()
#15 0x00007fffffffad08 in ()
#16 0x00005555563b7e58 in ()
#17 0xfffe7fffef884a40 in ()
#18 0xfffe7fffef8fa970 in ()
#19 0xfffe7fffef884a40 in ()
#20 0xfffa80000000000f in ()
#21 0xfffa80000000000f in ()
#22 0xfffe7fffef884a40 in ()
#23 0x00007fffed124b0f in gst_object_get_parent () at /usr/lib/libgstreamer-1.0.so.0
#24 0x00005555555844e0 in ()
#25 0x00000044ffffb3b0 in ()
#26 0x00007fffffffada0 in ()
#27 0x00000b97fc8f54e8 in ()
#28 0x0000000000002043 in ()
#29 0x00007fffef8f3a10 in ()
#30 0x0000000000000000 in ()
- ArchLinux
- sushi 3.34.0
- gjs 1.58.1