Yet another installation problem: request for troubleshooting ideas

Matlab R2020b
MacOS 10.15.7
PTB version 3.0.16
SetupPsychtoolbox seems to have worked fine. Screen seems to work fine. AssertOpenGL doesn’t return any errors. DriftDemo, however, doesn’t work. Unfortunately, this user has no access to a peripheral monitor; she’s trying to run DriftDemo on an iMac. When running DriftDemo, she sees the The Welcome to Psychtoolbox message, but then the display crashes. She can type, but she hears a low-frequency beep each time she presses a key. ctrl-C sca return does nothing. Any ideas for troubleshooting? Let me know. Many thanks.

Hi, for me to look into this question, i’d need you to buy a community membership with priority support. Infos about it can be found here:

Other than that, the only free advise from myself is to upgrade to Psychtoolbox 3.0.17 and retry, as v3.0.16 has reached end of life and is no longer supported.

-mario

I’m a member!
16654071-2020127163541:e36087df24a970adee15a9c490362a7f6bfb66e09707e305ad78b393f9dadf2b
Any ideas for troubleshooting?

Welcome 1st real-world user of the priority support mechanism :1st_place_medal: !

Hmm, i can’t find a OrderId 16654071? Did you enter the invoice number or customer number? On the invoice it looks, e.g., like this:

Invoice no: 15916780
Order no: JS42UFYJ <<<<<--------
Customer no: B12985986

You’d need the “Order no” or “Order Id”.
-mario

Trying again
4ZMAYM5T-20201285569:275f1955729a32b3376b6ada2124a9f013654e59708ed66a0e1887a570cfa708

Ok, this authentication code works. Thanks.

So i tested the same workflow that you tried and ended up in the same situation - actually it failed a bit earlier, refusing to run Screen.mexmaci64, because “It comes from an unidentified developer…” blah blah, as a mostly unhelpful macOS security popup told me. What i guess happened, is this:

  1. User download zip file, unzips, runs SetupPsychtoolbox.
  2. SetupPsychtoolbox triggers the security popup wrt. Screen and somehow user manages to resolve the situation, maye with enough Googling. Screen works now.
  3. User runs DriftDemo. DriftDemo opens the onscreen window, welcome message and all.
  4. DriftDemo calls Priority() to raise realtime priority, which in turn calls our helper mex files for Priority.
  5. macOS decides NO and pops up a dialog box telling you that it won’t allow those mex files to run.
  6. The security dialog box is hidden behind the open onscreen window, because macOS UI is too dumb to deal with this situation.
  7. User sits in front of a frozen Screen, and that invisible dialog box also prevents any meaningful keyboard input to at least get the Matlab command window back.
  8. Game over.

It all boils down to the download method you used and ultimately is again Apples fault, due to their shitty beyond belief security workflow which was made substantially worse in Catalina. It’s ironic that they made fun of Microsoft when they introduced bad security UI in Windows Vista, Apple even broadcast “I’m a Mac and I’m a PC” tv commercials mocking MS, but then produced a massively worse UI experience for their own users with Catalina and later!

From what i heard, macOS 11 Big Sur may be even more user and developer hostile, but so far no testing was performed by us with macOS 11 and this OS is not officially supported at all. In fact, i don’t have a machine on which i could safely install and test it.

So what to do:

  1. My recommendation is to use the regular DownloadPsychtoolbox/UpdatePsychtoolbox method of installing Psychtoolbox 3.0.17, which was developed and tested on macOS 10.15.7 Catalina and should not cause problems with macOS Catalina’s misdesigned security mechanisms. Version 3.0.17 has a substantially improved DownloadPsychtoolbox/UpdatePsychtoolbox which should make life easier especially for macOS users, which had a more difficult time again due to Apples actively user and developers hostile measures around Subversion. They did extra work to make the svn / Subversion experience miserable for macOS users.

As you can see on http://psychtoolbox.org/download.html#Mac

Step 1 of downloading and installing Subversion can now be skipped and one only needs to download and run a fresh DownloadPsychtoolbox.m file and run it. And optionally install GStreamer as explained there for multi-media functionality and improved text drawing.

or

  1. If you want to stick to a zip file download of PTB 3.0.16 + SetupPsychtoolbox, you could execute the following commands from a terminal window while you are in the Psychtoolbox main folder:

xattr -d com.apple.quarantine PsychBasic/*.mexmaci64
xattr -d com.apple.quarantine PsychBasic/PsychPlugins/*.dylib
xattr -d com.apple.quarantine PsychHardware/iViewXToolbox/tcp_udp_ip/pnet.mexmaci64

Then Apples trainwreck should let you run the mex files in peace. I will add these commands to future PTB Beta releases of version 3.0.17 and later, so SetupPsychtoolbox for downloaded zip files would take care of these Apple macOS deficiencies. Thanks for contributing money to enable this improvement!

One debugging tip: If you type PsychDebugWindowConfiguration on a single monitor setup, then the Psychtoolbox window will display half-transparent. Great for single-monitor debugging, but bad for visual stimulation timing, so don’t use for timing-sensitive experiments! With that command, you can see the security dialog popping up, click its “Cancel” button and have a way out in similar future scenarios.

Let me know if this resolves this specific problem.

Btw. as a remark: The work time for diagnosing this was over 1:45 hours and will exceed 2 hours, once suitable fixes have been applied. Dealing with Apple macOS induced issues has always been one of the biggest time sinks.

Normally this would have used up all your priority support incidents, because the rules are up to 3 incidents within a year or a maximum of 1 work hour. Because you are the first user ever :1st_place_medal: filing a priority support request, and under the first 17 users who decided to support Psychtoolbox development financially by this method, as a little welcome gift, we will only account 30 minutes of work time, so you have up to two more questions for a total of maximum 30 minutes work time left.

Thanks,
-mario

thanks for this. i will provide further feedback if/when the user in question ever gets back to me. (so far i’ve recorded successful installations from 73 undergrads, many of whom seem to have had very little experience with technology prior to lockdown!)

Student sez: SUCCESS!
Thanks, Mario

Hi Mario
I’ve got nearly an 70% success rate with my students. One of the remaining 30% reports this problem with the new DownloadPsychtoolbox. (She’s got a MacBook Pro, running Catalina version 10.15.7 and MATLAB 2020b):

DownloadPsychtoolbox
DownloadPsychtoolbox(‘/Applications’,‘beta’,‘’, 0)
Requested flavor is: beta
Requested location for the Psychtoolbox folder is inside: /Applications
Using optimal client for subversion checkout.

Good. Your privileges suffice for the requested installation into folder /Applications.

Hmm. You already have an old Psychtoolbox folder:
/Applications/Psychtoolbox
That old Psychtoolbox should be removed before we install a new one.
First we remove all references to "Psychtoolbox" from the MATLAB / OCTAVE path.
Success.
Shall I delete the old Psychtoolbox folder and all its contents 
(recommended in most cases), (yes or no)? yes
Now we delete "Psychtoolbox" itself.
Success.

I will now download the latest Psychtoolbox for OSX.
Requested flavor is: beta
Target folder for installation: /Applications
Downloading via Matlabs integrated SVNKit: This can take multiple minutes.
There may be no output to this window to indicate progress until the download is complete.
Please be patient ...
Error using DownloadPsychtoolbox>svndownload (line 794)
Java exception occurred:
org.tmatesoft.svn.core.SVNException: svn: E175002: SSL peer shut down incorrectly
svn: E175002: REPORT request failed on '/Psychtoolbox-3/Psychtoolbox-3/!svn/vcc/default'
                at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:112)
                at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:96)
                at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:765)
                at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352)
                at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340)
                at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:910)
                at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:363)
                at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1356)
                at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:854)
                at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:263)
                at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:115)
                at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.checkout(SvnNgAbstractUpdate.java:877)
                at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:26)
                at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:11)
                at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
                at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
                at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
                at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
                at org.tmatesoft.svn.core.wc.SVNUpdateClient.doCheckout(SVNUpdateClient.java:777)
Caused by: javax.net.ssl.SSLException: SSL peer shut down incorrectly
                at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:596)
                at sun.security.ssl.InputRecord.read(InputRecord.java:532)
                at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
                at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)
                at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
                at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
                at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
                at org.tmatesoft.svn.core.internal.util.ChunkedInputStream.readCRLF(ChunkedInputStream.java:85)
                at org.tmatesoft.svn.core.internal.util.ChunkedInputStream.nextChunk(ChunkedInputStream.java:95)
                at org.tmatesoft.svn.core.internal.util.ChunkedInputStream.read(ChunkedInputStream.java:69)
                at org.tmatesoft.svn.core.internal.util.SVNLogInputStream.read(SVNLogInputStream.java:55)
                at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
                at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
                at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
                at java.io.InputStreamReader.read(InputStreamReader.java:184)
                at org.tmatesoft.svn.core.internal.io.dav.http.XMLReader.read(XMLReader.java:39)
                at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
                at org.apache.xerces.impl.XMLEntityScanner.skipChar(Unknown Source)
                at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
                at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
                at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
                at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:898)
                at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:863)
                at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:220)
                at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:451)
                ... 16 more

Error in DownloadPsychtoolbox (line 707)
svndownload(targetRevision, dflavor, p, downloadmethod);

Hi,

how high the success rate and future job satisfaction could be if the students would use Linux! I know this is not an option for your own lab, for very sad reasons out of your control, but i doubt anybody can forbid the students to use the best tool for the job on their own laptops or computers.
Or at least use Windows, which as meager as it is, is still a huge step up from Apple products.

So after quite a bit of research on the internet, the error message svn: E175002: SSL peer shut down incorrectly
seems to mean that the GitHub server timed out during the request, because the download took to long somehow. So this is probably a temporary problem due to overloaded GitHub servers or slow network connection or such.

I guess the proper resolution would be to retry a couple of times. They could also answer the question Shall I delete the old Psychtoolbox folder and all its contents (recommended in most cases), (yes or no)? with a no to get it in small pieces per try instead of starting over from scratch.

The latest beta has received quite a bit of slimming down btw., so download sizes should be considerably smaller in the future, easing such problems if they happen.

If that would not work, the student could try using the old svn client, which probably is already installed on their machine, given a Psychtoolbox was previously installed, although i doubt it would make a difference:

DownloadPsychtoolbox([], [], [], -1);

Or download the zip file and use SetupPsychtoolbox to sidestep such issues. This will lose the advantage of fast future updates with UpdatePsychtoolbox though. I intend to release a new PTB beta which will contain improvements to SetupPsychtoolbox to make it work reliably on macOS Catalina, based on your previous support request, so SetupPsychtoolbox should be an option again for the less fortunate people who have to deal with Apples broken operating systems. If the student chooses to try that, they should wait until the next beta is announced on the user forum sometime later this weekend.

Also, advise them to not “upgrade” to macOS 11, as that system is completely untested and unsupported with the current Psychtoolbox so far. I don’t expect to test that soon, as i don’t have any suitable test machine that is disposable enough to risk installing macOS 11 which seems to be as bad and troublesome as Catalina was for most of its lifetime, from what i read on the internet so far. Some machines seem to get turned into dead chunks of metal if one tries to upgrade, so this is a high risk to do.

Please note that this support request, at 50 minutes work time, has used up your remaining contingent of priority support. For further requests you’d need to buy another “priority support” license key.

-mario