Gedit has an invalid regular expression, the error is not fatal, but immediately occurs at its start, additionally, it has a critical level GTK error as well

Bug #2055010 reported by Zalán Hári
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
New
Undecided
Zalán Hári

Bug Description

When the unstable <i>sudo apt-get autoremove</i> removed Gedit, I reinstalled it (with the removed necessary Python packages). When I started it first time from the terminal, I got the following message:
/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/library.py:212: SyntaxWarning: invalid escape sequence '\-'
  RE_KEY = re.compile('^([a-zA-Z_][a-zA-Z0-9_.\-]*)(\[([a-zA-Z_@]+)\])?$')

I was able to fix that with replacing \- to \\-, \[ to \\[ and \] to \\], but an average user will have extreme computer rage from it and s/he will shoot the computer. And, in addition, this problem probably makes gedit less efficient.

The huger problem is:
„(gnome-text-editor:31580): Gtk-CRITICAL **: 07:40:03.163: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed”
Imagine it circa 1000 times.

I attached a quick-and-dirty patch to the first problem.

The additional necessary information has been included by apport.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: gedit 46.1-3 [modified: usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/library.py]
ProcVersionSignature: Ubuntu 6.6.0-14.14-generic 6.6.3
Uname: Linux 6.6.0-14-generic x86_64
ApportVersion: 2.28.0-0ubuntu1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Mon Feb 26 08:04:39 2024
InstallationDate: Installed on 2023-07-05 (236 days ago)
InstallationMedia: Ubuntu 20.04.6 LTS "Focal Fossa" - Release amd64 (20230316)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: gedit
UpgradeStatus: Upgraded to noble on 2024-02-24 (2 days ago)
modified.conffile..etc.init.d.apport: [modified]
mtime.conffile..etc.init.d.apport: 2024-02-22T15:20:00

Revision history for this message
Zalán Hári (zalanhari) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "library.py" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Zalán Hári (zalanhari) wrote :

Sorry, there is a mistake in my bug report: the critical GTK error occurs when I close gedit.

Revision history for this message
Zalán Hári (zalanhari) wrote :

I clarify: the critical message occurs exactly 248 times at every close if I count it with „gedit 2> /dev/stdout | wc -l”.

Zalán Hári (zalanhari)
Changed in gedit (Ubuntu):
assignee: nobody → Zalán Hári (zalanhari)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.