gedit problem with long lines

Bug #505765 reported by leibnix
54
This bug affects 8 people
Affects Status Importance Assigned to Milestone
GtkSourceView
Fix Released
Unknown
gedit
Fix Released
Unknown
gedit (Ubuntu)
Won't Fix
Medium
Unassigned
gtksourceview4 (Ubuntu)
Won't Fix
Undecided
Unassigned
gtksourceview5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gedit

Hi,

I was editing a text file when the cursor began to behave strangely. The file contained these lines:

CREATE TABLE people(
 integer primary key,
 name varchar(50),
 age integer
)

When I put the cursor after the 'l' in 'people', the arrow key would not move the cursor to the right. Instead it jumped to the next line. Similarly, I could not add text at this position.

Viewing the file in a hex editor revealed a lot of spaces (284 to be accurate) after the opening parenthesis. Probably I've added those spaces without knowing it (resting my book "beginning Ruby" on the space bar ^ ^). Still, I feel the editor should handle a few hundred chars on a line without misbehaviour.

I attached a copy of the text file.

Thanks for developing and maintaining this simple but useful editor!

Tor

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/gedit
Package: gedit 2.26.1-0ubuntu1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gedit
Tags: ubuntu-unr
Uname: Linux 2.6.28-17-generic i686

Revision history for this message
leibnix (torgausen) wrote :
Revision history for this message
Mitch Towner (kermiac) wrote :

I can confirm the behaviour as described by leibnix above. This same file opened fine in "Leafpad" & did not show any of the described issues.

Changed in gedit (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

Changed in gedit (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
Revision history for this message
Martin Mai (mrkanister-deactivatedaccount-deactivatedaccount) wrote :

Have you sent this upstream? May you tell us the link? Thanks.

Changed in gedit (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
leibnix (torgausen) wrote : Re: [Bug 505765] Re: gedit problem with long lines

Uh... upstream? Where is that?

^_^

2010/5/14 Martin Mai <email address hidden>:
> Have you sent this upstream? May you tell us the link? Thanks.
>
> ** Changed in: gedit (Ubuntu)
>       Status: Confirmed => Incomplete
>
> --
> gedit problem with long lines
> https://bugs.launchpad.net/bugs/505765
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “gedit” package in Ubuntu: Incomplete
>
> Bug description:
> Binary package hint: gedit
>
>
> Hi,
>
> I was editing a text file when the cursor began to behave strangely. The file contained these lines:
>
> CREATE TABLE people(
>        integer primary key,
>        name varchar(50),
>        age integer
> )
>
> When I put the cursor after the 'l' in 'people', the arrow key would not move the cursor to the right. Instead it jumped to the next line. Similarly, I could not add text at this position.
>
> Viewing the file in a hex editor revealed a lot of spaces (284 to be accurate) after the opening parenthesis. Probably I've added those spaces without knowing it (resting my book "beginning Ruby" on the space bar ^ ^). Still, I feel the editor should handle a few hundred chars on a line without misbehaviour.
>
> I attached a copy of the text file.
>
> Thanks for developing and maintaining this simple but useful editor!
>
> Tor
>
> ProblemType: Bug
> Architecture: i386
> DistroRelease: Ubuntu 9.04
> ExecutablePath: /usr/bin/gedit
> Package: gedit 2.26.1-0ubuntu1
> ProcEnviron:
>  LANG=en_US.UTF-8
>  SHELL=/bin/bash
> SourcePackage: gedit
> Tags:  ubuntu-unr
> Uname: Linux 2.6.28-17-generic i686
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/505765/+subscribe
>

--
Have a good day,
Tor

"The problem with troubleshooting is that trouble shoots back."
~Author Unknown

Revision history for this message
Martin Mai (mrkanister-deactivatedaccount-deactivatedaccount) wrote :

Upstream are the developers of the software that ships with Ubuntu. See Sebastien's comment (comment #3) for more.

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Reproduced in gedit 3.3.3-0ubuntu1

Changed in gedit (Ubuntu):
status: Incomplete → Confirmed
Changed in gedit (Ubuntu):
status: Confirmed → Triaged
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
Changed in gedit:
importance: Unknown → Medium
status: Unknown → New
Changed in hundredpapercuts:
milestone: none → gedit
assignee: nobody → Paper Cuts Ninja (papercuts-ninja)
Changed in hundredpapercuts:
status: New → Confirmed
Changed in hundredpapercuts:
milestone: gedit → papercuts-s-gedit
Changed in hundredpapercuts:
importance: Undecided → Low
Changed in hundredpapercuts:
assignee: Paper Cuts Ninja (papercuts-ninja) → nobody
assignee: nobody → Paper Cuts Ninja (papercuts-ninja)
status: Confirmed → Triaged
Changed in gedit:
status: New → Invalid
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Bug URL changed for the 'gedit' project since the latest was a duplicated of the new one.

Changed in gedit:
importance: Medium → Unknown
status: Invalid → Unknown
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Since the bug has has a moderate impact on a core application, it has a priority of "medium".

Changed in gedit (Ubuntu):
importance: Low → Medium
Changed in hundredpapercuts:
importance: Low → Medium
Changed in gedit:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in hundredpapercuts:
assignee: Papercuts Ninjas (papercuts-ninja) → nobody
description: updated
Revision history for this message
Morgane Roy (morgane-mm-roy) wrote :

Hello,

I fell upon this bug and can confirm that Gedit misbehaves when dealing with a lot of spaces in a text file. I tested with the provided file the following way. When treating this string:

'CREATE TABLE people( <240 spaces here> id<newline>...'

the text is displayed in the following manner

CREATE TABLE people
(<240 spaces here>id<newline>
...

When the cursor is placed between the 'e' in 'people' and the bracket, when one hits backspace the line is not moved upwards, but the 'e' is deleted. In fact the line is never moved up one when the <neline> char is deleted.

I think this is kind of weird behaviour. Can someone confirm that this is not a normal behaviour. If yes, how should gedit behave? IMHO the line should be moved up one line when between 'e' in 'people' and the bracket and when one hits backspace.

HTH

Revision history for this message
Zachary (zachary-aich) wrote :

Hello,

here is a bit of update of what Morgane reported, it seems that there are specific characters with which you can reproduce this bug like "(", "[", "{", "$", "\" ... (there may be others).
When those are followed by a lot of space chars the cursor position on the screen and the position it seems to be on, aren't the same. Furthermore if you try to delete the last character you end up deleting characters that are above the cursor and the cursor itself isn't moving from its position.

We explored Gedit's source code and we doubt that this is a Gtk issue. We posted a message on Gtk's bugzilla to ask them if they can confirm it is related or not. If anyone has any updates to make let us know.

Changed in gedit:
status: Confirmed → Expired
Revision history for this message
Paul White (paulw2u) wrote :

Issue now being tracked upstream at:
https://gitlab.gnome.org/GNOME/gtk/issues/229
See Gedit FAQ for why issue not yet resolved:
https://wiki.gnome.org/Apps/Gedit/FAQ
Removing Papercuts task as not trivial to fix

no longer affects: hundredpapercuts
Revision history for this message
Tgkprog (tgkprog) wrote :

see this issue when opening a json file without new lines between elements. will be cool if horizontal scrolling works as well, has short cuts and is stable like vertical scrolling. thank you

Paul White (paulw2u)
Changed in gedit:
importance: Medium → Unknown
status: Expired → Unknown
Changed in gedit:
status: Unknown → New
Revision history for this message
Jaromir Obr (jaromir-obr) wrote :

An annoying thing on this bug is that it may lead to non-responsive Gnome desktop and then you have to perform system restart to get Ubuntu desktop working again, see #1850046.
I guess it may be caused by an issue in OS, not only in gedit.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please reword this bug and the upstream one to a more descriptive title, not just "problem" or "problems".

Changed in gedit (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 9.04 (jaunty) reached end-of-life on October 23, 2010.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

The most recent discussion in this area continues in bug 1850046 instead.

Changed in gedit (Ubuntu):
status: Incomplete → Won't Fix
Revision history for this message
Jaromir Obr (jaromir-obr) wrote :

Jaromir Obr (jaromir-obr) wrote:

> An annoying thing on this bug is that it may lead to non-responsive Gnome desktop and then you
> have to perform system restart to get Ubuntu desktop working again, see #1850046.
> I guess it may be caused by an issue in OS, not only in gedit.

Well, the issue with worsened Gnome shell responsiveness seems to be the bug #1845302, a regression in Ubuntu 19.10.

Changed in gedit:
status: New → Fix Released
Revision history for this message
Jaromir Obr (jaromir-obr) wrote :

The issue persists in 22.04. Not sure if it should be fixed in upstream: https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/121.

However at least gedit behavior in Ubuntu 22.04 is better than in 21.10 (maybe fixed in new Gnome Shell 42.0).
Let's say you have a JSON file, not prettified, 1.9 MB size, whole content on one line. If you open the file in gedit, then:
21.10: gedit freezes (CPU 100% forever) and if you right click to app icon to dock, mouse and keyboard stops working and OS becomes unresponsive - you need to restart OS
22.04: gedit freezes (CPU 100% forever), but no OS freezing on right click in dock

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtksourceview5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It appears this bug has been closed upstream as fixed in gtksourceview 5.2 (I think, maybe).

Ubuntu 22.04 doesn't seem to use it yet though (still on gtksourceview 4).

affects: gtksourceview (Ubuntu) → gtksourceview5 (Ubuntu)
Changed in gtksourceview5 (Ubuntu):
status: New → Fix Released
Changed in gtksourceview4 (Ubuntu):
status: New → Won't Fix
Changed in gtksourceview:
status: Unknown → Fix Released
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.