Bug 91887 - lokdocview: dragging the mouse over widget in non-edit mode crashes the core
Summary: lokdocview: dragging the mouse over widget in non-edit mode crashes the core
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0 target:5.0.0.1
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2015-06-06 09:29 UTC by Pranav Kant
Modified: 2016-10-25 19:23 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pranav Kant 2015-06-06 09:29:26 UTC
I don't know the exact the steps to reproduce this problem. But for me, most of the time, it is when I am in non-edit mode, mouse button clicked and trying to drag the pointer over the widget.

Here is the backtrace:

gtktiledviewer: /opt/libreoffice/sw/source/uibase/uno/unotxdoc.cxx:3222: virtual void SwXTextDocument::postMouseEvent(int, int, int, int): Assertion `false' failed.
[New Thread 0x7fffd6ca7700 (LWP 13116)]
[New Thread 0x7fffde5d8700 (LWP 13111)]
 
Program received signal SIGABRT, Aborted.
0x00007ffff3ce5a98 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install adwaita-gtk2-theme-3.16.0-1.fc22.x86_64 atk-2.16.0-1.fc22.x86_64 at-spi2-atk-2.16.0-1.fc22.x86_64 at-spi2-core-2.16.0-1.fc22.x86_64 avahi-libs-0.6.31-30.fc22.x86_64 bzip2-libs-1.0.6-14.fc22.x86_64 cairo-1.14.2-1.fc22.x86_64 cups-libs-2.0.2-5.fc22.x86_64 dbus-glib-0.104-1.fc22.x86_64 dbus-libs-1.8.16-1.fc22.x86_64 elfutils-libelf-0.161-6.fc22.x86_64 elfutils-libs-0.161-6.fc22.x86_64 expat-2.1.0-10.fc22.x86_64 fontconfig-2.11.93-2.fc22.x86_64 freetype-2.5.5-1.fc22.x86_64 gdk-pixbuf2-2.31.3-1.fc22.x86_64 glib2-2.44.0-1.fc22.x86_64 gmp-6.0.0-9.fc22.x86_64 gnutls-3.3.14-1.fc22.x86_64 graphite2-1.2.4-3.fc22.x86_64 gtk2-2.24.27-1.fc22.x86_64 gvfs-1.24.1-1.fc22.x86_64 harfbuzz-0.9.40-1.fc22.x86_64 keyutils-libs-1.5.9-4.fc22.x86_64 krb5-libs-1.13.1-2.fc22.x86_64 libattr-2.4.47-9.fc22.x86_64 libbluray-0.7.0-1.fc22.x86_64 libcanberra-0.30-7.fc22.x86_64 libcanberra-gtk2-0.30-7.fc22.x86_64 libcap-2.24-7.fc22.x86_64 libcom_err-1.42.12-3.fc22.x86_64 libdrm-2.4.59-4.fc22.x86_64 libffi-3.1-7.fc22.x86_64 libgcc-5.1.1-1.fc22.x86_64 libICE-1.0.9-2.fc22.x86_64 libogg-1.3.2-2.fc22.x86_64 libpng-1.6.16-3.fc22.x86_64 libselinux-2.3-6.fc22.x86_64 libSM-1.2.2-2.fc22.x86_64 libstdc++-5.1.1-1.fc22.x86_64 libtasn1-4.4-1.fc22.x86_64 libtdb-1.3.4-1.fc22.x86_64 libtool-ltdl-2.4.2-33.fc22.x86_64 libuuid-2.26.1-1.fc22.x86_64 libvorbis-1.3.4-3.fc22.x86_64 libwayland-client-1.7.0-1.fc22.x86_64 libwayland-server-1.7.0-1.fc22.x86_64 libX11-1.6.3-1.fc22.x86_64 libXau-1.0.8-4.fc22.x86_64 libxcb-1.11-3.fc22.x86_64 libXcomposite-0.4.4-6.fc22.x86_64 libXcursor-1.1.14-4.fc22.x86_64 libXdamage-1.1.4-6.fc22.x86_64 libXext-1.3.3-2.fc22.x86_64 libXfixes-5.0.1-4.fc22.x86_64 libXi-1.7.4-2.fc22.x86_64 libXinerama-1.1.3-4.fc22.x86_64 libxml2-2.9.2-3.fc22.x86_64 libXrandr-1.4.2-2.fc22.x86_64 libXrender-0.9.8-4.fc22.x86_64 libxshmfence-1.2-1.fc22.x86_64 libxslt-1.1.28-8.fc22.x86_64 libXxf86vm-1.1.4-1.fc22.x86_64 mesa-libEGL-10.5.1-1.20150314.fc22.x86_64 mesa-libgbm-10.5.1-1.20150314.fc22.x86_64 mesa-libGL-10.5.1-1.20150314.fc22.x86_64 mesa-libglapi-10.5.1-1.20150314.fc22.x86_64 nettle-2.7.1-5.fc22.x86_64 nss-mdns-0.10-15.fc22.x86_64 openssl-libs-1.0.1k-6.fc22.x86_64 p11-kit-0.23.1-1.fc22.x86_64 PackageKit-gtk3-module-1.0.6-1.fc22.x86_64 pango-1.36.8-2.fc22.x86_64 pcre-8.36-5.fc22.x86_64 pixman-0.32.6-4.fc22.x86_64 systemd-libs-219-9.fc22.x86_64 trousers-0.3.13-3.fc22.x86_64 xz-libs-5.2.0-2.fc22.x86_64 zlib-1.2.8-7.fc22.x86_64
(gdb) bt
#0  0x00007ffff3ce5a98 in raise () at /lib64/libc.so.6
#1  0x00007ffff3ce772a in abort () at /lib64/libc.so.6
#2  0x00007ffff3cde247 in __assert_fail_base () at /lib64/libc.so.6
#3  0x00007ffff3cde2f2 in  () at /lib64/libc.so.6
#4  0x00007fffc6b828f9 in SwXTextDocument::postMouseEvent(int, int, int, int) (this=0x7fffd76d4a08, nType=2, nX=7605, nY=6795, nCount=1)
    at /opt/libreoffice/sw/source/uibase/uno/unotxdoc.cxx:3222
#5  0x00007ffff7ebe00f in doc_postMouseEvent(LibreOfficeKitDocument*, int, int, int, int) (pThis=0xefcd90, nType=2, nX=7605, nY=6795, nCount=1)
    at /opt/libreoffice/desktop/source/lib/init.cxx:774
#6  0x00007ffff7fb5ab4 in LOKDocView_Impl::signalMotionImpl(_GdkEventButton*) (this=0xe41b00, pEvent=0xe76960)
    at /opt/libreoffice/libreofficekit/source/gtk/lokdocview.cxx:583
#7  0x00007ffff7fb5668 in LOKDocView_Impl::signalMotion(_GtkWidget*, _GdkEventButton*, _LOKDocView*) (pEvent=0xe76960, pDocView=0xe10ba0)
    at /opt/libreoffice/libreofficekit/source/gtk/lokdocview.cxx:527
#8  0x00007ffff78978ad in _gtk_marshal_BOOLEAN__BOXED () at /lib64/libgtk-x11-2.0.so.0
#9  0x00007ffff5bfdc45 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#10 0x00007ffff5c0f4c9 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#11 0x00007ffff5c17ac2 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#12 0x00007ffff5c1829f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#13 0x00007ffff79c790c in gtk_widget_event_internal () at /lib64/libgtk-x11-2.0.so.0
#14 0x00007ffff7895b94 in gtk_propagate_event () at /lib64/libgtk-x11-2.0.so.0
#15 0x00007ffff7895f5b in gtk_main_do_event () at /lib64/libgtk-x11-2.0.so.0
#16 0x00007ffff74ee7dc in gdk_event_dispatch () at /lib64/libgdk-x11-2.0.so.0
#17 0x00007ffff58fe0ba in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#18 0x00007ffff58fe450 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#19 0x00007ffff58fe772 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#20 0x00007ffff7894fa7 in gtk_main () at /lib64/libgtk-x11-2.0.so.0
#21 0x00000000004088ed in main(int, char**) (argc=3, argv=0x7fffffffda48)
    at /opt/libreoffice/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx:485



This might not be a problem with the widget but rather in LO core as specified by above debug message :
sw/source/uibase/uno/unotxdoc.cxx:3222: virtual void SwXTextDocument::postMouseEvent(int, int, int, int): Assertion `false' failed.
Comment 1 Julien Nabet 2015-06-06 12:05:56 UTC
Could you be a bit more specific?
What do you mean when you say "to drag the pointer over the widget"?
Which widget?
Comment 2 Pranav Kant 2015-06-06 12:14:27 UTC
This is I do :

When in non-edit mode, I am hovering my mouse pointer on the widget (say going from left to right side of the widget), and then suddenly press the mouse button for few seconds while still going towards right side, it crashes for me.
Comment 3 Pranav Kant 2015-06-06 12:32:33 UTC
I found another way to reproduce this bug which works in both edit and non-edit mode

In short, you just have to do a double click with your second click's release not at the same position where you clicked your first click.

Let me know if it works for you.
Comment 4 Julien Nabet 2015-06-06 13:45:50 UTC
I still fail to reproduce this.
Certainly someone else will reproduce this.
Comment 5 raal 2015-06-07 18:47:21 UTC
Hello Pranav,
what's your version of LO and OS? I cannot reproduce under linux on master. Widget is toolbar or something else?
Comment 6 Pranav Kant 2015-06-07 18:56:27 UTC
By widget, I mean the drawing area in gtktiledviewer.

I am on Fedora 22, LO master.

And, I might be unclear previously. This is when you run the gtktiledviewer, not the LO suite.

G_MESSAGES_DEBUG=all bin/run gtktiledviewer $PWD/instdir/program file.odt
Comment 7 Pranav Kant 2015-06-07 19:32:12 UTC
Hi Raal,

I hope you were able to reproduce it this time (?).
Comment 8 Pranav Kant 2015-06-11 11:30:40 UTC
It is also possible to reproduce this bug in "Notes" mode while editing .odp files.
Comment 9 Julien Nabet 2015-06-14 13:24:11 UTC
I could reproduce it with the same trace.

Miklos: noticing http://cgit.freedesktop.org/libreoffice/core/commit/?id=7297feb6bcc89c55d1768794754f3b7d796c4c75, thought you might be interested in this one.
Was it on purpose to put assert(false) for default (and so for LOK_MOUSEEVENT_MOUSEMOVE)? If yes, how to avoid the crash?
Comment 10 Julien Nabet 2015-06-14 13:25:02 UTC
Miklos: sorry, I put a comment for you in my previous comment, had just forgotten to put you in cc.
Comment 11 Miklos Vajna 2015-06-16 13:49:16 UTC
Yes, desktop-style "click to the start, then drag to the end" selections is not implemented for Impress in the LOK API. I'll take care of that.
Comment 12 Commit Notification 2015-06-16 14:13:29 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=56f5a402287e735f5a9c1f84931dcbc9e7b579e7

tdf#91887 handle LOK_MOUSEEVENT_MOUSEMOVE in SdXImpressDocument

It will be available in 5.1.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 13 Commit Notification 2015-06-16 15:30:41 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2f0f6960e7e6cd88c6a8da8d0d4b172286c5b9df&h=libreoffice-5-0

tdf#91887 handle LOK_MOUSEEVENT_MOUSEMOVE in SdXImpressDocument

It will be available in 5.0.0.1.

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.