tracking down freeze based on timing, maybe?
Matt Maier
blueback09 at gmail.com
Tue Dec 15 12:42:40 EST 2015
I tried the sBusy idea. The log showed that it's blocking a few mouse
messages, but the vast majority seem to have happened when sBusy was false
anyway.
Something else at least changed the behavior. I switched a handler call to
"send [handler] to me in 50 milliseconds" and that allowed me to click as
fast as I could manage without causing a freeze. It still froze a couple
times when I was doing something else, but for the most part it's not
freezing.
It looks like the combination is at least resolving the worst of the
effect. Still not sure what root cause is.
On Mon, Dec 14, 2015 at 11:47 AM, J. Landman Gay <jacque at hyperactivesw.com>
wrote:
> On 12/13/2015 10:00 PM, Matt Maier wrote:
>
>> It starts with a mouseMove handler, which is where it returns after stuff
>> has happened.
>>
>> One of several options is followed by a freeze. I setup a little handler
>> to
>> log the seconds every x milliseconds after that. Nothing is happening a
>> split second after the script returns to the mouseMove handler. It's like
>> whatever's hanging up the application is outside of all the stuff I wrote,
>> so I'm not sure how to dig into it.
>>
>
> Mousemove is sent a whole lot and messages may be piling up in the queue
> while LC tries to catch up. Try removing the mouseMove trigger and start
> your handlers some other way. If that fixes the problem, then that's where
> to focus.
>
> Typically we add a "busy flag" to handlers so they don't try to do
> anything until the flag is cleared and it's okay to proceed.
>
> local sBusy
>
> on mouseMove
> if sBusy = true then exit mouseMove -- we're busy; don't do anything
> bigHandler -- if we get this far, it's okay to do work
> end mouseMove
>
> on bigHandler
> -- do stuff
> put false into sBusy -- clear the flag
> end bigHandler
>
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list