Re: CList segfault



On 25 Feb 2001 12:41:03 -0500 Owen Taylor <otaylor redhat com> wrote:

> 
> Daniel Elstner <daniel elstner gmx net> writes:
> 
> > Hello,
> > 
> > I have some problems with GtkCList in extended selection mode,
> > reproduceable with the following steps:
> > 
> > 1. The user selects some rows _including_ the last one.
> > 2. The program will call gtk_clist_remove() for each selected row.
> > 3. The user changes the selection via mouse clicks before
> >    all rows are removed.
> 
> I don't understand here - 2. happens all at once, doesn't it?
> How can the user change the selection while this is going on?

No, it doesn't. The removing happens asynchronous, actually it's called
from a timeout handler.

> > Then you will get a segfault in resync_selection(), gtk_clist.c:3980.
> > It seems g_list_nth() is called with a row number exceeding the
> > list length, and returns a NULL pointer which will be
> > dereferenced immediately.
> > I tried tracking down the problem but I don't know anything about
> > the internal GtkCList stuff, especially the purpose of the
> > undo_selection list. Simply checking for NULL didn't help much
> > and triggered even worse errors just a little bit later.
> 
> Well, if you provide a test case, somebody could take a look.

The main problem for me is that the error occurs in my C++ program using
Gtk-- and libsigc++. Therefore providing a test case is a little bit tricky,
since I would have to write it from scratch.

Ok, if it's really needed I will try writing a test program, but this
could take a while.

Regards
Daniel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]