After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 70601 - Allow use of child anchor before inserting it into a buffer
Allow use of child anchor before inserting it into a buffer
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
1.3.x
Other Linux
: Normal minor
: Small fix
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-02-05 14:44 UTC by Sergey Kuzminov
Modified: 2014-03-23 21:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sergey Kuzminov 2002-02-05 14:44:54 UTC
Test case:
_________________

#include <gtk/gtk.h>

int
main (int argc, char** argv)
{
    GtkTextChildAnchor* anchor;
    GList* list;
 
    gtk_init (&argc, &argv);

    anchor = gtk_text_child_anchor_new ();
    if (!anchor)
    {
        printf ("\nanchor is NULL\n");
        return;
    }

    list = gtk_text_child_anchor_get_widgets (anchor);
    if (list)
        printf ("\nlist = %p\n", list);
}

________

Output:
Segmentation fault
Comment 1 Owen Taylor 2002-02-05 16:09:47 UTC
What is going on is that it's not possible to use a
child anchor until it is attached with 
gtk_text_buffer_insert_child_anchor(). This particular case
has a meaningful fallback; probably in other cases nothing
more is possible than a g_return_if_fail()?
Comment 2 Havoc Pennington 2002-02-06 22:05:27 UTC
2002-02-06  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextchild.c: Add warnings if you try to use a child
	anchor that isn't inside a buffer. Really kind of lame; 
	we should separate the anchor from the buffer. But not worth 
	fixing for now. #70601
Comment 3 Matthias Clasen 2014-03-23 21:44:01 UTC
closing out ancient bugs