Bug#1032836: gnome-text-editor: Incorreclty opens ASCII file with two first bytes currupted then hangs

Nikolay Pokhilchenko nikolay_po at mail.ru
Sun Mar 12 14:16:33 GMT 2023


Package: gnome-text-editor
Version: 43.2-1
Severity: normal

Dear Maintainer,
Two erroneous bytes at a start of a simple ASC-II text file prevents correct
opening. The user unable to open document even changing it's type. Finally, the
editor hangs.

I was unable to open text file correctly even after disabling Automatic
Identification. Even if I setting document type to "Ascii", nothing is
changing. The document still look as a mess of hierogliphs and editor interface
become more and more inresponsive. It may return "You have not permissions to
open this document. Retry?" in a pink box but this is not true.

Here is an example of the beginning of a file, exhibiting a problem where \XX
are hex values:

\00\F4-0912535 -0985479 -0805070 -0944830 -03647914\0D\0A

All the rest of a file are the lines with ASC-II ending carriage return and
newline symbols, like this:

-0888641 -0967744 -0787402 -0926995 -03570782
-0897228 -0958339 -0771736 -0895386 -03522689
-0862321 -0932900 -0754391 -0878431 -03428043

I have tried to uncheck "Automatic Identification" and tried to choose
"AsciiDoc" document type - nothing helps. Interface becomes more and more laggy
until hanging completely.
I'm often using gnome-text-editor for opening such files, size of file is up to
several megabytes, may be up to 20Mb extreme with a tens of thousands, may be
hundreds of thousands lines. The file under the question is attached in
archive.

I'm expecting the editor will not hang during opening large text files
(including in some characters corruption case) and let the user to choose file
type before opening (and probably hanging).
May be it worth to detect too long opening process then ask a user: "Document
is opening as UTF-8 text too long. Would you like to set different document
type?" or something similar.
May you introduce "simple" mode to prevent automatic text type recognition and
UTF mode usage? Or, at least, let user to choose and fix document type before
opening?
I had to use nano editor to delete two corrupted characters at the beginnig of
a text to let gnome-text-editor open it normally.


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-2-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gnome-text-editor depends on:
ii  dconf-gsettings-backend [gsettings-backend]  0.40.0-4
ii  libadwaita-1-0                               1.2.2-1
ii  libc6                                        2.36-8
ii  libcairo2                                    1.16.0-7
ii  libeditorconfig0                             0.12.6-0.1
ii  libenchant-2-2                               2.3.3-2
ii  libglib2.0-0                                 2.74.6-1
ii  libgtk-4-1                                   4.8.3+ds-2
ii  libgtksourceview-5-0                         5.6.2-1
ii  libicu72                                     72.1-3
ii  libpango-1.0-0                               1.50.12+ds-1

gnome-text-editor recommends no packages.

gnome-text-editor suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnableToOpen.7z
Type: application/x-7z-compressed
Size: 810465 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnome-maintainers/attachments/20230312/210b8f9e/attachment-0001.7z>


More information about the pkg-gnome-maintainers mailing list