Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: (PR#2794) segfault in civclient (1.14.0beta3)
Home

[Freeciv-Dev] Re: (PR#2794) segfault in civclient (1.14.0beta3)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: olafBuddenhagen@xxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2794) segfault in civclient (1.14.0beta3)
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Thu, 16 Jan 2003 22:23:58 -0800
Reply-to: rt@xxxxxxxxxxxxxx

olafBuddenhagen@xxxxxx via RT wrote:
> Hi,
> 
> I've found the problem.
> 
> I realized that the crash actually happens *always* when a new message
> is added to the message window while the window isn't open, and the new
> message causes scrolling (i.e. there are already >= N_MSG_VIEW
> messages). The problem is that scrolling doesn't work unless the message
> window is actually visible: The "viewport.child" component of the
> viewport widget (normally pointing to the list widget) isn't set
> otherwise, thus causing XawViewportSetCoordinates() to crash.

With some effort, I can duplicate the crash now.  And your patch does 
seem to fix it.

> I've no idea whether this is correct behaviour or a bug in Xaw, neither
> why the problem didn't occur before. (I'm not aware of having changed
> anything in my system configuration.)
> 
> I've created the following workaround, which uses a flag to prevent
> scrolling before the window is acutally popped up:

Ugh...

> I guess there is a more elegant solution, using Xaw functions/data
> structures to determine whether the window is visible. However, I'd
> rather write a bigger patch, considerably changing the message window
> handling, so that such a situation can't occur in the first place.
> (While hunting down the bug I realized that the code is quite messy,
> causing superfluous actions etc... Seems somewhere between maintaier
> changes people lost track what's actually happening there.)

Hopefully a better patch can be devised...

jason




[Prev in Thread] Current Thread [Next in Thread]