@evgenykochetkov I see the same behavior on the latest dev version. But 0.22.0 refuses to open the xodball at all. It shows a gray screen with an error in the console:
Uncaught TypeError: Cannot read property 'length' of undefined
at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:11447:49
at args.(anonymous function) (file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:90997:27)
at _map (file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:28829:19)
at map (file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:4199:14)
at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:2023:15
at f2 (file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:396:16)
at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:91001:15
at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:28814:27
at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:9495:49
at file:///home/nailxx/devel/xod-latest/packages/xod-client-electron/src-babel/bundle.js:11444:41
The crash is in
var upsertDeadPins = exports.upsertDeadPins = (0, _types.def)('upsertDeadPins :: Node -> Patch -> Map PinKey Pin -> Map PinKey Pin', function (node, currentPatch, pins) {
var nodeId = Node.getNodeId(node);
var pinsByDir = R.compose(R.groupBy(Pin.getPinDirection), R.values)(pins);
var rejectNondeadLinks = R.reject(R.either(R.both(Link.isLinkInputNodeIdEquals(nodeId), R.pipe(Link.getLinkInputPinKey, R.has(R.__, pins))), R.both(Link.isLinkOutputNodeIdEquals(nodeId), R.pipe(Link.getLinkOutputPinKey, R.has(R.__, pins)))));
return R.compose(R.merge(pins), R.indexBy(Pin.getPinKey), R.unless(R.isEmpty, R.compose(R.map(R.apply(Pin.createDeadPin)), R.unnest, R.values, R.mapObjIndexed(function (group, direction) {
return (0, _xodFuncTools.mapIndexed)(
// Adds a correct order as a third element of each Array
function (data, idx) {
return R.append(idx + pinsByDir[direction].length, data);
}, group);
}), R.groupBy(R.nth(1)), R.map(R.ifElse(Link.isLinkInputNodeIdEquals(nodeId), function (link) {
return [Link.getLinkInputPinKey(link), CONST.PIN_DIRECTION.INPUT];
}, function (link) {
return [Link.getLinkOutputPinKey(link), CONST.PIN_DIRECTION.OUTPUT];
})))), rejectNondeadLinks, listLinksByNode)(nodeId, currentPatch);
});
Looks like it was fixed in https://github.com/xodio/xod/pull/1399
@magic-mallet Do you ever see the same picture? I mean, do you have a red input pin above the constant node? Can you attach a screenshot of what you see on the patch?