Bug 409617 - Krita goes unresponsive while editing text
Summary: Krita goes unresponsive while editing text
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (show other bugs)
Version: 4.2.2
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: vanyossi
: 410880 411476 (view as bug list)
Depends on:
Reported: 2019-07-08 12:44 UTC by Annabel
Modified: 2019-09-13 09:56 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:

Original Krita file (immediately after the crash) (765.64 KB, application/x-krita)
2019-07-08 12:44 UTC, Annabel

Note You need to log in before you can comment on or make changes to this bug.
Description Annabel 2019-07-08 12:44:10 UTC
Created attachment 121383 [details]
Original Krita file (immediately after the crash)

The Krita window and Edit Text window sometimes go unresponsive when I click save in the text editing window. It seems to happen randomly - happened twice in a 1.5 hour time frame.
Waiting does not help, I am forced to close the program, losing all unsaved progress. (No crash log)
Error reports:
08-Jul-19 11:12 AM	Windows Error Reporting	Fault bucket 1500275099276996261, type 5
Event Name: AppHangB1
Response: Not available
Cab Id: 0

Problem signature:
P1: krita.exe
P3: 00000000
P4: 5157
P5: 134217728

Attached files:

These files may be available here:

Analysis symbol: 
Rechecking for solution: 0
Report Id: 391d1334-8d38-4159-b1c1-034dc403cecb
Report Status: 268435456
Hashed bucket: 53774b54d204303164d20c4105c4eea5
Cab Guid: 0

08-Jul-19 11:12 AM	Application Hang	The program krita.exe version stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Security and Maintenance control panel.
 Process ID: 3330
 Start Time: 01d535777424c9d4
 Termination Time: 12
 Application Path: D:\Krita (x64)\bin\krita.exe
 Report Id: 391d1334-8d38-4159-b1c1-034dc403cecb
 Faulting package full name: 
 Faulting package-relative application ID: 

Same reports at 12:31
I have two displays

1. I start editing a text
2. I click "save"
3. Not responding

OBSERVED RESULT - Program goes unresponsive

I was working on a small image - 3 layers, Tell us what kind of image you were working on: the size, the resolution, the color model and channel depth.

If at all possible, attach your original Krita file (the one that ends in .kra) to the bug report, or if it’s too big, add a link for download. If you do that, make sure the file will be there for years to come: do not remove it.

EXPECTED RESULT - text changes save normally, program does not go unresponsive


Comment 1 Annabel 2019-07-08 12:50:03 UTC
Sorry, accidentally posted before finished writing

Small image - 3 layers, 1600x1200 reso, 19.4 MiB, RGB/Alpha model, 8 bit integer/channel depth.

OS version: Windows 10 home Version 10.0.17134 Build 17134
Comment 2 Annabel 2019-07-08 21:12:03 UTC
I recreated the crash with steps like this:
1. I started writing text
2. Changed font to MV boli, size 7, center alignment
3. click save
4. Not responding
Comment 3 Annabel 2019-07-08 21:42:43 UTC
(In reply to Annabel from comment #2)
> I recreated the crash with steps like this:
> 1. I started writing text
> 2. Changed font to MV boli, size 7, center alignment
> 3. click save
> 4. Not responding

After continuous trying, the problem seems to be the text I write - pressing shift enter. Using just enter does not result with program not responding
Comment 4 Kapyia 2019-07-09 14:30:11 UTC
I'm able to reproduce this bug on my Windows system, independent of font, size, alignment, etc.. Krita will crash if the first new-line is the "Shift+Return" variant. However, if the first new-line is a regular "Return" one the software doesn't seem to crash for me, no matter what you use afterwards. 

I noticed that a regular "Return" new-line will start a new paragraph in the SVG-source, whereas the "Shift+Return" variant just adds a new-line to the SVG-source itself.
Comment 5 Ralek Kolemios 2019-07-24 23:31:40 UTC
I am able to reproduce this issue as well, Windows 10 Krita 4.2.3. Krita has crashed on me multiple times in the past hour when saving text containing shift+enter returns.
Comment 6 vanyossi 2019-08-23 19:38:53 UTC
The issue occurs in KoSvgTextShape.cpp:354

textLength() does not advance as Shift + Enter is no a drawable Glyph. Just breaking the loop does not instantly fixes the issue as if causes a SAFE ASSERT later on.

Need some time to come up with a solution that doesn't break tabs also.
Comment 7 Halla Rempt 2019-08-27 15:11:02 UTC
*** Bug 410880 has been marked as a duplicate of this bug. ***
Comment 8 Halla Rempt 2019-09-02 07:51:47 UTC
*** Bug 411476 has been marked as a duplicate of this bug. ***
Comment 9 Halla Rempt 2019-09-02 09:00:15 UTC
*** Bug 410402 has been marked as a duplicate of this bug. ***
Comment 10 Halla Rempt 2019-09-02 09:01:10 UTC
Okay, I hadn't seen this bug report when I posted a MR for a possible solution to  https://bugs.kde.org/show_bug.cgi?id=410402 -- Ivan, given the number of duplicates, I think that this bug should be your first priority.
Comment 11 Dmitry Kazakov 2019-09-10 11:30:28 UTC
The crash should be fixed after this merge request is merged:
Comment 12 Dmitry Kazakov 2019-09-13 09:56:44 UTC
The bug is fixed in