Missing a WITHOUT event

Hi,

Still fighting with GUI, I now have the problem that sometimes I miss a without event.

I have a horizontal row of buttons, which all track their within and without events. In the within they display a tooltip, in without they hide the tooltip again.

The symptom is: sometimes, when I move the mouse quickly, it can happen that a tooltip is not removed, because the button never received a without event.

Some more details: the buttons don’t overlap. They’re all 46x46 pixels big on screen, there’s a gap of 3 pixels between them. I have a framerate of ~ 150 Hz, so it shouldn’t be a performance problem. And by moving the mouse quickly I also don’t mean a super-human speed, it’s about the speed where it takes 1 second to cross the screen.

I’ve tracked the events the messenger sends and here’s the annotated output:

:04-24-2008 17:05:05 Messenger(debug): sent event: within-pg7 sentArgs: [(-0.261719 -0.960938)]
:04-24-2008 17:05:05 Messenger(debug): sent event: enter-pg7 sentArgs: [(-0.261719 -0.960938)]
:04-24-2008 17:05:05 Messenger(debug): sent event: without-pg7 sentArgs: [(-0.339844 -0.960938)]
:04-24-2008 17:05:05 Messenger(debug): sent event: exit-pg7 sentArgs: [(-0.339844 -0.960938)]
:04-24-2008 17:05:05 Messenger(debug): sent event: within-pg7 sentArgs: [(-0.330078 -0.955729)]
:04-24-2008 17:05:05 Messenger(debug): sent event: enter-pg7 sentArgs: [(-0.330078 -0.955729)]
:04-24-2008 17:05:05 Messenger(debug): sent event: without-pg7 sentArgs: [(-0.212891 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: within-pg10 sentArgs: [(-0.212891 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: exit-pg7 sentArgs: [(-0.212891 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: enter-pg10 sentArgs: [(-0.212891 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: within-pg10 sentArgs: [(-0.150391 -0.950521)]

    ** first oddity: why did I get a within-pg10 twice before getting a without-pg10?

:04-24-2008 17:05:05 Messenger(debug): sent event: without-pg10 sentArgs: [(-0.107422 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: within-pg13 sentArgs: [(-0.107422 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: exit-pg10 sentArgs: [(-0.107422 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: enter-pg13 sentArgs: [(-0.107422 -0.950521)]

     ** here I miss the without-pg13

:04-24-2008 17:05:05 Messenger(debug): sent event: within-pg19 sentArgs: [(0.0527344 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: exit-pg13 sentArgs: [(0.0527344 -0.950521)]

     ** note how I still get exit-pg13 but no without-pg13

:04-24-2008 17:05:05 Messenger(debug): sent event: enter-pg19 sentArgs: [(0.0527344 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: without-pg19 sentArgs: [(0.173828 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: within-pg22 sentArgs: [(0.173828 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: exit-pg19 sentArgs: [(0.173828 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: enter-pg22 sentArgs: [(0.173828 -0.950521)]
:04-24-2008 17:05:05 Messenger(debug): sent event: exit-pg22 sentArgs: [(0.333984 -0.950521)]

    ** again, a without-pg22 is missing, even though I got an exit

:04-24-2008 17:05:26 Messenger(debug): sent event: escape sentArgs: []
:04-24-2008 17:05:26 Messenger(debug): <direct.showbase.Loader.Loader instance at 0x02F92C10>
 now ignoring: 'async_loader_0'

Does anyone (Dave?) have an idea why the event goes missing? Any Ideas what to do about it?

I have a hunch that the double within event is causing trouble. I looked at the code in MouseWatcher.cxx where the without events are triggered, but it looked ok to me…
Also I’m sorry that I need to report the bug like this and can’t provide a code sample that demonstrates the problem directly. I tried to isolate the problem but failed.

And finally, I need to watch for the without events and can’t use the exit event, because the exit event isn’t generated anymore once I’ve pressed the mouse button1 over a button and keep it pressed while dragging the mouse around…

Thanks

Erik

This certainly sounds like a bug. Let me see if I can reproduce it.

David

A small addition: it DOES seem to be connected to framerate somehow. The lower the framerate the higher the probabily of this error.

I hope that helps tracking it down…

Erik

Hi David,

Any luck reproducing the bug yet?

Cheers,

Erik