Skip to content
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

arrow-buttons on the simulator on macOS don't work as expected #707

Closed
mbonani opened this issue Nov 12, 2019 · 21 comments
Closed

arrow-buttons on the simulator on macOS don't work as expected #707

mbonani opened this issue Nov 12, 2019 · 21 comments
Assignees
Labels
bug Something isn't working Simulator

Comments

@mbonani
Copy link
Contributor

mbonani commented Nov 12, 2019

The arrow-buttons on the simulator on macOS are still not working (or just very occasionally).

@mbonani
Copy link
Contributor Author

mbonani commented Nov 22, 2019

it work on 10.12
it is not working on 10.14
opengl issue?

@mbonani mbonani added the bug Something isn't working label Dec 4, 2019
@mbonani mbonani added the 2.0 label Dec 4, 2019
@KunjanChauhan KunjanChauhan changed the title arrow-buttons on the simulator on macOS arrow-buttons on the simulator on macOS don't work as expected Dec 4, 2019
@mbonani
Copy link
Contributor Author

mbonani commented Dec 10, 2019

clicking on virtual button is working on 1.6.1 also on recent mac osx 10.14.

@mbonani
Copy link
Contributor Author

mbonani commented Dec 10, 2019

Here a small analysis of @stephanemagnenat :

  • Il y a du code picking [1]. La profondeur de la scène relative au point de click est prise dans le ZBuffer de OpenGL [2]. S'il y a intersection avec un objet de la scène, cet objet est retenu.

  • Puis quand il y a un click [4], il est dispatché à cet objet.

  • Le click arrive finalement dans le Thymio [5].

Au vu de tes commentaires, j'imagine qu'il se situe dans l'accès au buffer OpenGL [2].

[1] https://github.com/enki-community/enki/blob/9e0f2efd608c796f0e756b6752fd8ba01b3d4578/viewer/Viewer.cpp#L997

[2] https://github.com/enki-community/enki/blob/9e0f2efd608c796f0e756b6752fd8ba01b3d4578/viewer/Viewer.cpp#L1022

[3] https://github.com/enki-community/enki/blob/9e0f2efd608c796f0e756b6752fd8ba01b3d4578/viewer/Viewer.cpp#L1035

[4] https://github.com/enki-community/enki/blob/9e0f2efd608c796f0e756b6752fd8ba01b3d4578/viewer/Viewer.cpp#L1223

[5]

void AsebaThymio2::mousePressEvent(unsigned button, double pointX, double pointY, double pointZ) {

@mbonani
Copy link
Contributor Author

mbonani commented Dec 10, 2019

Could also be related to this correction:
Mobsya/enki@0113f5b
or
Mobsya/enki@6d0a122

@stephanemagnenat
Copy link
Contributor

To add a comment to my private email to @mbonani, my guess is that on recent OS X releases that do not support OpenGL any more, Qt provides a polyfill, and that polyfill is buggy/incomplete, and does not allow to properly read back from the ZBuffer, which is what the picking code needs. The same polyfill might be the cause of crashes mentioned in the bugs above.

@podak podak self-assigned this Jan 23, 2020
@podak
Copy link
Contributor

podak commented Jan 23, 2020

I tested it in macOS 10.15.1 and everything seems to be working correctly

@mbonani
Copy link
Contributor Author

mbonani commented Jan 24, 2020

user confirm that it is happening on 10.15 here is his configuration
image001

@mbonani
Copy link
Contributor Author

mbonani commented Jan 26, 2020

problem with this mac,it will be update to 10.15 this week

Capture d’écran 2020-01-26 à 20 41 04

@KunjanChauhan
Copy link

KunjanChauhan commented Feb 17, 2020

Status agreed at 2020 02 17 meeting:

  • 1. so far unable to find a macine where problem can be duplicated. Currently only seen in two users machines, both machines not accessible to dev teams. Problems is seen on Catalina and MOjave versions of MACOS as well as Intel GPU and AMD Radeon GPUs, so likely a problem from OpenGL
  • 2. Mobsya to try and find a machine that has same problem
  • 3. Davide/Valentina will anlyse codebase

@KunjanChauhan
Copy link

Fanny just tried the simulator on a MacBook Pro A1297 5,2 2009 with Nvidia GeForce 9600MGT version running Mojave v10.14.2 and it works fine!

@mbonani
Copy link
Contributor Author

mbonani commented Feb 18, 2020

works on
Capture d’écran 2020-02-18 à 13 36 28

@mbonani
Copy link
Contributor Author

mbonani commented Feb 18, 2020

works on
Capture d’écran 2020-02-18 à 13 44 00

@riedo
Copy link
Contributor

riedo commented Mar 3, 2020

I can reproduce the bug on my husband's computer. I could possibly use it to test when he doesn't need it - what would we need to do to help with this issue?
Screenshot 2020-03-02 at 23 09 40

@mbonani
Copy link
Contributor Author

mbonani commented Mar 3, 2020

I have alos acces to my wife ones. I have install the compiling tools as explain in the building file.

@mbonani
Copy link
Contributor Author

mbonani commented Mar 8, 2020

works on
Capture d’écran 2020-03-08 à 16 54 58

@mbonani
Copy link
Contributor Author

mbonani commented Mar 9, 2020

Last info
On one of the mac where it was not working, we compile on it and the simulator works normally. We try to reproduce that on the azure system and do not succeed with it. There are some problems:

  • passing from 10.13 to 10.14 was ok keeping xcode 10.1 (clang 10.0.1)
  • Do not compile with xcode 10.3 (clang 10.1)
  • Compile with xcode 11.2.1 (clang 11.0) but simulator do not work

actually on the special mac the build do not go trough every thing

  • before installing xcode (clang 10.1) some error stop compilation for studio (same as azure)
  • installing xcode 11.3.1 and 11.2.1 make compile more thing but linker blocks on TDM

@mbonani
Copy link
Contributor Author

mbonani commented Mar 10, 2020

Finally we found that the problem is because we declare the apps defaults NSHighResolutionCapable in the .plist It seems for retina screen make the simulator not working well. Without declaring it, OsX seems to manage better that. More test are needed to see the impact but probably it will work because before this new packager we never make this add in .plist

@mbonani
Copy link
Contributor Author

mbonani commented Mar 11, 2020

fix in 43f25c2

@mbonani mbonani closed this as completed Mar 11, 2020
@mbonani mbonani reopened this Nov 3, 2021
@mbonani
Copy link
Contributor Author

mbonani commented Nov 3, 2021

Some window user also have this issue if they have big resolution screen and zoom at 200%. Works when they put 100%.
It should be possible to calclutale better coordination.

@mbonani
Copy link
Contributor Author

mbonani commented Nov 26, 2021

probably we have to manage scale calculation like explin here https://vicrucann.github.io/tutorials/osg-qt-high-dpi/

@mbonani
Copy link
Contributor Author

mbonani commented Dec 21, 2021

fixed telling windows that Thymio Suite is DPI Unaware : https://doc.qt.io/qt-5/highdpi.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Simulator
Projects
None yet
Development

No branches or pull requests

6 participants