[Scummvm-tracker] [ScummVM :: Bugs] #6567: WME: 1 1/2 Ritter - Stuck in the Sound Options Menu
ScummVM :: Bugs
trac at scummvm.org
Mon Aug 5 01:15:13 CEST 2019
#6567: WME: 1 1/2 Ritter - Stuck in the Sound Options Menu
-------------------------+--------------------------------
Reporter: raziel- | Owner: raziel-
Type: defect | Status: new
Priority: normal | Component: Engine: Wintermute
Resolution: | Keywords: original
Game: Wintermute |
-------------------------+--------------------------------
Changes (by lolbot-iichan):
* keywords: => original
Comment:
Finally, I have a breakthrough on understanding the low-level mechanics
behind all the kinds of issues with second type of sliders!
The code of those sliders is something like this:
`on "LeftClick" {`
` mouseLocked = 1;`
` while(mouseLocked) {`
` <disallow moving mouse outside of slider area>;`
` <adjust slider position to mouse position>;`
` <adjust mouse position to previous mouse position>;`
` }`
`}`
`on "LeftRelease" {`
` mouseLocked = 0;`
`}`
Maybe it is a mistake, maybe it was made intentionally to make sliders
felt more "heavy", but mouse position is adjusted not to exact center of
slider, but to SOME VALUE calculated on mouse movement data and slider
position. This actually means that mouse MAY NOT HOVER slider button on
the moment when left button is RELEASED. Which means that "LeftRelease"
event may not be recieved by slider button. Which means that loop inside
"LeftClick" handler may act like endless loop, if you move your mouse
right way.
However, there is a workaround - if you click&release mouse one more time,
the loop will be stopped. But this is where things begin to act really
weird, because you can actually move your mouse during this click&release,
and as we know, release event can be lost. Which mean that it is possible
to get TWO endless loops running, adjusting slider and cursor position!
Since those loops are working with the same global variables, but still
have some local variables, they see each other as user input that should
be adjusted. Which causes several types of funny effects, including
slider&cursor that moves by itself while mouse is not pressed at all!
If you click mouse second time without releasing, you'll get behaviour
that was experienced by raziel- Which finally leads us to stable scenario
to reproduce the issue.
Scenario:
(Bug A) Step 1. While performing very fast horisontal movement,
leftclick&release any slider of second type (Sliders at James Peris,
Ritter, second slider of test game). Cursor should then stuck to the
slider, making you move the slider while the mouse button is actually
released. This requires some practice, but in my test game it's the
behaviour that I can reproduce with 1-3 tries.
(Bug B) Step 2. Leftclick on slider again without releasing the mouse. Try
moving mouse slightly to the left, slightly to the right. Cursor and
slider would both move by itself! Sometimes this movement is very slow,
sometimes it's move like instant jump to the side, sometimes it's steady
movement, sometimes it's bouncy movement (2 pixels to the right, 1 pixel
to the left, 2 pixels to the right, ...).
(Bug C) Step 3. If you are lucky enough to release mouse button while
cursor is somehow not hovering the slider, you'll get even more buggy
behaviour, when cursor and slider would both move by itself while you
remove your hand from the mouse!
Now I'm finally able to quite easily reproduce bugs A, B, C with original
Wintermute and my test game.
I was also able to several times reproduce bugs A, B, C with porn slider
of James Peris (the difference is that in this case porn settings WINDOW
is moving around by itself, not porn settings SLIDER moving around by
itself, but whatever).
I guess this makes this "original" bug, repruducable both with original
game and with ScummVM.
However, for some reasons, this is a hard-but-possible-to-reproduce bug
for me on Windows SDL2, and impossibe-to-avoid bug for raziel- on Amiga
SDL2.
To get more info on it I still need some logs.
Could you please run some tests again with "lolbot-
iichan/wme_slider_debug" branch's latest commit
a6d7866252e067dd75b242c60721985fcd265688 (https://github.com/lolbot-
iichan/scummvm/commits/wme_slider_debug)?
I need you to:
1. Start ScummVM with ./scummvm --debugflags=enginelog
2. Run 1 1/2 Ritter in window mode.
3. Reproduce stable scenario of teleporting to 0%
4. Stop the engine with Crtl+F5, close ScummVM
5. Check logs, there should be lines like [2019-08-05 01:54:22] WARNING:
CURSOR: onMouseLeftDown!
Please, if possible, try to make as few mouse clicks as needed to complete
the scenario "load the game, go to options and click on the sliders" (use
Esc to skip intro, restart ./scummvm if issue is not repruduced correctly)
and provide a list of what you clicked/released and what happened.
Bonus test:
1. Start ScummVM
2. Run updated test game (dwonload fresh version from https://github.com
/lolbot-iichan/wme_testsuite/tree/master/slider_test/packages)
3. Right-click on the second slider (test game is hacked so that this
action would produce 2 left-clicks events on the second slider and 0 left-
release events)
4. I believe you should experience the same issues you were talking about
during those thread, but this case is 100% reproducable and should not
depend on screen resolution, mouse speed, etc
--
Ticket URL: <https://bugs.scummvm.org/ticket/6567#comment:18>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list