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

            Bug ID: 526390
           Summary: Crash when opening a file containing a text item with
                    U+200B (zero-width space)
    Classification: Applications
           Product: drawy
      Version First 1.0.2
       Reported In:
          Platform: Flatpak
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 196650
  --> https://bugs.kde.org/attachment.cgi?id=196650&action=edit
the file which contains the U+200B ZERO WIDTH SPACE character

DESCRIPTION
Faced sudden crash when opening the file which contains the U+200B ZERO WIDTH
SPACE character, without any alert. In terminal, there were no error pop-up,
"Failed to play sound with canberra"
If the affect file was last opened file, drawy fails to start until u remove
"~/.var/app/org.kde.drawy" happens with me during the initial try, to open. 

STEPS TO REPRODUCE
1. Open drawy using terminal: (platform flatpak )-> ( flatpak run
org.kde.drawy)
2. Open the attached zwsp-repo.drawyy file, using open file in drawyy
3.  Notice, all of sudden it will crash without any alert or error in termnal
4. Remove "~/.var/app/org.kde.drawy" and try with some different file without
U+200B
5. Observe file will open perfectly, again try to open the U+200B file it will
crash.

OBSERVED RESULT
Crash when tried with both, Versions: 1.0.2 Flatpak and nightly, when opening
the file containing U+200B.

EXPECTED RESULT
The file be open normally and the Zero-width space's aren't visible. As
normally

SOFTWARE/OS VERSIONS
Operating System: Ubuntu 26.04.1 LTS
KDE Plasma Version: N/A (GNOME on Wayland)
KDE Frameworks Version: 6.29.0 (Flatpak runtime org.kde.Platform 6.10)
Qt Version: 6.10.3

ADDITIONAL INFORMATION
Real-world Scenario : When I was opening my notes saved few days back
"ArraysAndString.drway", The some text I copied from LeetCode, (Problems)
contains 14 consecutive U+200B characters. It was an Important file and very
hard to recover, I decompressed the file (zstd -> JSON), bisected the items
until a single text item reproduced the crash,then confirmed the cause with the
minimal repro pair above. Removing only the U+200B characters makes the
original file open normally.

I still have the original source file as well and the minimal file which cause
the crash contains the U+200B characters. 

Also I would like to work on the fix if that okay, also a safe fall back
mechanism would be nice to handle those kind of uncertainty. At least those bad
character will be discard during the save rather than corrupt the whole file. 

Below I provide my terminal output with incident before the crash
"
qt.qpa.wayland.textinput: virtual void
QtWaylandClient::QWaylandTextInputv3::zwp_text_input_v3_leave(wl_surface*) Got
leave event for surface 0x0 with focusing surface 0x61308c6f8e70
qt.qpa.wayland.textinput: virtual void
QtWaylandClient::QWaylandTextInputv3::zwp_text_input_v3_leave(wl_surface*) Got
leave event for surface 0x0 with focusing surface 0x6130911426e0
kf.notifications: Failed to play sound with canberra: Not available
qt.qpa.wayland.textinput: virtual void
QtWaylandClient::QWaylandTextInputv3::zwp_text_input_v3_leave(wl_surface*) Got
leave event for surface 0x0 with focusing surface 0x61308979dcc0
qt.qpa.wayland.textinput: virtual void
QtWaylandClient::QWaylandTextInputv3::zwp_text_input_v3_leave(wl_surface*) Got
leave event for surface 0x0 with focusing surface 0x6130910bea20
"

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

Reply via email to