Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ Movewindow function transiently disappears during unrelated WindowAddHotspot
Movewindow function transiently disappears during unrelated WindowAddHotspot
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Sat 12 Mar 2022 06:50 AM (UTC) Amended on Sun 13 Mar 2022 10:59 PM (UTC) by Fiendish
|
Message
| I have a bit of a strange situation that I can reproduce 100% in situ, but so far I have not managed to make a minimal test case.
This is what happens...
The player makes a miniwindow in the world script space with a movewindow drag handler on it. The player then drags the window around for a while over top of their GMCP mapper miniwindow which of course lives in its own plugin. If new room GMCP data arrives (like if they set a timer to send the "look" command) causing the mapper to refresh its display, the miniwindow they're dragging suddenly AND TEMPORARILY forgets that its mouse handler functions exist and this error message pops up saying:
Quote: Cannot find the function 'mw_testwindow_movewindow_info.dragmove' - item 'dragmove' is nil
https://i.imgur.com/Cz0503w.png
After clicking "Ok" to dismiss the error message, the miniwindow that was being dragged stays stuck to the mouse cursor, following it around until the mouse is clicked again. After that, the miniwindow's dragmove handler resumes working normally until the next time.
The problem goes away if I comment out this WindowAddHotspot call inside the mapper https://github.com/fiendish/aardwolfclientpackage/blob/c6441b3c36e58ca79ef2029292e8012d86a4e9f7/MUSHclient/lua/aardmapper.lua#L919-L924
I've ruled out my Lua DLL by making some necessary modifications to be able to load the Aardwolf mapper plugin without LuaJIT and dropping in the classic one, so that's not the problem.
I think the problem also doesn't occur if the dragged miniwindow is larger than the mapper miniwindow, so it may be some global optimization gone bad using the hotspot corner coordinates when adding hotspots to miniwindows?
Anyway, there appears to be _something_ about that WindowAddHotspot call that is transiently botching an entirely unrelated script's miniwindow's ability to remember its dragmove function. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,070 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 16 Mar 2022 02:05 AM (UTC) |
Message
|
Quote:
causing the mapper to refresh its display
Does the mapper remove all hotspots while refreshing the display? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #2 on Wed 16 Mar 2022 02:16 AM (UTC) Amended on Wed 16 Mar 2022 02:18 AM (UTC) by Fiendish
|
Message
| It would remove all of its own, yes. 99% of all hotspots on the mapper are individual rooms which are getting drawn from scratch when new room info arrives. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,070 posts) Bio
Forum Administrator |
Date
| Reply #3 on Wed 16 Mar 2022 05:19 AM (UTC) Amended on Wed 16 Mar 2022 05:20 AM (UTC) by Nick Gammon
|
Message
| So the miniwindow which is not being refreshed suddenly “forgets” about the mouse-down action?
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #4 on Wed 16 Mar 2022 06:21 AM (UTC) Amended on Wed 16 Mar 2022 06:27 AM (UTC) by Fiendish
|
Message
| Yeah. Mid-drag, the drag handler function that it was using just nanoseconds prior is suddenly set to nil, causing an error, and then is immediately restored after dismissing said error.
I did say it was a strange situation. :) |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #5 on Sat 26 Mar 2022 03:31 PM (UTC) |
Message
| |
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #6 on Sat 26 Mar 2022 04:28 PM (UTC) |
Message
| |
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,202 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top