Custom node: editor crash with VuoList_VuoGenericType1

Hello,
I’ve tried to create simple custom node which replaces element in a list at specified index. But when I built some “clean version” of node (see source below) everything builds OK, w/o errors and warnings, node installs and it’s visible on Vuo Editor Library. But when I try to set data type of input port Vuo Editor crashes. See thie source. Thank You!

EDIT: same crash with VuoGenericType1…

#include "node.h"

VuoModuleMetadata({
                     "title" : "Replace at index",
                     "description" : "Replace item in list at given index.",
                     "keywords" : [ "list", "replace"],
                     "version" : "0.0.1",
					 "node": {
						 "isInterface" : false
					 }
				 });

void nodeEvent
(
        VuoInputData(VuoList_VuoGenericType1) list,
        VuoOutputData(VuoList_VuoGenericType1) modifiedList
)
{
    *modifiedList = list;
}

When you implement a node class with generic port types, you have to package the compiled node class and its source code into a node set. The reason you have to include the source code is so that Vuo can recompile the node class with when it’s used in a composition (e.g. replacing VuoGenericType1 with VuoInteger).

In the API documentation on Developing a Node Class, see the section “Generic port types”. In the Vuo SDK, the “customType” example in the “node” folder demonstrates how to package a node class (along with some additional stuff) into a node set.

(I’ll file an internal bug report that Vuo Editor should give an informative error message instead of crashing.)

Thanks for the answer. But I tried to wrap everything up, and haven’t done it… I understand this rules, but I don’t know exactly how to do it - which parts of example.customType.pro file are needed to build custom type, and which will be needed to generic type. It’d be very cool if you can share some clean generic type example…

Hmm… I cannot create simple statless custom node with generic port type. Could somebody post a clean stateful/statless example like Vuoize in sdk? Thanks!

e.g.
void nodeEvent
(
VuoInputData(VuoGenericType1) in,
VuoOutputData(VuoGenericType1) out
)
{
*out = in;
}

Sure, here’s an example.

example.list_.zip (4.53 KB)