I encounter a bug with subflows that crashes node-red, but I cannot determine why.
I have only setup the UI elements and pass the msg through.
12 Nov 09:14:10 - [error] TypeError: sendEvent.destination.node.receive is not a function
at Immediate.<anonymous> (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:813:52)
at processImmediate (internal/timers.js:464:21)
nodered.service: Main process exited, code=exited, status=1/FAILURE
As the UI is quite involved, it is not particularly easy to determine where this comes from exactly. I have used non-reserved names (as far as I am aware).
Note I initially used spinners for the number input fields, this would also crash it with range input errors, while they were not even set.
This is the flow/subflow (be warned this will crash node-red)
[{"id":"facea4f5b32f6efc","type":"subflow","name":"Tasmota DisplayText","info":"","category":"","in":[{"x":68,"y":48,"wires":[{"id":"4c581ec6e2bd0003"}]}],"out":[{"x":308,"y":48,"wires":[{"id":"4c581ec6e2bd0003","port":0}]}],"env":[{"name":"posx","type":"num","value":"","ui":{"icon":"font-awesome/fa-arrows-h","label":{"en-US":"Position X"},"type":"input","opts":{"types":["num"]}}},{"name":"posy","type":"num","value":"","ui":{"icon":"font-awesome/fa-arrows-v","label":{"en-US":"Position Y"},"type":"input","opts":{"types":["num"]}}},{"name":"fgColor","type":"str","value":"65535","ui":{"icon":"font-awesome/fa-adjust","label":{"en-US":"fgColor"},"type":"select","opts":{"opts":[{"l":{"en-US":"Black"},"v":"0"},{"l":{"en-US":"White"},"v":"65535"},{"l":{"en-US":"Light Grey"},"v":"50712"},{"l":{"en-US":"Dark Grey"},"v":"31727"},{"l":{"en-US":"Red"},"v":"63488"},{"l":{"en-US":"Yellow"},"v":"65504"},{"l":{"en-US":"Green/Yellow"},"v":"45029"},{"l":{"en-US":"Green"},"v":"2016"},{"l":{"en-US":"Green Dark"},"v":"992"},{"l":{"en-US":"Orange"},"v":"64800"},{"l":{"en-US":"Blue"},"v":"31"},{"l":{"en-US":"Navy"},"v":"15"},{"l":{"en-US":"Cyan"},"v":"2047"},{"l":{"en-US":"Cyan Dark"},"v":"1007"},{"l":{"en-US":"Maroon"},"v":"30720"},{"l":{"en-US":"Purple"},"v":"30735"},{"l":{"en-US":"Olive"},"v":"31712"},{"l":{"en-US":"Magenta"},"v":"63519"},{"l":{"en-US":"Pink"},"v":"64536"}]}}},{"name":"bgColor","type":"str","value":"0","ui":{"icon":"font-awesome/fa-adjust","label":{"en-US":"bgColor"},"type":"select","opts":{"opts":[{"l":{"en-US":"Black"},"v":"0"},{"l":{"en-US":"White"},"v":"65535"},{"l":{"en-US":"Light Grey"},"v":"50712"},{"l":{"en-US":"Dark Grey"},"v":"31727"},{"l":{"en-US":"Red"},"v":"63488"},{"l":{"en-US":"Yellow"},"v":"65504"},{"l":{"en-US":"Green/Yellow"},"v":"45029"},{"l":{"en-US":"Green"},"v":"2016"},{"l":{"en-US":"Green Dark"},"v":"992"},{"l":{"en-US":"Orange"},"v":"64800"},{"l":{"en-US":"Blue"},"v":"31"},{"l":{"en-US":"Navy"},"v":"15"},{"l":{"en-US":"Cyan"},"v":"2047"},{"l":{"en-US":"Cyan Dark"},"v":"1007"},{"l":{"en-US":"Maroon"},"v":"30720"},{"l":{"en-US":"Purple"},"v":"30735"},{"l":{"en-US":"Olive"},"v":"31712"},{"l":{"en-US":"Magenta"},"v":"63519"},{"l":{"en-US":"Pink"},"v":"64536"}]}}},{"name":"font","type":"str","value":"1","ui":{"label":{"en-US":"Font"},"type":"select","opts":{"opts":[{"l":{"en-US":"8px"},"v":"3"},{"l":{"en-US":"12px"},"v":"1"},{"l":{"en-US":"24px"},"v":"2"},{"l":{"en-US":"GFX"},"v":"0"},{"l":{"en-US":"RA8876"},"v":"7"},{"l":{"en-US":"Segmented"},"v":"4"},{"l":{"en-US":"Ram Based"},"v":"5"}]}}},{"name":"scale","type":"num","value":"","ui":{"label":{"en-US":"Font scale"},"type":"input","opts":{"types":["num"]}}},{"name":"primitive","type":"str","value":"","ui":{"icon":"font-awesome/fa-pencil-square-o","label":{"en-US":"Type"},"type":"select","opts":{"opts":[{"l":{"en-US":"Text"},"v":""},{"l":{"en-US":"Horizontal line"},"v":"h"},{"l":{"en-US":"Vertical line"},"v":"v"},{"l":{"en-US":"Rectangle"},"v":"r"},{"l":{"en-US":"Rectangle Filled"},"v":"R"},{"l":{"en-US":"Rectangle Rounded"},"v":"u"},{"l":{"en-US":"Rectangle Rounded Filled"},"v":"U"},{"l":{"en-US":"Circle"},"v":"k"},{"l":{"en-US":"Circle Filled"},"v":"K"}]}}},{"name":"","type":"str","value":"","ui":{"icon":"font-awesome/fa-question-circle","label":{"en-US":"If rectangle"},"type":"none"}},{"name":"width","type":"num","value":"","ui":{"label":{"en-US":"Width"},"type":"input","opts":{"types":["num"]}}},{"name":"height","type":"num","value":"","ui":{"label":{"en-US":"Height"},"type":"input","opts":{"types":["num"]}}},{"name":"","type":"str","value":"","ui":{"icon":"font-awesome/fa-question-circle","label":{"en-US":"If rounded rectangle or circle:"},"type":"none"}},{"name":"radius","type":"num","value":"","ui":{"label":{"en-US":"Radius"},"type":"input","opts":{"types":["num"]}}},{"name":"","type":"str","value":"","ui":{"icon":"font-awesome/fa-question-circle","label":{"en-US":"If line:"},"type":"none"}},{"name":"linelength","type":"num","value":"","ui":{"label":{"en-US":"Length"},"type":"input","opts":{"types":["num"]}}},{"name":"clearscreen","type":"bool","value":"false","ui":{"label":{"en-US":"Clear Screen"},"type":"checkbox"}}],"meta":{},"color":"#FFCC66","icon":"font-awesome/fa-paint-brush"},{"id":"4c581ec6e2bd0003","type":"function","z":"facea4f5b32f6efc","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":202,"y":120,"wires":[[]]},{"id":"696b40de5581f560","type":"function","z":"facea4f5b32f6efc","name":"","func":"let topic = msg.topic\nlet fg = env.get(\"fgColor\") \nlet bg = env.get(\"bgColor\")\nlet posy = env.get(\"posy\")\nlet posx = env.get(\"posx\")\nlet primitive = env.get(\"primitive\")\nlet font = env.get(\"font\")\nlet scale = env.get(\"scale\")\nlet width = env.get(\"width\")\nlet height = env.get(\"height\")\nlet radius = env.get(\"length\")\nlet clearscreen = env.get(\"clearscreen\")\n\nlet out = \"\"\n\nif (clearscreen) {\n node.send({payload:'[z]',topic:topic})\n}\n\nif(/[uUkK]]/.test(primitive)){\n node.send({payload:\"radius\"})\n}\n\n\n\n\nreturn null //msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":204,"y":168,"wires":[[]]},{"id":"cc83dd083c3c4fd5","type":"subflow:facea4f5b32f6efc","z":"8e22637.94c9ca","name":"","env":[{"name":"fgColor","value":null,"type":"str"},{"name":"bgColor","value":null,"type":"str"}],"x":618,"y":744,"wires":[["d48ce7b971abd067"]]},{"id":"1f255c78169b255c","type":"inject","z":"8e22637.94c9ca","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":444,"y":744,"wires":[["cc83dd083c3c4fd5"]]},{"id":"d48ce7b971abd067","type":"debug","z":"8e22637.94c9ca","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":814,"y":744,"wires":[]}]