After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782508 - Segmentation fault when presentation is opened two times in a row
Segmentation fault when presentation is opened two times in a row
Status: RESOLVED OBSOLETE
Product: gnome-documents
Classification: Core
Component: general
3.22.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-05-11 09:00 UTC by Debarshi Ray
Modified: 2021-07-05 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lokview: Fix crash on repeated open of presentations (1.32 KB, patch)
2017-05-11 11:44 UTC, Debarshi Ray
none Details | Review
lokview: Fix crash on repeated open of presentations (1.34 KB, patch)
2017-05-11 18:10 UTC, Debarshi Ray
none Details | Review

Description Debarshi Ray 2017-05-11 09:00:37 UTC
See this RHEL bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1444437

Previewing two presentations (PPT, PPTX, ODP) , one after the another, leads to a crash with this backtrace:

Core was generated by `/usr/bin/gjs-console /usr/bin/gnome-documents'.
Program terminated with signal SIGSEGV, Segmentation fault.

Thread 12 (Thread 0x7f31d071e700 (LWP 28097))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait_until
    at gthread-posix.c line 1442
  • #2 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 422
  • #3 g_async_queue_timeout_pop_unlocked
    at gasyncqueue.c line 570
  • #4 g_thread_pool_wait_for_new_task
    at gthreadpool.c line 262
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 296
  • #6 g_thread_proxy
    at gthread.c line 784
  • #7 start_thread
    at pthread_create.c line 333
  • #8 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 105

Thread 10 (Thread 0x7f31e3198700 (LWP 28010))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait_until
    at gthread-posix.c line 1442
  • #2 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 422
  • #3 g_async_queue_timeout_pop_unlocked
    at gasyncqueue.c line 570
  • #4 g_thread_pool_wait_for_new_task
    at gthreadpool.c line 262
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 296
  • #6 g_thread_proxy
    at gthread.c line 784
  • #7 start_thread
    at pthread_create.c line 333
  • #8 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 105

Thread 8 (Thread 0x7f31c0126700 (LWP 28098))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait_until
    at gthread-posix.c line 1442
  • #2 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 422
  • #3 g_async_queue_timeout_pop_unlocked
    at gasyncqueue.c line 570
  • #4 g_thread_pool_wait_for_new_task
    at gthreadpool.c line 262
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 296
  • #6 g_thread_proxy
    at gthread.c line 784
  • #7 start_thread
    at pthread_create.c line 333
  • #8 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 105

Thread 1 (Thread 0x7f31fe0b2a80 (LWP 28004))

  • #0 SfxShell::GetViewShell() const
    at /usr/src/debug/libreoffice-5.2.6.2/sfx2/source/control/shell.cxx line 133
  • #1 sd::ViewShell::GetViewFrame() const
    at /usr/src/debug/libreoffice-5.2.6.2/sd/source/ui/view/viewshel.cxx line 130
  • #2 SdXImpressDocument::initializeForTiledRendering(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
    at /usr/src/debug/libreoffice-5.2.6.2/sd/source/ui/unoidl/unomodel.cxx line 2385
  • #3 doc_initializeForRendering(LibreOfficeKitDocument*, char const*)
    at /usr/src/debug/libreoffice-5.2.6.2/desktop/source/lib/init.cxx line 1130
  • #4 postDocumentLoad(gpointer)
    at /usr/src/debug/libreoffice-5.2.6.2/libreofficekit/source/gtk/lokdocview.cxx line 833
  • #5 gdk_threads_dispatch
  • #6 g_idle_dispatch
    at gmain.c line 5545
  • #7 g_main_dispatch
    at gmain.c line 3203
  • #8 g_main_context_dispatch
    at gmain.c line 3856
  • #9 g_main_context_iterate
    at gmain.c line 3929
  • #10 g_main_context_iteration
    at gmain.c line 3990
  • #11 g_application_run
    at gapplication.c line 2381
  • #12 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #13 ffi_call
    at ../src/x86/ffi64.c line 525
  • #14 gjs_invoke_c_function(JSContext*, Function*, JSObject*, unsigned int, jsval*, jsval*, GArgument*)
    at gi/function.cpp line 999
  • #15 function_call(JSContext*, unsigned int, jsval*)
    at gi/function.cpp line 1323
  • #16 js::CallJSNative(JSContext*, int (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&)
    at /usr/src/debug/mozjs-24.2.0/js/src/jscntxtinlines.h line 321
  • #17 js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 474
  • #18 Interpret(JSContext*, js::RunState&)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 2298
  • #19 js::RunScript(JSContext*, js::RunState&)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 438
  • #20 js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value const&, js::ExecuteType, js::AbstractFramePtr, JS::Value*)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 622
  • #21 js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 659
  • #22 JS::Evaluate(JSContext*, JS::Handle<JSObject*>, JS::CompileOptions, unsigned short const*, unsigned long, JS::Value*)
    at /usr/src/debug/mozjs-24.2.0/js/src/jsapi.cpp line 5443
  • #23 JS::Evaluate(JSContext*, JS::Handle<JSObject*>, JS::CompileOptions, char const*, unsigned long, JS::Value*)
  • #24 gjs_eval_with_scope(JSContext*, JSObject*, char const*, gssize, char const*, jsval*)
  • #25 gjs_context_eval(GjsContext*, char const*, gssize, char const*, int*, GError**)
  • #26 main(int, char**)
    at gjs/console.cpp line 146

Comment 1 Debarshi Ray 2017-05-11 11:44:37 UTC
Created attachment 351617 [details] [review]
lokview: Fix crash on repeated open of presentations
Comment 2 Debarshi Ray 2017-05-11 11:45:35 UTC
That's Caolan's patch from https://bugzilla.redhat.com/show_bug.cgi?id=1444437. I tweaked it to use vfunc_destroy like the Preview base-class instead of a signal connection.
Comment 3 Debarshi Ray 2017-05-11 18:10:05 UTC
Created attachment 351658 [details] [review]
lokview: Fix crash on repeated open of presentations

I forgot to remove the tabs.
Comment 4 Cosimo Cecchi 2017-05-11 19:18:03 UTC
Review of attachment 351658 [details] [review]:

I am confused why this is needed in practice, since we always call destroy() on the old preview before creating a new one, and destroying the main widget should cause the lokview to be destroyed too. Does that not happen?
Comment 5 GNOME Infrastructure Team 2021-07-05 11:31:00 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-documents/-/issues/

Thank you for your understanding and your help.