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

Crash on OS X when virtual ports encountered #3

Closed
shanekoss opened this Issue Jun 6, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@shanekoss

shanekoss commented Jun 6, 2018

Great work on this library - it really is amazing.

Having an a crash when virtual ports have been created (either by Max/MSP or with a C++ JUCE application)

The issue seems to be in the _engine._refresh function (line 663)

    _engine._refresh = function() {
      _engine._outs = [];
      _engine._ins = [];
      var i, x;
-->      for (i = 0; (x = **_engine._main.MidiOutInfo(i)**).length; i++) {
        _engine._outs.push({ type: _engine._type, name: x[0], manufacturer: x[1], version: x[2] });
      }
      for (i = 0; (x = _engine._main.MidiInInfo(i)).length; i++) {
        _engine._ins.push({ type: _engine._type, name: x[0], manufacturer: x[1], version: x[2] });
      }

_engine._main.midiOutList() will list the correct ports - including the virtual ones.

However - when the for loop hits a virtual port and _engine._main.MidiOutInfo(i) is called, the program will crash. Happens in node JS with a simple JZZ() call.

const JZZ = require('jzz');

JZZ();

Any ideas?

Thanks!

OSX 10.12.6
Node 8.11.2

On OSX - you can drag this into a terminal window to create some virtual ports:

MM1UtilityAp.zip

@jazz-soft

This comment has been minimized.

Owner

jazz-soft commented Jun 6, 2018

Thank you for letting me know.
The problem seems to be not in JZZ.js, but in Jazz-Plugin/jazz-midi binaries.
I'll investigate it.

@shanekoss

This comment has been minimized.

shanekoss commented Jun 11, 2018

@shanekoss

This comment has been minimized.

shanekoss commented Jun 15, 2018

Checking back on this - if you have any pointers on where to look, I'm happy to help. Thanks!

@jazz-soft

This comment has been minimized.

Owner

jazz-soft commented Jun 15, 2018

Working on it. I'll close this ticket when done :)

@jazz-soft

This comment has been minimized.

Owner

jazz-soft commented Jun 19, 2018

It is fixed in Node.js version: https://www.npmjs.com/package/jazz-midi
Will upload a new Jazz-Plugin installer shortly.

@jazz-soft

This comment has been minimized.

Owner

jazz-soft commented Aug 3, 2018

A new version of Jazz-Plugin is finally available at https://jazz-soft.net/download/Jazz-Plugin/

@jazz-soft jazz-soft closed this Aug 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment