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

Re: gtk frontend for cdebconf, ready for commit

On Mon, Sep 16, 2002 at 11:46:41AM +0200, Martin Sj?gren wrote:
> When I ran ../debconf test.config (using the gtk2 fe) and tried using
> the Back button it segfaulted:
> 236       *pq = (*pq)->prev->prev;
> (gdb) p (*pq)->prev
> $2 = (struct question *) 0xe8
> (gdb) p (*pq)->prev->prev
> Cannot access memory at address 0x108

Great! Thanks for the test case! I'll take a look at this asap. 

> So it seems that the ->prev->prev pointer points to garbage. But why use
> ->prev->prev? If we want to go back, should we not use ->prev? Or is it
> a hack so that in the next iteration, you can use q->next?

yes. since it's in a loop that it iterating over the questions. 

> Bear in mind that for the first element of a double-linked list, the
> invariant curr->prev->next == curr doesn't hold, since curr->prev
> doesn't exist...

Of course. I'll fix it soon. 

> Also, I really dislike buttons that disappear and come back. If there's
> going to be a Back button in the next dialog, please have a disabled
> Back button in the first one too. Oh, another issue. Using Back and Next
> isn't that good IMO. Previous and Next, or Back and Forward, but not
> Back and Next...

That's a very good point. 

> When I get time to hack some more on it, I'll see if I can make the
> "main loop" more intelligent when it comes to backing up.
> Regards,
> Martin

I think we also have the larger problem that there will be multiple
packages asking lists of questions, so finish isn't really
appropriate. We need a mechanism to go back to a previously configured

michael cardenas | lead software engineer        lindows.com
hyperpoem.net    | GNU/Linux software developer  debian.org

"The secrets of this earth are not for all men to see, but only for those who will seek them"
- Ayn Rand, Anthem

Attachment: pgpjS5s4vwpbH.pgp
Description: PGP signature

Reply to: