Bug 96421 - LOKView Crash when search is reset on startup
Summary: LOKView Crash when search is reset on startup
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Pranav Kant
URL:
Whiteboard: target:5.2.0 target:5.1.0.2
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-11 17:32 UTC by Bastien Nocera
Modified: 2016-10-25 19:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bastien Nocera 2015-12-11 17:32:16 UTC
Calling view.highlight_all(''); from JavaScript can cause a crasher when the view is being initialised.

We probably should be deferring any search highlighting until the view is realized and visible:

(org.gnome.Documents:24174): Gdk-CRITICAL **: gdk_window_get_visible_region: assertion 'GDK_IS_WINDOW (window)' failed

#0  0x00007ffff50fc803 in _g_log_abort (breakpoint=1) at gmessages.c:324
#1  g_logv (log_domain=0x7ffff6f6e9ce "Gdk", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffffffe2cc8) at gmessages.c:1079
#2  0x00007ffff50fc962 in g_log (log_domain=log_domain@entry=0x7ffff6f6e9ce "Gdk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff516af70 "%s: assertion '%s' failed")
    at gmessages.c:1118
#3  0x00007ffff50fc989 in g_return_if_fail_warning (log_domain=log_domain@entry=0x7ffff6f6e9ce "Gdk", pretty_function=pretty_function@entry=0x7ffff6f862f0 <__func__.59259> "gdk_window_get_visible_region", 
    expression=expression@entry=0x7ffff6f6f327 "GDK_IS_WINDOW (window)") at gmessages.c:1133
#4  0x00007ffff6f20794 in gdk_window_get_visible_region (window=0x0) at gdkwindow.c:3242
#5  0x00007fffd05ea85a in doSearch(_LOKDocView*, char const*, bool, bool) () from /lib64/liblibreofficekitgtk.so
#6  0x00007ffff5fdad30 in ffi_call_unix64 () from /lib64/libffi.so.6
#7  0x00007ffff5fda79b in ffi_call () from /lib64/libffi.so.6
#8  0x00007ffff7b7163b in gjs_invoke_c_function (context=context@entry=0x646570, function=function@entry=0x2e30630, obj=obj@entry=0x7fffe0be6160, js_argc=js_argc@entry=1, js_argv=js_argv@entry=0x687800, 
    js_rval=js_rval@entry=0x7ffffffe3650, r_value=0x0) at gi/function.cpp:999
#9  0x00007ffff7b72aff in function_call (context=0x646570, js_argc=1, vp=0x6877f0) at gi/function.cpp:1322
#10 0x00007ffff4a0725c in js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) () from /lib64/libmozjs-24.so
#11 0x00007ffff4a081de in Interpret(JSContext*, js::RunState&) () from /lib64/libmozjs-24.so
#12 0x00007ffff4a102a8 in js::RunScript(JSContext*, js::RunState&) () from /lib64/libmozjs-24.so
#13 0x00007ffff4a0714d in js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) () from /lib64/libmozjs-24.so
#14 0x00007ffff4b18df5 in js_fun_apply(JSContext*, unsigned int, JS::Value*) () from /lib64/libmozjs-24.so
#15 0x00007ffff4a071e5 in js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) () from /lib64/libmozjs-24.so
#16 0x00007ffff4a0762b in js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) () from /lib64/libmozjs-24.so
#17 0x00007ffff4c61d0d in js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) () from /lib64/libmozjs-24.so
#18 0x00007ffff7feeaa2 in ?? ()
#19 0x0000000000000000 in ?? ()
Comment 1 Commit Notification 2016-01-11 11:25:54 UTC
Pranav Kant committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4200a678fb54f0fa5d2f0c26c655252f9267a527

tdf#96421: Return if no window is realized

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2016-01-11 15:49:40 UTC
Pranav Kant committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0056a61e17e0d8faf314431c701c00c3b6c8d5f9&h=libreoffice-5-1

tdf#96421: Return if no window is realized

It will be available in 5.1.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.