patch - fix crash with long one-line XML documents

Bug #1461082 reported by Vlad Orlov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gtksourceview2 (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned
Utopic
Fix Released
Undecided
Unassigned
Vivid
Fix Released
Undecided
Unassigned
Wily
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

When editing a long one-line document with some markup (e.g. XML) with Pluma (or any other editor using gtksourceview2), you cannot delete a selected portion of text because the editor will crash.

This has been reported upstream and fixed in [1], but the commit never made it to GTK+2 version of gtksourceview.

So, I propose fixing it in current stable Ubuntu releases with the patch which fixes the crash for good.
The debdiffs for every stable release are in the attachments below.

[Test Case]

Steps to reproduce:

1. Open a long one-line XML document (e.g. [2]) with Pluma. Any other editor using gtksourceview2 will also fit I think.
2. Select a portion of text.
3. Press Backspace (or Delete) key.
4. Pluma crashes. The full backtrace is at [3].

If you're running Pluma from the command-line, you'll notice a warning:
GtkSourceView-CRITICAL **: Highlighting a single line took too much time, syntax highlighting will be disabled

That's the key. The library tries to invalidate the region when text is deleted and the engine is disabled (i.e. syntax highlighting is off).

[Regression Potential]

After several months of testing the patch in Debian Jessie, I haven't noticed any regressions.

[1] https://git.gnome.org/browse/gtksourceview/commit/?id=abef41da8c541c814bf631f69c92e0c431c610ad
[2] http://pastebin.com/nNdYzFXE
[3] http://pastebin.com/YgDT0iKh

Revision history for this message
Vlad Orlov (monsta) wrote :
Revision history for this message
Vlad Orlov (monsta) wrote :
Revision history for this message
Vlad Orlov (monsta) wrote :
Revision history for this message
Vlad Orlov (monsta) wrote :
Changed in gtksourceview2 (Debian):
status: Unknown → Confirmed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "debdiff with the fix for Precise" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

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

tags: added: patch
Changed in gtksourceview2 (Ubuntu Wily):
status: New → Fix Committed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

ACK on the debdiffs. I've uploaded it to wily, and to the stable releases for processing by the SRU team. I've slightly adjusted the changelog in the process.

Thanks!

Changed in gtksourceview2 (Ubuntu Precise):
status: New → In Progress
Changed in gtksourceview2 (Ubuntu Trusty):
status: New → In Progress
Changed in gtksourceview2 (Ubuntu Utopic):
status: New → In Progress
Changed in gtksourceview2 (Ubuntu Vivid):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtksourceview2 - 2.10.5-2ubuntu2

---------------
gtksourceview2 (2.10.5-2ubuntu2) wily; urgency=medium

  * fix-invalidate.patch: new patch. Don't invalidate region when
    text is deleted and engine is disabled. Fixes crash. (LP: #1461082)

 -- Vlad Orlov <email address hidden> Tue, 02 Jun 2015 15:30:42 +0300

Changed in gtksourceview2 (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Monsta, or anyone else affected,

Accepted gtksourceview2 into precise-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gtksourceview2/2.10.5-0ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gtksourceview2 (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Chris J Arges (arges) wrote :

Can you fix and re-upload the Trusty/Utopic/Vivid versions? You changed the Uploaders field in debian/control without any explanation. Thanks

Revision history for this message
Vlad Orlov (monsta) wrote :

I didn't. Every time I see that field auto-changes on rebuild, I take care to remove any debian/control changes from the debdiff.
Please recheck and make sure you didn't confuse these patches with someone else's ones.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

The debian/control file is automatically regenerated from debian/control.in during build, that is what is changing the Uploaders field.

Revision history for this message
Chris J Arges (arges) wrote :

Hello Monsta, or anyone else affected,

Accepted gtksourceview2 into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gtksourceview2/2.10.5-1ubuntu2.14.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gtksourceview2 (Ubuntu Utopic):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Monsta, or anyone else affected,

Accepted gtksourceview2 into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gtksourceview2/2.10.5-2ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gtksourceview2 (Ubuntu Vivid):
status: In Progress → Fix Committed
Changed in gtksourceview2 (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Monsta, or anyone else affected,

Accepted gtksourceview2 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gtksourceview2/2.10.5-1ubuntu2.14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Vlad Orlov (monsta) wrote :

Ok good, proposed packages work perfectly in all four releases.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for gtksourceview2 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package gtksourceview2 - 2.10.5-1ubuntu2.14.10.1

---------------
gtksourceview2 (2.10.5-1ubuntu2.14.10.1) utopic; urgency=medium

  * fix-invalidate.patch: new patch. Don't invalidate region when
    text is deleted and engine is disabled. Fixes crash. (LP: #1461082)

 -- Vlad Orlov <email address hidden> Tue, 02 Jun 2015 15:18:59 +0300

Changed in gtksourceview2 (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtksourceview2 - 2.10.5-1ubuntu2.14.04.1

---------------
gtksourceview2 (2.10.5-1ubuntu2.14.04.1) trusty; urgency=medium

  * fix-invalidate.patch: new patch. Don't invalidate region when
    text is deleted and engine is disabled. Fixes crash. (LP: #1461082)

 -- Vlad Orlov <email address hidden> Tue, 02 Jun 2015 15:05:28 +0300

Changed in gtksourceview2 (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtksourceview2 - 2.10.5-2ubuntu1.1

---------------
gtksourceview2 (2.10.5-2ubuntu1.1) vivid; urgency=medium

  * fix-invalidate.patch: new patch. Don't invalidate region when
    text is deleted and engine is disabled. Fixes crash. (LP: #1461082)

 -- Vlad Orlov <email address hidden> Tue, 02 Jun 2015 15:30:42 +0300

Changed in gtksourceview2 (Ubuntu Vivid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtksourceview2 - 2.10.5-0ubuntu3.1

---------------
gtksourceview2 (2.10.5-0ubuntu3.1) precise; urgency=low

  * fix-invalidate.patch: new patch. Don't invalidate region when
    text is deleted and engine is disabled. Fixes crash. (LP: #1461082)

 -- Vlad Orlov <email address hidden> Tue, 02 Jun 2015 14:40:18 +0300

Changed in gtksourceview2 (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Vlad Orlov (monsta) wrote :

Debian maintainers showed no interest in this patch for more than 2 years, so let it be gone from here.

no longer affects: gtksourceview2 (Debian)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

  • debbugs #780205
    [done important patch buster bullseye sid stretch jessie fixed-upstream upstream] Edit

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