MWorks 0.13 released

May 2, 2024 Posted by Christopher Stawarz

 

MWorks 0.13 is now available for Mac and iPad. Highlights of this release include:

MWorks 0.13 requires a Mac running macOS Monterey (12.0) or later or an iPad running iPadOS 17.0 or later. It was tested on macOS 12, 13, and 14 and iPadOS 17.

For a full list of changes in this release, please see the release notes below.

Core

  • Added Optic Flow Field stimulus

  • Added exit actions. These can be used to perform work in a Task System State after a transition succeeds or to run unconditional shutdown or cleanup code (similar to Python’s try/finally or Swift’s defer).

  • Experiment media files are now sent one at a time from client to server. This eliminates the need for all media files to fit in RAM simultaneously, which was particularly problematic on iPad’s.

Variables

  • Variable notifications and announcement now happen atomically within assignments. This means that a variable’s attached actions cannot execute on more than one thread simultaneously (and therefore cannot interfere or overlap with actions executing on another thread).

  • Element assigments to variables now perform notifications and announce only if the assignment succeeds

  • Resolved an issue where client-side code lookups for experiment-defined variables would continue to succeed after the experiment was unloaded

I/O Devices

Applications

  • Workspace files: Accept JSON5 on input. Sort keys and don’t escape slashes on output.

  • Fixed a potential crash on macOS 14.1

Python and MATLAB Tools

  • Python plugin now embeds Python 3.11 (instead of 3.10)

  • Python tools now require Python 3.8 or later

  • MATLAB tools now require MATLAB R2022a or later

  • MATLAB tools now support both arm64 (Apple silicon) and x86_64 (Intel) processors

Internals/Development

  • Upgraded to new versions of many supporting libraries:

    • boost: 1.81.0 ➞ 1.83.0
    • msgpack: 4.1.1 ➞ 6.1.0
    • numpy: 1.23.3 ➞ 1.26.2
    • openssl: 3.0.7 ➞ 3.1.4
    • python: 3.10.7 ➞ 3.11.3
    • sqlite: 3.40.0 ➞ 3.44.0
    • zeromq: 4.3.4 ➞ 4.3.5
  • Added StateSystem::executeAction. Use a singleton State instance (the “end state”) to indicate that there are no more states to execute. ActionVariableNotification, ScheduledActions, and RenderActions now use StateSystem::executeAction to execute their associated actions. Wait, WaitForCondition, and StimulusDisplayAction no longer have special-case code to handle execution outside of the state system. Action::execute is now pure virtual and private.

  • State::next now tries to return its parent’s next state (instead of the parent itself), in order to avoid an unnecessary invocation of the parent’s action

  • Removed Action::setName and all calls to setName in State subclasses, because any name set that way is overwritten during experiment loading by ComponentRegistry::registerObject (either directly or via ComponentRegistry::registerNewObject)

  • Added ContainerAction. If, Else, IfElse, and While now derive from ContainerAction.

  • Renamed global variable currentState to announceCurrentState

  • Added Swift ClientPluginCoordinator and ClientPluginViewController classes to MWorksCocoa

  • Added ReadWriteVariable class. GlobalVariable and ScopedVariable now inherit from ReadWriteVariable

  • Use SQLite exclusive locking mode when reading MWK2 files

  • Removed OpenALContextManager, LegacySound and its subclasses, alut, and all usage of OpenAL