Bug 376597

Summary: Text created using Multiline text tool disappears when reopening .kra file and causes Krita to crash
Product: [Applications] krita Reporter: Lia Min <liamin83>
Component: Tool/TextAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: major CC: griffinvalley, halla
Priority: NOR    
Version: 3.1.2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: crash log file for multiline text tool
Screenshots
.shapelayer files within the defected .kra file

Description Lia Min 2017-02-17 21:27:59 UTC
All text created using the text tool in multiline mode disappears from some .kra files when they are reopened. It is not clear which file this happens to, but the problem persists for those that are affected. (ie, new texts that are typed in using multiline mode in these documents, either in a new text box or in a pre-existing box, disappears when the file is saved, closed and reopened.) 
In addition, Krita will often freeze or crash when using multiline option to create or edit texts -this problems happens across all documents.
Comment 1 wolthera 2017-02-19 11:34:19 UTC
Can you attach a sample file for this? Then we can try to get a crash ourselves.

Or if you could try to get backtraces for these crashes, that'd be super useful too! https://docs.krita.org/Dr._Mingw_debugger
Comment 2 Lia Min 2017-03-08 18:30:37 UTC
Created attachment 104463 [details]
crash log file for multiline text tool

This is the crash log file that was generated soon after Krita crashed while using the Multiline text tool. However, it is uncertain whether this crash is related to the error that was previously described, as it does not cause Krita to crash most of the time.
Comment 3 Lia Min 2017-03-08 18:35:04 UTC
Created attachment 104464 [details]
Screenshots

Because the original .kra files are too big to upload as attachment, two screenshots are attached -one showing the text written with multiline tool, and the other showing how the text disappears when this file is saved and re-opened.
Comment 4 wolthera 2017-03-09 11:29:47 UTC
Well, we actually wanted to see the file because we wanted to look inside whether the text is saved at all :P

You can try this yourself by...

1. Making a copy of the kra file.
2. Renaming the extension to ZIP
3. Opening the zip file.
4. Looking for the ODG file that represents the vector layer.(it should be somewhere in layers)
5. Extracting and uploading that ODG file.

Still, thank you very much for the crash. Even if it doesn't always happen with the text-tool, that it sometimes crashes can still be related. This can happen when you computer is trying to multi-task. Sometimes it can then get a little confused because it finishes one task before the other, so it might be we need to write some code to help resolve this type of confusion.

We're hoping to rewrite the text-tool coming months, so crash reports like these can help us make it stabler. I am still a little worried about it not saving though, so I hope you can find whether there's an ODG file inside the kra.
Comment 5 wolthera 2017-03-09 11:30:19 UTC
Oh yeah, setting this as confirmed as there's a backtrace.
Comment 6 Lia Min 2017-03-09 19:51:30 UTC
Created attachment 104474 [details]
.shapelayer files within the defected .kra file

I could not locate the .odg file in the layers folder. Instead, here are seven folders named "layer#.shapelayer" which I assume contains information about the vector layers. Among these seven, three were used for multiline texts -I am not sure which though, since the layer number doesn't correspond to that in krita. 
I know very little computer language, but from what I can figure out by comparing another file that does not have this error, the text that I typed in using the multiline text tool seem to have disappeared from the "contect.xml" just leaving an empty text box in its place.
I hope this helps you debug.  In the meantime, I will stick to using artistic text for all my text work instead.
Comment 7 Halla Rempt 2017-11-27 08:18:21 UTC
We're working on a new text tool. The old text tool is now unmaintained and we won't be working on it anymore, so let's close all the text tool bugs.
Comment 8 Halla Rempt 2017-11-27 08:18:54 UTC
We're working on a new text tool. The old text tool is now unmaintained and we won't be working on it anymore, so let's close all the text tool bugs.