Screen : "Invalid MEX-file ....."

Hello !

I am trying to run psychotoolbox on Mac OS 10.13.6 and Matlab_R2017_b.

When I run SetupPsychtoolbox I get this error :


The returned error message by Matlab/Octave was:

Last Error: Invalid MEX-file '/Applications/Psychtoolbox/PsychBasic/Screen.mexmaci64': dlopen(/Applications/Psychtoolbox/PsychBasic/Screen.mexmaci64, 6): Library not loaded: /Users/matt/Projects/cerbero-1.14/build/dist/darwin_x86_64/lib/libffi.7.dylib

  Referenced from: /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstreamer-1.0.0.dylib

  Reason: image not found. (MATLAB:mex:ErrInvalidMEXFile)

    /Applications/Psychtoolbox/PsychOneliners/AssertOpenGL.m,99

    /Applications/Psychtoolbox/PsychtoolboxPostInstallRoutine.m,613

    /Applications/Psychtoolbox/SetupPsychtoolbox.m,262



When I type 'Screen' in the command window I get  the same error message.


I tried to disable the System Integrity Protection. I also uninstalled reinstalled Psychotoolbox after . I ran PsychtoolboxVersion after reinstallation and got :


    '3.0.14 - Flavor: beta - Corresponds to SVN Revision 8616

     For more info visit:

     https://github.com/Psychtoolbox-3/Psychtoolbox-3'



Did anyone get the same problem and would know how to solve it ?


Best,


Claire



 

Hi Claire,

could be you are hitting this GStreamer for macOS bug: https://bugzilla.gnome.org/show_bug.cgi?id=796447
What version of GStreamer did you install? Does it happen with the latest version 1.14.2? Or the earlier version 1.14.0?

It's strange that it would cause load failure at all though, as GStreamer is set up to be an optional component for Screen on macOS. It is supposed to only get loaded when one wants to play movies. Then of course nobody knows if Apple didn't screw up something in the 10.13 linker, i don't have 10.13 for regular testing.

mario



On Wed, Sep 5, 2018 at 2:00 AM claire.poullias@... [PSYCHTOOLBOX] <PSYCHTOOLBOX@yahoogroups.com> wrote:

Hello !

I am trying to run psychotoolbox on Mac OS 10.13.6 and Matlab_R2017_b.

When I run SetupPsychtoolbox I get this error :


The returned error message by Matlab/Octave was:

Last Error: Invalid MEX-file '/Applications/Psychtoolbox/PsychBasic/Screen.mexmaci64': dlopen(/Applications/Psychtoolbox/PsychBasic/Screen.mexmaci64, 6): Library not loaded: /Users/matt/Projects/cerbero-1.14/build/dist/darwin_x86_64/lib/libffi.7.dylib

Referenced from: /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstreamer-1.0.0.dylib

Reason: image not found. (MATLAB:mex:ErrInvalidMEXFile)

/Applications/Psychtoolbox/PsychOneliners/AssertOpenGL.m,99

/Applications/Psychtoolbox/PsychtoolboxPostInstallRoutine.m,613

/Applications/Psychtoolbox/SetupPsychtoolbox.m,262



When I type 'Screen' in the command window I get the same error message.


I tried to disable the System Integrity Protection. I also uninstalled reinstalled Psychotoolbox after . I ran PsychtoolboxVersion after reinstallation and got :


'3.0.14 - Flavor: beta - Corresponds to SVN Revision 8616

For more info visit:

https://github.com/Psychtoolbox-3/Psychtoolbox-3'



Did anyone get the same problem and would know how to solve it ?


Best,


Claire



Hi Mario !
I've installed the  1.14.2 version. So it should be fixed ><.
I mean the GSstreamer version I had installed before installing Psychtoolbox was the 1.14.2. So, according to them the bug should have been fixed.

Best,

Claire
Dear mario,


when I type type "ls /Library/Frameworks/GStreamer.framework/Libraries/libffi*" in a terminal window, I  get :

/Library/Frameworks/GStreamer.framework/Libraries/libffi.7.dylib

/Library/Frameworks/GStreamer.framework/Libraries/libffi.a

/Library/Frameworks/GStreamer.framework/Libraries/libffi.dylib

/Library/Frameworks/GStreamer.framework/Libraries/libffi.la


/Library/Frameworks/GStreamer.framework/Libraries/libffi-3.99999:

include


typing  "/Library/Frameworks/GStreamer.framework/Commands/gst-inspect-1.0" gives me :
 

dyld: Library not loaded: /Users/matt/Projects/cerbero-1.14/build/dist/darwin_x86_64/lib/libffi.7.dylib

  Referenced from: /Library/Frameworks/GStreamer.framework/Commands/gst-inspect-1.0

  Reason: image not found

Abort trap: 6



I also upgraded to the latest version of GStreamer to see if it changed anything  (using Homebrew). Without success unfortunately

Best,

Claire 
claire.poullias@... [PSYCHTOOLBOX] <PSYCHTOOLBOX@yahoogroups.com> wrote:
> Dear mario,
> when I type type "ls /Library/Frameworks/GStreamer.framework/Libraries/libffi*" in a terminal window, I get :
>
> /Library/Frameworks/GStreamer.framework/Libraries/libffi.7.dylib
>
> /Library/Frameworks/GStreamer.framework/Libraries/libffi.a
>
> /Library/Frameworks/GStreamer.framework/Libraries/libffi.dylib
>
> /Library/Frameworks/GStreamer.framework/Libraries/libffi.la
>
>
> /Library/Frameworks/GStreamer.framework/Libraries/libffi-3.99999:
>
> include
>
>
> typing "/Library/Frameworks/GStreamer.framework/Commands/gst-inspect-1.0" gives me :
>
>
> dyld: Library not loaded: /Users/matt/Projects/cerbero-1.14/build/dist/darwin_x86_64/lib/libffi.7.dylib
>
> Referenced from: /Library/Frameworks/GStreamer.framework/Commands/gst-inspect-1.0
>
> Reason: image not found
>
> Abort trap: 6
>
>
>
> I also upgraded to the latest version of GStreamer to see if it changed anything (using Homebrew). Without success unfortunately
>

This confirms that the library is where it should be, and that this is
not a Psychtoolbox or Matlab induced problem, as it also happens with
a basic commandline invocation of GStreamer. Iow. it is a bug in
GStreamer or a problem with your specific macOS installation.

Strangely there isn't any bug report filed against GStreamer although
it looks like a bug in the GStreamer 1.14 version. A new bugfix
release 1.14.3 has been released only a few days ago. I wonder if you
might have accidentally installed the development package instead of
the runtime package for end-users or something like that? To make
sure, delete the current GStreamer installation and then download and
install exactly the file from the link below and see if anything
changes:

https://gstreamer.freedesktop.org/data/pkg/osx/1.14.3/gstreamer-1.0-1.14.3-x86_64.pkg

Other than that i'd try downloading an older version of GStreamer,
maybe from the 1.12 series, or the -- rather old by now -- version
mentioned in "help GStreamer"? If this is not you downloading the
wrong file or a GStreamer 1.14 bug, it would be some bug/damage to
your macOS installation for which the most easy fix might be to wipe
and reinstall macOS.

In general i strongly recommend switching away from macOS for any
serious data collection, but you certainly know that already.
-mario