Bug 456844 - Crash while dragging file between split views
Summary: Crash while dragging file between split views
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 22.04.3
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-07-18 02:41 UTC by Grósz Dániel
Modified: 2022-07-21 20:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grósz Dániel 2022-07-18 02:41:38 UTC
Application: kate (22.04.3)

Qt Version: 5.15.5
Frameworks Version: 5.96.0
Operating System: Linux 5.18.9-2-default x86_64
Windowing System: X11
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.25.3 [KCrashBackend]

-- Information about the crash:
Kate often crashes when dragging and dropping a tab between split views (in a particular way). I haven't found a way that reproduces it every time, but a few tries tend to be enough to trigger it.

Conditions that may contribute:
- Vertical split (views side-by-side)
- Having enough files open on both sides that they don't fit on the tab bar  (so buttons with arrows to scroll the tab bar are shown)
- Releasing the mouse when a black frame around the target view, indicating that something can be dropped, is shown
- Releasing the mouse over the tab bar, over a tab or the scrolling buttons
- Moving the mouse horizontally, so that it stays over the tab bars the entire time. (Dragging tabs is unreliable in general if the mouse leaves the tab bar in a vertical direction.)

The crash can be reproduced sometimes.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault

[KCrash Handler]
#4  KateViewSpace::addView (v=<optimized out>, this=<optimized out>) at /usr/src/debug/kate-22.04.3-1.1.x86_64/kate/kateviewspace.cpp:589
#5  KateViewManager::moveViewToViewSpace (doc=<optimized out>, src=<optimized out>, dest=<optimized out>, this=<optimized out>) at /usr/src/debug/kate-22.04.3-1.1.x86_64/kate/kateviewmanager.cpp:808
#6  KateViewManager::moveViewToViewSpace (doc=<optimized out>, src=<optimized out>, dest=<optimized out>, this=<optimized out>) at /usr/src/debug/kate-22.04.3-1.1.x86_64/kate/kateviewmanager.cpp:796
#7  KateViewSpace::dropEvent (this=<optimized out>, e=<optimized out>) at /usr/src/debug/kate-22.04.3-1.1.x86_64/kate/kateviewspace.cpp:534
#8  0x00007f50ed5c2c68 in QWidget::event (this=0x557ed4dc8c50, event=0x7ffd79dd2f60) at kernel/qwidget.cpp:9033
#9  0x00007f50ed58141e in QApplicationPrivate::notify_helper (this=this@entry=0x557ed3d547e0, receiver=receiver@entry=0x557ed4dc8c50, e=e@entry=0x7ffd79dd2f60) at kernel/qapplication.cpp:3637
#10 0x00007f50ed58a326 in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=<optimized out>) at kernel/qapplication.cpp:3383
#11 0x00007f50ec996fb8 in QCoreApplication::notifyInternal2 (receiver=0x557ed4dba8b0, event=0x7ffd79dd2f60) at kernel/qcoreapplication.cpp:1064
#12 0x00007f50ed5de270 in QWidgetWindow::handleDropEvent (this=this@entry=0x557ed5af45c0, event=event@entry=0x7ffd79dd3120) at kernel/qwidgetwindow.cpp:985
#13 0x00007f50ed5df157 in QWidgetWindow::event (this=0x557ed5af45c0, event=0x7ffd79dd3120) at kernel/qwidgetwindow.cpp:342
#14 0x00007f50ed58141e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x557ed5af45c0, e=0x7ffd79dd3120) at kernel/qapplication.cpp:3637
#15 0x00007f50ec996fb8 in QCoreApplication::notifyInternal2 (receiver=0x557ed5af45c0, event=0x7ffd79dd3120) at kernel/qcoreapplication.cpp:1064
#16 0x00007f50ecdf98a8 in QGuiApplicationPrivate::processDrop (w=w@entry=0x557ed5af45c0, dropData=dropData@entry=0x557ed9e4ede0, p=..., supportedActions=..., supportedActions@entry=..., buttons=..., buttons@entry=..., modifiers=..., modifiers@entry=...) at kernel/qguiapplication.cpp:3330
#17 0x00007f50ecdca88c in QWindowSystemInterface::handleDrop (window=0x557ed5af45c0, dropData=0x557ed9e4ede0, p=..., supportedActions=supportedActions@entry=..., buttons=buttons@entry=..., modifiers=...) at kernel/qwindowsysteminterface.cpp:938
#18 0x00007f50e7c6bdc7 in QXcbDrag::handleDrop (this=0x557ed3e90c80, event=<optimized out>, b=..., mods=...) at qxcbdrag.cpp:1063
#19 0x00007f50e7c6fab0 in QXcbDrag::drop (this=0x557ed3e90c80, globalPos=..., b=..., mods=...) at qxcbdrag.cpp:567
#20 0x00007f50ece37014 in QBasicDrag::eventFilter (this=0x557ed3e90c80, o=0x557ed5af45c0, e=0x7ffd79dd3690) at kernel/qevent.h:133
#21 0x00007f50ec996c1e in QCoreApplicationPrivate::sendThroughApplicationEventFilters (this=this@entry=0x557ed3d547e0, receiver=receiver@entry=0x557ed73f7460, event=event@entry=0x7ffd79dd3690) at kernel/qcoreapplication.cpp:1172
#22 0x00007f50ed581458 in QApplicationPrivate::notify_helper (this=0x557ed3d547e0, receiver=0x557ed73f7460, e=0x7ffd79dd3690) at kernel/qapplication.cpp:3608
#23 0x00007f50ec996fb8 in QCoreApplication::notifyInternal2 (receiver=0x557ed73f7460, event=0x7ffd79dd3690) at kernel/qcoreapplication.cpp:1064
#24 0x00007f50ecdf79b5 in QGuiApplicationPrivate::processMouseEvent (e=0x557ed9e4ace0) at kernel/qguiapplication.cpp:2282
#25 0x00007f50ecdcb33c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#26 0x00007f50e7c5a7fa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#27 0x00007f50eab22ea0 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#28 0x00007f50eab23258 in ?? () from /lib64/libglib-2.0.so.0
#29 0x00007f50eab232ec in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#30 0x00007f50ec9ee456 in QEventDispatcherGlib::processEvents (this=0x557ed3eacbb0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#31 0x00007f50ec995a2b in QEventLoop::exec (this=this@entry=0x7f50e00491d0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#32 0x00007f50ece36673 in QBasicDrag::drag (this=0x557ed3e90c80, o=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#33 0x00007f50ece33b49 in QDragManager::drag (this=0x557ed632e9a0, o=o@entry=0x557ed9e06760) at kernel/qdnd.cpp:117
#34 0x00007f50ece33e54 in QDrag::exec (this=0x557ed9e06760, supportedActions=..., defaultDropAction=<optimized out>) at kernel/qdrag.cpp:283
#35 0x0000557ed38dcacc in KateTabBar::mouseMoveEvent (this=0x557ed512d910, event=<optimized out>) at /usr/include/qt5/QtCore/qflags.h:121
#36 0x00007f50ed5c2c68 in QWidget::event (this=0x557ed512d910, event=0x7ffd79dd40a0) at kernel/qwidget.cpp:9033
#37 0x00007f50ed58141e in QApplicationPrivate::notify_helper (this=this@entry=0x557ed3d547e0, receiver=receiver@entry=0x557ed512d910, e=e@entry=0x7ffd79dd40a0) at kernel/qapplication.cpp:3637
#38 0x00007f50ed589942 in QApplication::notify (this=<optimized out>, receiver=0x557ed512d910, e=<optimized out>) at kernel/qapplication.cpp:3081
#39 0x00007f50ec996fb8 in QCoreApplication::notifyInternal2 (receiver=0x557ed512d910, event=0x7ffd79dd40a0) at kernel/qcoreapplication.cpp:1064
#40 0x00007f50ed587abe in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x557ed512d910, event=event@entry=0x7ffd79dd40a0, alienWidget=<optimized out>, nativeWidget=0x557ed4cc7960, buttonDown=buttonDown@entry=0x7f50edacd330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2619
#41 0x00007f50ed5dba88 in QWidgetWindow::handleMouseEvent (this=0x557ed5af45c0, event=0x7ffd79dd4350) at kernel/qwidgetwindow.cpp:683
#42 0x00007f50ed5defe0 in QWidgetWindow::event (this=0x557ed5af45c0, event=0x7ffd79dd4350) at kernel/qwidgetwindow.cpp:300
#43 0x00007f50ed58141e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x557ed5af45c0, e=0x7ffd79dd4350) at kernel/qapplication.cpp:3637
#44 0x00007f50ec996fb8 in QCoreApplication::notifyInternal2 (receiver=0x557ed5af45c0, event=0x7ffd79dd4350) at kernel/qcoreapplication.cpp:1064
#45 0x00007f50ecdf79b5 in QGuiApplicationPrivate::processMouseEvent (e=0x557ed9970aa0) at kernel/qguiapplication.cpp:2282
#46 0x00007f50ecdcb33c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#47 0x00007f50e7c5a7fa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#48 0x00007f50eab22ea0 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#49 0x00007f50eab23258 in ?? () from /lib64/libglib-2.0.so.0
#50 0x00007f50eab232ec in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#51 0x00007f50ec9ee456 in QEventDispatcherGlib::processEvents (this=0x557ed3eacbb0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#52 0x00007f50ec995a2b in QEventLoop::exec (this=this@entry=0x7ffd79dd4680, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#53 0x00007f50ec99db96 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#54 0x00007f50ecdeae0c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#55 0x00007f50ed581395 in QApplication::exec () at kernel/qapplication.cpp:2829
#56 0x0000557ed3873bd1 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kate-22.04.3-1.1.x86_64/kate/main.cpp:703
[Inferior 1 (process 9693) detached]

Reported using DrKonqi
Comment 1 Waqar Ahmed 2022-07-21 13:59:23 UTC
Git commit 8f45dede915afd73ecf26130c9d0e772023895d8 by Waqar Ahmed.
Committed on 21/07/2022 at 13:58.
Pushed by waqar into branch 'master'.

Tabbar: DND improvements

- Fix crash, always ensure we drag the current document that has a view
- Allow to start drag when we have passed 1/4th of the viewspace-rect
height

M  +16   -9    apps/lib/katetabbar.cpp
M  +1    -0    apps/lib/katetabbar.h
M  +5    -0    apps/lib/kateviewmanager.cpp

https://invent.kde.org/utilities/kate/commit/8f45dede915afd73ecf26130c9d0e772023895d8
Comment 2 Christoph Cullmann 2022-07-21 20:15:15 UTC
Git commit 75e4505f5e613ce2ad999e429b82a4f3dc8f0063 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 21/07/2022 at 20:15.
Pushed by cullmann into branch 'release/22.08'.

Tabbar: DND improvements

- Fix crash, always ensure we drag the current document that has a view
- Allow to start drag when we have passed 1/4th of the viewspace-rect
height

M  +16   -9    apps/lib/katetabbar.cpp
M  +1    -0    apps/lib/katetabbar.h
M  +5    -0    apps/lib/kateviewmanager.cpp

https://invent.kde.org/utilities/kate/commit/75e4505f5e613ce2ad999e429b82a4f3dc8f0063