[lazarus] Endless loop problem I'm not sure how to trace

Tony Maro tony at maro.net
Sat Oct 26 21:54:59 EDT 2002


I don't THINK this is my code causing this.  Looks like something in the
LCL.  But then again, I've been wrong before ;-)  I've exhausted
everything I can think of to find this.

It just started with my latest build as of yesterday working off of
Friday's CVS.  I have since done the CVS update for Lazarus 0.8.5 and
the problem continues.

In CBTracker when clicking from Account to Bills to Cash Flow, sometimes
things will hang and my CPU usage goes to 100%.  The interface does not
update.

But, all I have to do is click anywhere in my desktop environment (on or
off the application) and the endless loop stops.

It's odd because the button click event for the button finishes
completely before the loop, and the paint event for my custom control
(TCheckBookSchedule) never fires off, and nothing else on the form gets
a paint either.  So it's between showing the controls on the form and
the first paint message.  And it doesn't totally crash the program or
anything - all you have to do is click the mouse anywhere - and it
doesn't even have to be within the program - for it to unhang.

I'm doing a little trick to resize my scrollbar that when these buttons
are clicked I resize the custom control.  I've confirmed that my WM_SIZE
event is processed correctly, but it never goes on to trigger a WM_PAINT
event for controls on the form.  Other than that, all these buttons do
is hide and show controls.

In case you want them, sources with a built executable is at:

http://members.telocity.com/~tonymaro/cbbad.tgz

Note: It's intermittent - maybe one out of every 5-10 times you click
between Bills and Cash Flow.  I've traced through all of the code of
mine that I believe could be running at that point, which is all message
handlers.  None of my code appears to be running when this happens.  It
never seems to happen when you click TO the Account view though.  And it
happens on both the bills and the cash flow views, so I know it's not
related to the graph control I made, but the TCheckBookSchedule IS
visible in both views.

Anyway, like I said I'm not POSITIVE it's not my code, especially
considering that's the only two places it happens and both contain the
TCheckBookSchedule control, but there's no handling I do that would be
affected by a click anywhere else.  If I were generating an endless loop
within my code, it wouldn't stop looping when the user clicked on the
desktop.  That's why I'm guessing it's GTK+ related.

Thanks,

Tony






More information about the Lazarus mailing list