-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix lotto positioning #124
Comments
The symptoms of the problem:
This problem is definitely introduced by the particular positioning that drawLotto is now using. |
Twist: I can't replicate the SODM bug on Windows, only the HLFF bug? (The screenshots were taken on a Mac) |
But the bug persists on Mac. Could this be related to #17? It's worth noting that on the Windows dev machine, I'm getting the following error:
|
Oh, goody. On a Mac, fixing this requires deleting a library from the Matlab installation. On a Windows machine, it requires installing GStreamer, which is likely to throw off other PTB installations – especially if they are relying on the native Windows rendering, which PTB considers incorrect. (And it can make them unstable.) Nonetheless, I will get GStreamer and see if that allows me to reproduce the issue in Windows. |
...yup, GStreamer installation broke the positioning in exactly the same way as it's broken on the Mac. |
On the one hand, using a platform-independent text rendering engine seems like a no-brainer. On the other hand, almost all Levy Lab machines are running PTB on Windows without GStreamer, so this could break a lot of things. A quick test suggests that if we take the GStreamer path (in |
(Side note: since the screenshots for the tests were taken on Windows without the platform-independent rendering, installing GStreamer breaks those, too) |
So, for tasks that need the current positioning, there can be a settings option that calls function breakGstreamer()
%breakGstreamer Remove GStreamer, if available, from the system path
systempath = getenv('PATH');
systempath = erase(systempath, ...
{[getenv('GSTREAMER_1_0_ROOT_X86_64'), 'bin'], ...
[getenv('GSTREAMER_1_0_ROOT_X86'), 'bin']});
setenv('PATH', systempath);
end In the meantime, I'm going to assume that everyone's running the complete PTB setup. |
(...or maybe there's a way to hedge things and figure out how to correctly position elements for both options? I don't know. All I know is that this was supposed to be an easy fix and instead, I'm worrying about environmental variables.) |
Steps:
|
In my testing, this doesn't look bad on either Windows legacy renderer or the platform-independent renderer. The positioning also makes sense. Mostly, what fixed the positioning problemwas reverting #122.
It turns out that the fix for #115 (#122) actually inverted the correct placement of the payoff, and what was necessary was to invert everything else. Obviously, this will require further testing, but I think we've got it. The positioning looks reasonably with and without GStreamer (tested by invoking |
Remaining:
|
On a Windows machine with GStreamer installed, this can be tested by invoking `breakGstreamer()` somewhere in the Matlab testing setup. See issue #124 for reasons why anyone might want to do this.
With the creation of #131, all that's left to do is to merge this into master. |
In my testing, this doesn't look bad on either Windows legacy renderer or the platform-independent renderer. The positioning also makes sense. Mostly, what fixed the positioning problemwas reverting #122.
On a Windows machine with GStreamer installed, this can be tested by invoking `breakGstreamer()` somewhere in the Matlab testing setup. See issue #124 for reasons why anyone might want to do this.
The #115/#122 hotfix introduced some issues in lottery value display -- see clipping in SODM and especially HLFF. To close this issue, we need to:
The text was updated successfully, but these errors were encountered: