Re: [BLACKBOX] Program freezes when window loses focus

From: [at]} <Bob>
Date: Tue, 15 Mar 2011 21:27:21 -0000


why not post the code and let us have a look? I'm an old programmer too, but I was caught out that way when I started used Blackbox. The symptoms do match the diagnosis that has been given.

 

Bob

 

From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
Sent: 15 March 2011 21:20
To: BLACKBOX{([at]})nowhere.xy
Subject: Re: [BLACKBOX] Program freezes when window loses focus

 

No, sorry, that's not it. I said "display window" in the same sense as you said "form"; i.e. I'm already doing the better way you suggest, using Dialog.Update, and watching the program execute. However, if I do something to lose focus on the display form, such as click mouse-click elsewhere, or start another program outside BlackBox, the program freezes. It is not executing an infinite loop, because I am too old a programmer for that, I put traps to halt loops that run an excessive number of times; i.e. an excessive number of iterations is always one of several exit conditions.

-------- Original Message --------
Subject: Re: [BLACKBOX] Program freezes when window loses focus
From: Wojtek Skulski <skulski{([at]})nowhere.xy
Date: Tue, March 15, 2011 4:20 pm
To: BLACKBOX{([at]})nowhere.xy

> Thanks for the reply. I can write to the log, as well as to my display
> window. Writing to this display window displays the contents of a string
> variable, whose contents are presumably replaced on each write, rather
> than appended, so the memory required presumably would not grow.

Not true. The Log displays an in-memory Text, which is growing on each
append. BB will be slowed down when this Text grows to large size. On the
other hand, writing to Log is easy.

A better way is to use a few interactors in your module, generate a Form,
and put calls to Dialog.Update in various places in your algorithm. You
will then see the numbers changing in the form, what gives you good
indication of progress. For example, display a loop counter and you will
see if the loop is still running.

> The log
> and everything else in the main BlackBox window, including the source code
> window and the display window, freeze and I cannot regain control, if I
> once do something to lose the focus from the display window once the
> program is running.Steve Troy


Indicative of an infinite loop where the program is stuck in an iteration
without an exit condition. Happened to me a few times.

Use the Form and you will quickly find out where the program gets stuck.

Wojtek


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Tue Mar 15 2011 - 22:27:21 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:16 UTC