Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

OpenSesame 3.1.2 for OSX running on Qt5

DanielDaniel Posts: 342
edited August 2016 in OpenSesame

From its first release, We have used the Qt4 library (originally created by Nokia!) to create the interface of OpenSesame, which you all know and love ;) . On the Mac however, this version of the Qt library has never worked optimally. It contained a lot of glitches, of which the most notable one is probably the inconsistent rendering of buttons and other widgets on HiDPI retina screens.

The successor of Qt4, aptly named Qt5, has been released for a while now, but it has always been difficult to package it with OpenSesame, until now! We are proud to say we have finally managed to create an OS X app of OpenSesame which uses Qt5 to build its interface. Qt5 brings a number of improvements. OpenSesame now:

  • works way better on HiDPI or retina displays. Alle widgets are now drawn as they should be.
  • starts up a lot faster. I have't really measured it, but I think the start-up time has shortened by a factor 5 at least.
  • has all the other new modern internals that Qt5 brings along and should therefore provide a more pleasant experience in overall.

You can temporarily find it here. (In the future it will be provided at the regular download locations).

All the people owning Macs could help us out by giving this version a spin and reporting back your (positive and negative) experiences in this thread. If we receive little to no messages describing trouble, we hope to release all next versions of OpenSesame (on the Mac al least) with Qt5.

Thanked by 2sebastiaan Diego
«1

Comments

  • JarikJarik Posts: 140

    Hi Daniel,

    Quickly testing OpenSesame 3.1.2 Qt5 I got no (new) errors. B)

    I just tested if OpenSesame starts and if the Default template runs on all back-ends and it does.

    The xpyriment back-end gives me the X11 error that stays away if I hit cancel (untill I restart OpenSesame).

    Also the xpyriment and legacy back-ends give me Invalid colour specification error after the experiment successfully finishes about 50% of the times.

    So no extensive testing on my (not clean) mid 2009 Macbook Pro running OSX 10.11.6

    Best,
    Jarik

    Thanked by 1Daniel
    X11.png 38.7K
    Color.png 29.3K
  • DanielDaniel Posts: 342

    Hi Jarik. Thanks for doing this!

    Could you maybe also post the stack trace which is probably shown in the debug window with the second, Invalid colour specification error? @sebastiaan, do you maybe have a hunch what this might be and where to look?

    Regarding the X11 error. There is not much we can do about it. Apple switched to its own Window manager about 2 OS X versions ago and some features may still depend on X11, which can be downloaded separately as XQuartz. The only way to stop this error is to install XQuartz. I don't know why expyriment in specific asks for it. @fladd, do you maybe have a clue why expyriment seems to have a dependency of X11, while legacy (also pygame based) doesn't?

    I'm glad it appears to work correctly for the most part.

  • JarikJarik Posts: 140

    Hi Daniel,

    That's the thing. No stack trace/error. Please see the bigger screenshot below that was taken from OpenSesame 3.1.2 Qt4 (the problem was already there) Default template with legacy back-end.

    I wouldn't worry about it to much as at seems to happen after the experiment finishes.

    Another thing I noticed for Qt5 is the change in menu:


    This also means the cmd+Q keyboard shortcut is lost :/

    Thanked by 1sebastiaan
  • sebastiaansebastiaan Posts: 2,456

    Could you maybe also post the stack trace which is probably shown in the debug window with the second, Invalid colour specification error? sebastiaan, do you maybe have a hunch what this might be and where to look?

    This error comes from here:

    My guess is that it comes from webcolors.name_to_hex(), but I'm not sure why it chokes on 'white'. I'm guessing that this error occurs immediately when the experiment is started?

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • JarikJarik Posts: 140

    Just double checked. The error occurs after the experiment finishes. The error timestamp is 1 second after the finished timestamp (and I waited several seconds before hitting any key to finish the default template with xpyriment back-end).

    I get the idea that it only happens after switching back-ends when the experiment was run fullscreen.

    Best,
    Jarik

  • sebastiaansebastiaan Posts: 2,456

    I get the idea that it only happens after switching back-ends when the experiment was run fullscreen.

    Can you provide steps to reliably trigger the error? Or is it more or less random?

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • JarikJarik Posts: 140

    Here are the steps:

    • Freshly installed OSX 10.11 on Macbook Pro Mid 2012
    • Downloaded opensesame_3.1.2-py2.7-qt5-macos-1.dmg
    • Dragged OpenSesame to Application folder
    • Run the Default template fullscreen
    • Click Cancel on X11 message
    • >No error
    • Switched to legacy back-end
    • Run the Default template fullscreen
    • Choose to replace subject-0.csv file
    • >See screenshot error below
  • DanielDaniel Posts: 342

    Hi Jarik, I see that you are running in single process mode, could you check if this also occurs when running in multiprocessing mode (configurable in the preferences) and repeating steps 4 till end again? It's a long shot, but it may have something to do with this problem. I'm just curious if it changes anything.

    Then there's still the problem of the quit option which has disappeared from the OpenSesame menu...

  • JarikJarik Posts: 140

    Yes, it's gone when running in multiprocess mode (and I get it back by running in inprocess again).

    Then there's still the problem of the quit option which has disappeared from the OpenSesame menu...

    This is also not a showstopper in my opinion but it is strange. All applications (also our VU-DAMS program) have the quit option in the 'main menu'.

  • DanielDaniel Posts: 342

    This menu discrepancy is not the result of the packaging process, because I have the same when running OpenSesame from source in the anaconda python environment from which the package is created. If I run OpenSesame using my other Python environment created with Homebrew, all menu items are present at their correct places. I thus think that this is a (hopefully temporary) quirk from the Qt5 package as it is currently provided by Anaconda. It is not officially released yet, so maybe the anaconda crew may fix this in the future.

    As for the color related error. That's interesting. So it is only present if the experiment is run in-process. Maybe it has something to do with the processes which takes place after completion of the experiment, which are different for inprocess and multiprocessing.

  • DanielDaniel Posts: 342

    For completeness: this is the console output I get when starting OpenSesame in the Homebrew environment:

    opensesame
    2016-08-30 20:26:21.488 Python[1810:24297] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/1l/cx9n7qw90xqgl2w5x3r4259m0000gn/T/org.python.python.savedState
    WARNING:root:Message signing is disabled.  This is insecure and not recommended!
    2016-08-30 20:26:23.426 Python[1810:24297] Unable to register font: Error Domain=com.apple.CoreText.CTFontManagerErrorDomain Code=105 "The file has already been registered in the specified scope." UserInfo={NSLocalizedDescription=The file has already been registered in the specified scope., CTFontManagerErrorFontURLs=<CFArray 0x7fea9a8a7fd0 [0x7fff74dea440]>{type = mutable-small, count = 1, values = (
        0 : <CFURL 0x7fea9e0cade0 [0x7fff74dea440]>{string = file:///Users/daniel/Github/OpenSesame/opensesame_resources/mono.ttf, encoding = 134217984, base = (null)}
    )}, NSLocalizedFailureReason=Font registration was unsuccessful.}
    js: Not allowed to load local resource: file:///Users/daniel/Github/OpenSesame/opensesame_resources/theme/default/background.png
    

    and this is what I get when run from the anaconda environment (same as the OS package)

    2016-08-30 20:28:27.536 python[1936:25926] Unable to register font: Error Domain=com.apple.CoreText.CTFontManagerErrorDomain Code=105 "The file has already been registered in the specified scope." UserInfo={NSLocalizedDescription=The file has already been registered in the specified scope., CTFontManagerErrorFontURLs=<CFArray 0x119e01750 [0x7fff74dea440]>{type = mutable-small, count = 1, values = (
        0 : <CFURL 0x119e01f50 [0x7fff74dea440]>{string = file://localhost/Users/daniel/anaconda/envs/opensesame-qt5/lib/python2.7/site-packages/share/opensesame_resources/mono.ttf, encoding = 134217984, base = (null)}
    )}, NSLocalizedFailureReason=Font registration was unsuccessful.}
    Menu item is already in a menu, remove it from the other menu first before inserting
    Menu item is already in a menu, remove it from the other menu first before inserting
    Menu item is already in a menu, remove it from the other menu first before inserting
    Menu item is already in a menu, remove it from the other menu first before inserting
    Menu item is already in a menu, remove it from the other menu first before inserting
    Menu item is already in a menu, remove it from the other menu first before inserting
    js: Not allowed to load local resource: file:///Users/daniel/anaconda/envs/opensesame-qt5/lib/python2.7/site-packages/share/opensesame_resources/theme/default/background.png
    

    So the Menu item is already in a nu, remove it from the other menu first before inserting is the bad omen here which might provide a lead to the source of this problem.

  • JarikJarik Posts: 140

    This menu discrepancy is not the result of the packaging process, because I have the same when running OpenSesame from source in the anaconda python environment from which the package is created. If I run OpenSesame using my other Python environment created with Homebrew, all menu items are present at their correct places. I thus think that this is a (hopefully temporary) quirk from the Qt5 package as it is currently provided by Anaconda. It is not officially released yet, so maybe the anaconda crew may fix this in the future.

    Sounds very plausible indeed because OpenSesame_3.1.0a46-anaconda-osx-1 you provided for testing some time ago has the menu items present at their correct places (and I assume that still uses Qt4).

  • emasesnepoemasesnepo Posts: 9
    edited September 2016

    The text on left palette is not alway correctly shown (MacOS X 10.11 French on MacBook Pro retina and 27" Thunderbolt Display, MacOS X 10.10 French on iMac 21").

    Should I use the forum to report such interface minor problems?

  • DanielDaniel Posts: 342

    Yes, definitely report these problems here (no matter how minor they seem) Thanks! I spotted this quirk too (it also occurs in English), and the Qt5 version has some problems with font rendering in general. We will look into this.

  • Open file dialog not translated (OpenSesame 3.1.2 QT5, MacOS X 10.11 French on MacBook Pro retina).
    Favorites -> Favoris
    Devices -> Appareils
    Shared -> Partagé(s)
    Tag -> Tag
    New Folder -> Nouveau dossier
    Cancer -> Annuler
    Open -> Ouvrir

  • emasesnepoemasesnepo Posts: 9
    edited September 2016

    (MacOS X 10.11 French on MacBook Pro retina)

    Non respect of macOS conventions.
    Missing 'À propos d'OpenSesame…' (About OpenSesame…) item in the "OpenSesame" menu.

  • (MacOS X 10.11 French on MacBook Pro retina)

    Non respect of macOS conventions.
    Menu item "Préférences…" (Preferences) should be in the "OpenSesame" menu. And as the "Préférences" menu command show a dialog, the menu item should be followed by an ellipsis: "Préférences…" instead of "Préférences".

  • (MacOS X 10.11 French on MacBook Pro retina)

    In Preferences dialog, "Apparence" (appearance) text partly hidden.

  • (MacOS X 10.11 French on MacBook Pro retina)

    In Preferences dialog, some fields have their text right aligned instead of left aligned.

  • (MacOS X 10.11 French on MacBook Pro retina)

    In the Preferences dialog, most extension parts are not translated and labels are shown as variable names (underscores instead of spaces, ie. update_checker). I could suggest translations but I don't know if those parts could be translated.

  • I really like the startup speed improvement and generally almost any UI bug is gone. Thanks!!

    Two minor things that I noticed:
    * Opening OpenSesame by double clicking an experiment file does open OpenSesame, but it always comes up with a blank new experiment instead of the file it's supposed to open.
    * The editor toolbar icons on the right seem to be a bit out of their intended positions. See the screenshot.

  • DanielDaniel Posts: 342

    Hi guys, thanks for all your feedback. This is really valuable! I hope to get working on this as soon as possible, but currently I'm engaged in a lot of other stuff. Just to briefly respond to the most general problems you have posted here:

    • Not following Mac conventions of menu item locations
      I think this is a problem with the current qt5 version that is available on Anaconda (the only version I can package). If I run OpenSesame with Homebrew qt5 all the items are present and are where they should be. I don't think we're doing anything incorrectly, but it is the qt5 version used that contains the bugs. Anaconda qt5 is still in its testing phase, so I guess we will have to wait until this is fixed for us, and I hope that will be soon.
    • Open File Dialog not (fully) translated
      That's weird, especially considering the Open File dialog is a system dialog, and this, as far as I know, should always be shown in the primary language of your OS. I do not really know much about how translations are internally done in OpenSesame, but maybe @sebastiaan can shed some more light on this problem?
    • Some text is not rendered correctly or doesn't fit in its reserved space
      Yes, I noticed this one as well. There is a problem with rendering some of the fonts that OS uses, causing them to take up too much space. I don't know if this problem is specific to the font used, or a problem with Qt5 in general, and we'll have to find this out.
    • Opening an experiment by double clicking
      I doubt this is a problem of Qt5, as it does not control the actions of Mac OS when a certain filetype is doubleclicked. Did you also have this problem with qt4? I recall @sebastiaan saying something about a similar problem and having fixed this already, but I'm not sure.
    • Editor toolbar incorrectly rendered
      This was also the case with qt4, and upgrading to qt5 sadly didn't fix this as I'd hoped. We'll have to look into this.

    I hope the general user experience has improved a lot from qt4 to 5.

  • What is the good way to suggest translations? Should I modify the OpenSesame/opensesame_resources/ts/fr_FR.ts file in a github clone and then make a pull request to the main github OpenSesame depot or is there another way to work on translations?

  • DanielDaniel Posts: 342

    Translations are @sebastiaan's department, so I think it's better if he tells you what the best practices are. To me what you are suggesting sounds like the right way to do it though, and I think it will work out that way. Thanks for your willingness to help out in this!

  • sebastiaansebastiaan Posts: 2,456

    @emasesnepo Exactly, that's the way to do it! See also:

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • sebastiaansebastiaan Posts: 2,456

    @dschreij

    Opening an experiment by double clicking I doubt this is a problem of Qt5, as it does not control the actions of Mac OS when a certain filetype is doubleclicked. Did you also have this problem with qt4? I recall @sebastiaan saying something about a similar problem and having fixed this already, but I'm not sure.

    That was a problem with the Windows launcher, which is only used on Windows. The symptoms were indeed the same, but the cause was different.

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • I don't know but I did not face any of these problems at all. But by the way is it just me or OpenSesame changed my icons and many text files default apps as OpenSesame? Just for illustration - it changed icon on Insurgence game at steam.

    But anyway, so much thanks to all of you Qt5 is soooo way better - quicker and nicer.

    Best wishes,
    Michael Tesar
    neurosciencemike.wordpress.com

  • @neuropacabra I have exactly the same problem. Many apps icons, or icons related to files without extension just lost their original icon and got substituted with the big white O on blue background.

    Does anyone know how to fix this? Changing back all the icons is not fun!

  • DanielDaniel Posts: 342

    A simple uninstall of the OpenSesame qt5.app should fix the icon problem. I can reproduce it here (as in, my icons have all gone haywire too), so I'm going to try fixing it soon. Probably it is an invalid entry in the Info.plist file that is encapsulated in the app.

    Thanked by 1sebastiaan
  • Thanks @Daniel for the suggestion.
    The icon mess is not only related to the qt5 version. I had the same problem with the last version with qt4. Uninstalling the app (and restarting the machine) fixes the problem partially. I'm even using AppCleaner that supposedly should do even a better job.
    Some of the icons go back to normal, but other just stays as they are. Moreover, when the icon goes back to normal, still the opensesame icon is present in the path bar at the bottom of the screen (see screenshot).
    thanks for looking into this problem.

Sign In or Register to comment.