On Sun, 2008-02-10 at 19:39 +0100, Tomaž Šolc wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi everyone
>
> I'm having some problems with a nasty bug in the latest CVS version of
> PCB (GTK hid).
>
> If you click and drag to select some elements in the view and if during
> dragging the mouse cursor leaves the view PCB falls into some broken
> state. Everything still works, but some things no longer get drawn on
> the screen (for example: element outlines when dragging, line outlines
> before you select segment end point, selection box, etc).
>
> After some checking I found out that commenting out
> "HideCrosshair(TRUE)" call in ghid_port_window_leave_cb() (line 928,
> gui-output-events.c) seems to fix it.
>
> I guess that's probably not the real cause of the problem. Maybe it's
> related to bug #1882970 on SF.
Could well be realated.
HideCrosshair() and RestoreCrosshair() calls must always be matched.
There is a stack, and if the pairs aren't matched it will either grow,
or (perhaps) blow up by underflowing.
The parameter to HideCrosshair() and RestoreCrosshair() dictates whether
the object you're dragging should be drawn or not.
This argument is _not_ saved in the stack, so whether you have drawings
following the cursor around or not is dependant on the parameter passed
LAST to either of these two functions.
This code:
if (CrosshairStackLocation >= MAX_CROSSHAIRSTACK_DEPTH)
CrosshairStackLocation--;
Makes me wonder what strange effects happen when the stack fills up.
In RestoreCrosshair(), the CrosshairStackLocation is decremented without
checking for underflow. It is an unsigned integer, and I expect
accessing CrosshairStack[-1] will cause badness.
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev