Bug 440583

Summary: The editor window becomes unusable in wayland
Product: [Applications] kate Reporter: Jaime Torres <jtamate>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: christoph, kdebugs, nate
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Strange behaviour

Description Jaime Torres 2021-08-04 09:09:08 UTC
SUMMARY
The editor window becomes unusable

STEPS TO REPRODUCE
1. Open a text file
2. Have some lines in the text file
3. Modify the file outside kate
4. Once you press reload on the "Documents modified on Disk" dialog,
  kate becomes unusable.

OBSERVED RESULT
* some lines are only rendered with the upper half part of the font. 
* some lines are fixed in the bottom of the editor window
* I can't see the cursor any more.

EXPECTED RESULT
 It works as before the file is modified outside kate.

SOFTWARE/OS VERSIONS
KDE Frameworks 5.85.0
Qt 5.15.2 (built against 5.15.2)
The wayland windowing system
kate Version 21.11.70

ADDITIONAL INFORMATION
Comment 1 Jaime Torres 2021-08-04 09:11:41 UTC
Created attachment 140504 [details]
Strange behaviour
Comment 2 cauchy 2021-09-02 06:15:18 UTC
Operating System: Arch Linux (latest)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kate 21.08
Full Wayland

+1 from me - exactly the same problem
Comment 3 Jaime Torres 2021-09-03 08:44:50 UTC
A crash closing kate after reloading the view.

[KCrash Handler]
#6  0x000055ff3106e373 in qDeleteAll<__gnu_cxx::__normal_iterator<KateMDI::ToolView* const*, std::vector<KateMDI::ToolView*, std::allocator<KateMDI::ToolView*> > > > (end=..., begin=0x55ff33a223f0) at /usr/include/qt5/QtCore/qalgorithms.h:320
#7  qDeleteAll<std::vector<KateMDI::ToolView*, std::allocator<KateMDI::ToolView*> > > (c=std::vector of length 1, capacity 16 = {...}) at /usr/include/qt5/QtCore/qalgorithms.h:328
#8  KateMDI::MainWindow::~MainWindow (__vtt_parm=<optimized out>, this=<optimized out>, this=<optimized out>, __vtt_parm=<optimized out>) at /usr/src/debug/kate-21.08.0-1.1.x86_64/kate/katemdi.cpp:778
#9  KateMainWindow::~KateMainWindow (this=<optimized out>, this=<optimized out>) at /usr/src/debug/kate-21.08.0-1.1.x86_64/kate/katemainwindow.cpp:203
#10 0x000055ff31064340 in KateMainWindow::~KateMainWindow (this=<optimized out>, this=<optimized out>) at /usr/src/debug/kate-21.08.0-1.1.x86_64/kate/katemainwindow.cpp:181
#11 KateApp::~KateApp (this=<optimized out>, this=<optimized out>) at /usr/src/debug/kate-21.08.0-1.1.x86_64/kate/kateapp.cpp:113
#12 0x000055ff3105ded4 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kate-21.08.0-1.1.x86_64/kate/main.cpp:689
Comment 4 Christoph Cullmann 2021-10-24 14:58:00 UTC
True, with the "Use a separate dialog for handling..." option enabled, all is in perfect chaos after some external change here, too.

Without that option set and just the inline "reload" messages all is fine.
Comment 5 Bug Janitor Service 2021-10-24 15:08:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/504
Comment 6 Christoph Cullmann 2021-10-24 15:40:33 UTC
Git commit 2fd3f8077f721c9b225ea37c7eff9aa670587753 by Christoph Cullmann.
Committed on 24/10/2021 at 15:05.
Pushed by cullmann into branch 'master'.

fixes reload dialog on wayland

avoid that after initial triggering this repaint and
more of main window is destroyed

M  +0    -2    kate/katemainwindow.cpp

https://invent.kde.org/utilities/kate/commit/2fd3f8077f721c9b225ea37c7eff9aa670587753