Bug 666701 - GtkSourceView objects might recreate their shared buffers on change notification
Summary: GtkSourceView objects might recreate their shared buffers on change notification
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gtksourceview2
Version: 14
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-02 13:05 UTC by Andrea Santilli
Modified: 2012-08-16 19:22 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-16 19:22:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Fix for gtksourceview 2.11.2 (700 bytes, patch)
2011-01-02 13:05 UTC, Andrea Santilli
no flags Details | Diff

Description Andrea Santilli 2011-01-02 13:05:17 UTC
Created attachment 471381 [details]
Fix for gtksourceview 2.11.2

Description of problem:
I noticed the problem while debugging the Val(a)IDE application: this program, which creates a split view (it always does, even when the split is hidden) containing two source views that share the same buffer, crashed while attempting to finalize both.

The reason is that the widget sends a notification when its buffer changes and in its notify_buffer() function it reaches its buffer by calling gtk_text_view_get_buffer(), but this other function recreates the buffer when this is set to NULL. Thus if you use two or more views sharing the same buffer and try to delete them, the program will crash while trying to finalize the second one: its buffer changes because it gets set to NULL, then it gets recreated by the notify function and the GtkTextView finalizer fails at the (text_view->buffer == NULL) assertion.

This bug is related to 637454 649491 658278 665389

A patch attachment follows.

Version-Release number of selected component (if applicable):
2.11.2-3.fc14


Additional info:
This is also confirmed by the fact that the problem does not arise while using GtkSourceView version 2.10.x because this older version refers to the buffer directly. The developers replaced lots of view->buffer occurrences with gtk_text_view_get_buffer () calls in the step from version 2.10.x to 2.11.x.

Talking about Val(a)IDE, the reason why the crashes occur even while trying to open a file, is that the program first destroys its split view on the eventual blank untitled document.

Comment 1 Andrea Santilli 2011-01-03 14:43:23 UTC
I've reported this bug in the GNOME bugzilla too: https://bugzilla.gnome.org/show_bug.cgi?id=638575

Comment 2 Fedora End Of Life 2012-08-16 19:22:40 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.