Created attachment 115346 [details] Text block which illustrates the behaviour. SUMMARY When adding and editing multiline, centered text blocks, editing the text loses the text beyond the first two lines. (Observed for three and four line text blocks.) STEPS TO REPRODUCE 1. Open the file in attachment 2. Edit the text OBSERVED RESULT The third line of the text is not present in the text edit dialog. (When saving the text, it will be lost.) EXPECTED RESULT Krita should not eat the dialogue. SOFTWARE VERSIONS Krita Version: 4.1.3 Qt Version (compiled): 5.9.3 Version (loaded): 5.9.3 OS Information Build ABI: x86_64-little_endian-llp64 Build CPU: x86_64 CPU: x86_64 Kernel Type: winnt Kernel Version: 6.1.7601 Pretty Productname: Windows 7 SP 1 (6.1) Product Type: windows Product Version: 7sp1 OpenGL Info **OpenGL not initialized** ADDITIONAL INFORMATION I'm afraid I have not succeeded in figuring out how to reach this point from a blank document. In the beginning everything behaves fine, but at some point in the process of adding text balloons, this problem pops up for all text that is already present in the document. I haven't seen this happening in 4.1.2.
*** This bug has been marked as a duplicate of bug 399227 ***
I'm reopening this bug because it's still reproducible in Krita 4.1.5, following the steps described above. (Bug 399227 is not reproducible any more, maybe this one is not a duplicate.) While testing, I have also witnessed it happening that the text block is truncated to the first three lines. I have not been able to find a pattern why it's sometimes two lines and sometimes three.
Created attachment 115719 [details] (Video example) Hello, I think this has been fixed recently. I'm not able to reproduce this bug using Krita 4.1.5 nor 4.2.0 (Ubuntu 14.04). Please, could you update Krita and try to re-open the file? (Note: editing that text with an updated version of Krita triggers an assert here - I'm guessing because of the flawed text tool used to create it)
(Changing the status to "Needsinfo")
Thank you for looking into this. There's a step missing in your video: the text gets eaten when editing. (Select text, switch to SVG Tool, click 'edit text'). I have retested it with the nightly build (4.2.0-pre-alpha (git c2ea92c)). Using the test file, there are differences in the behaviour: Release 4.1.5: Two text lines are shown in the rich text view. Pre-alpha 4.2.0: One text line is shown in the rich text view. Release 4.1.5: Two text lines are shown in the SVG source view. Pre-alpha 4.2.0: All three text lines are shown in the SVG source view. Release 4.1.5: Upon saving, two text lines are present in the text block. Pre-alpha 4.2.0: Upon saving, one text line is present in the text block. As for the producing application. If I remember correctly, the original text was created using Krita 4.0.0. It has then been copy pasted from page to page and edited. This approach didn't give any problems until I upgraded from 4.1.2 to 4.1.3.
Also reproducible on Debian stable with the appimage of Krita 4.1.7. When editing the text, the following assert is shown: Krita has encountered an internal error: SAFE ASSERT (krita): "cursor.block().layout()->lineCount() == 1" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/flake/text/KoSvgTextShapeMarkupConverter.cpp, line 840 Please report a bug to developers! Press Ignore to try to continue. Press Abort to see developers information (all unsaved data will be lost) Selecting Ignore then opens the dialog with the missing text, choosing Abort closes Krita.
I cannot reproduce this on Krita Version: 4.2.0-pre-alpha (git c5838c0) Languages: en_US, en_GB, nl Hidpi: false Qt Version (compiled): 5.12.0 Version (loaded): 5.12.0 OS Information Build ABI: x86_64-little_endian-lp64 Build CPU: x86_64 CPU: x86_64 Kernel Type: linux Kernel Version: 4.15.0-46-generic Pretty Productname: KDE neon User Edition 5.15 Product Type: neon Product Version: 18.04 Can you check if you can reproduce it with the latest master? We have nightly appimages downloadable from the krita.org page, tagged 'Krita next'.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Thank you for looking into it. I'm afraid I can still reproduce with krita-4.2.0-pre-alpha-ab98e9b-x86_64.appimage. Editing the text line in the test file results in the assert: Krita has encountered an internal error: SAFE ASSERT (krita): "cursor.block().layout()->lineCount() == 1" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/flake/text/KoSvgTextShapeMarkupConverter.cpp, line 841 When selecting ignore, the text edit windows open on the "SVG Source" of the text. Choosing "Rich Text" results again in the assert above. In the "Rich Text" view, only one of the three lines is shown.
I probably fixed this in ba110613f4199, as the assert occurs when we incorrectly trim character text glyphs.
This is not fixed yet. Rendering works great but when multiple lines are present a SAFE_ASSERT is trown and second line gets ignored. I'll fix this.
Git commit 8571356a9b3d6e93b8f5930055d88f0b7b36b2fd by Ivan Yossi. Committed on 09/05/2019 at 05:57. Pushed by ivany into branch 'master'. Fix multiline text looses lines. M +1 -1 libs/flake/text/KoSvgTextShapeMarkupConverter.cpp https://invent.kde.org/kde/krita/commit/8571356a9b3d6e93b8f5930055d88f0b7b36b2fd
Unable to reproduce with 4.2.0-beta.