https://bugs.kde.org/show_bug.cgi?id=462793

            Bug ID: 462793
           Summary: Crash when pressing ctrl-z after reloading a file that
                    was modified
    Classification: Applications
           Product: kate
           Version: 22.08.3
          Platform: Archlinux
                OS: Linux
            Status: REPORTED
          Keywords: drkonqi
          Severity: crash
          Priority: NOR
         Component: general
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: t...@dirkkok.nl
  Target Milestone: ---

Application: kate (22.08.3)

Qt Version: 5.15.7
Frameworks Version: 5.100.0
Operating System: Linux 5.15.81-1-lts x86_64
Windowing System: Wayland
Distribution: "Arch Linux"
DrKonqi: 5.26.4 [KCrashBackend]

-- Information about the crash:
drkonqi gave me a bunch of duplicates for this, all of which were closed as
fixed many years ago.

I'm having extremely mixed results when trying to reduce the reproduction
steps. Slight variations can make the crash inconsistent, but these steps let
me consistently reproduce it, every time. Follow these steps exactly to be
sure. A lot of it is probably unnecessary, but again I'm having trouble
figuring out what. I suppose there may also be more to it than what I've
determined.

Following these steps **exactly** lets me consistently reproduce this crash:
1. Open kate, create a new empty file, and save it. Make sure it's in your
recent documents. Close kate.
2. Open kate and open the file.
3. Write 9 lines of "bla" followed by an empty line.
4. Save the file.
5. Using any tool other than Kate, blank the file. Make sure there is no
trailing newline in the file.
6. Go back to Kate. It should show you the notification that the file was
changed on disk.
7. Press f5 to reload.
8. Press ctrl-z to undo. Kate crashes.

I reproduced this on 2 machines, both of which run Arch linux with KDE on
Wayland. Both were fully updated less than a few hours ago, as of this report's
submission.

The crash can be reproduced every time.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized
out>}
[KCrash Handler]
#6  Kate::TextLineData::markAsModified (modified=<optimized out>,
this=<optimized out>) at
/usr/src/debug/ktexteditor/ktexteditor-5.100.0/src/buffer/katetextline.h:177
#7  Kate::TextLineData::markAsModified (modified=<optimized out>,
this=<optimized out>, this=<optimized out>, modified=<optimized out>) at
/usr/src/debug/ktexteditor/ktexteditor-5.100.0/src/buffer/katetextline.h:175
#8  KateModifiedWrapLine::undo (this=0x55816db45310) at
/usr/src/debug/ktexteditor/ktexteditor-5.100.0/src/undo/katemodifiedundo.cpp:179
#9  0x00007fc3f0c827ce in KateUndoGroup::undo (view=0x55816e2bd600,
this=0x55816d97a3b0) at
/usr/src/debug/ktexteditor/ktexteditor-5.100.0/src/undo/kateundo.cpp:245
#10 KateUndoGroup::undo (view=0x55816e2bd600, this=0x55816d97a3b0) at
/usr/src/debug/ktexteditor/ktexteditor-5.100.0/src/undo/kateundo.cpp:236
#11 KateUndoManager::undo (this=0x55816e1e4680) at
/usr/src/debug/ktexteditor/ktexteditor-5.100.0/src/undo/kateundomanager.cpp:272
#12 KateUndoManager::undo (this=0x55816e1e4680) at
/usr/src/debug/ktexteditor/ktexteditor-5.100.0/src/undo/kateundomanager.cpp:265
#13 0x00007fc3f15a3c00 in doActivate<false> (sender=0x55816e286af0,
signal_index=4, argv=0x7ffec7135fe0) at kernel/qobject.cpp:3931
#14 0x00007fc3f214cec7 in QAction::triggered (this=this@entry=0x55816e286af0,
_t1=<optimized out>) at .moc/moc_qaction.cpp:376
#15 0x00007fc3f21528c7 in QAction::activate (this=0x55816e286af0,
event=<optimized out>) at kernel/qaction.cpp:1161
#16 0x00007fc3f215298e in QAction::event (e=<optimized out>, this=<optimized
out>) at kernel/qaction.cpp:1086
#17 QAction::event (this=<optimized out>, e=<optimized out>) at
kernel/qaction.cpp:1075
#18 0x00007fc3f2159b1c in QApplicationPrivate::notify_helper (this=<optimized
out>, receiver=0x55816e286af0, e=0x7ffec7136170) at
kernel/qapplication.cpp:3637
#19 0x00007fc3f1572f98 in QCoreApplication::notifyInternal2
(receiver=0x55816e286af0, event=0x7ffec7136170) at
kernel/qcoreapplication.cpp:1064
#20 0x00007fc3f1aed2bd in QShortcutMap::dispatchEvent (this=<optimized out>,
e=<optimized out>) at kernel/qshortcutmap.cpp:675
#21 0x00007fc3f1ae3b27 in QShortcutMap::tryShortcut (this=0x55816d384c48,
e=0x7ffec7136230) at kernel/qshortcutmap.cpp:343
#22 0x00007fc3f1aa3168 in QWindowSystemInterface::handleShortcutEvent
(window=<optimized out>, timestamp=3979052, keyCode=90, modifiers=...,
nativeScanCode=52, nativeVirtualKey=122, nativeModifiers=20, text=...,
autorepeat=false, count=1) at kernel/qwindowsysteminterface.cpp:477
#23 0x00007fc3f1ab8b22 in QGuiApplicationPrivate::processKeyEvent
(e=0x55816df70f60) at kernel/qguiapplication.cpp:2398
#24 0x00007fc3f1aa1995 in QWindowSystemInterface::sendWindowSystemEvents
(flags=...) at kernel/qwindowsysteminterface.cpp:1169
#25 0x00007fc3ec453995 in userEventSourceDispatch(_GSource*, int (*)(void*),
void*) () from /usr/lib/libQt5WaylandClient.so.5
#26 0x00007fc3ef04f87b in g_main_dispatch (context=0x7fc3e4005010) at
../glib/glib/gmain.c:3444
#27 g_main_context_dispatch (context=0x7fc3e4005010) at
../glib/glib/gmain.c:4162
#28 0x00007fc3ef0a6299 in g_main_context_iterate.constprop.0
(context=0x7fc3e4005010, block=1, dispatch=1, self=<optimized out>) at
../glib/glib/gmain.c:4238
#29 0x00007fc3ef04e132 in g_main_context_iteration (context=0x7fc3e4005010,
may_block=1) at ../glib/glib/gmain.c:4303
#30 0x00007fc3f15bdc4c in QEventDispatcherGlib::processEvents
(this=0x55816d34fb60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#31 0x00007fc3f156b73c in QEventLoop::exec (this=0x7ffec71365e0, flags=...) at
../../include/QtCore/../../src/corelib/global/qflags.h:69
#32 0x00007fc3f1576269 in QCoreApplication::exec () at
../../include/QtCore/../../src/corelib/global/qflags.h:121
#33 0x00007fc3f1ab3112 in QGuiApplication::exec () at
kernel/qguiapplication.cpp:1870
#34 0x00007fc3f2157f2a in QApplication::exec () at kernel/qapplication.cpp:2829
#35 0x000055816d3155d5 in main (argc=<optimized out>, argv=<optimized out>) at
/usr/src/debug/kate/kate-22.08.3/apps/kate/main.cpp:607
[Inferior 1 (process 25039) detached]

Reported using DrKonqi

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to