Problem using RegisterOutgoingMRMLNode in Slicer 4.10

Hi Community,

I would again need some help with an issue I have with Slicer 4.10. I want to register an outgoing node for to an OpenIGTLink Connection (Server). The node is of type “vtkMRMLTextNode”. As soon as I call RegisterOutgoingMRMLNode the application freezes and then crashes.
The same code works properly with Slicer 4.8. I found out that if I instead use a “vtkMRMLLinearTransformNode” the code runs fine with Slicer 4.10 as well. But thats not what we need.
Any ideas what could be wrong or why we cannot use the TextNode anymore? Here a small code snipped which leads to the crash:

connector_node = slicer.vtkMRMLIGTLConnectorNode()
connector_node.SetTypeServer(18946)
connector_node.SetName("DeviceNodeName")
slicer.mrmlScene.AddNode(connector_node)

tnode = slicer.vtkMRMLTextNode()
tnode.SetName("MessageTextNode")
slicer.mrmlScene.AddNode(tnode)
connector_node.RegisterOutgoingMRMLNode(tnode)

I also tried starting the connector node before registering but this did not help.

Thanks for any hints on how to correctly use this.

Are you able to use a debugger to get a stack trace? This sounds like memory corruption of some kind.

Unfortunately not. I can debug into the Python code but can’t debug into the Slicer sources. I just downloaded the Slicer Release version without any source code or PDB files on I could attach a debugger.
I also don’t get any exceptions on Python. Slicer crashes silently with the message “The Program has stopped working”.
Is there an easy way to get a stack trace up and running? I once tried to compile Slicer on my own but had no luck because of the many dependencies.

I’m hoping one of the OpenIGTLink developers can replicate the crash in a developer build. Let’s see if someone chimes in.

I could reproduce the crash by adding a new node by calling slicer.mrmlScene.AddNewNodeByClass("vtkMRMLTextNode") then adding it as an outgoing node. @Sunderlandkyl could you please check?

1 Like

I found the problem (uninitialized char* is treated as a string). In the process of investigating, I’ve also found that outgoing nodes are not being registered/observed correctly.

I have a fix for the first issue, and I hope to have the second issue fixed shortly.

1 Like

Wow, that was a quick one! The support in this community is really great by the way!

Will there be a new release soon with the fix? I was hoping that Slicer 4.10.2 will be release some day. I am also hoping for a fix for this issue:
https://issues.slicer.org/view.php?id=4634

Thanks again for the great support.

The SlicerOpenIGTLink fix should be available in the next nightly (edit: and stable) build tomorrow (~8am EST).
You can check for the update in the extension manager.

Does this mean I need to install the nightly build version?
Or can I use the stable release and find it in the extension manager as well? Probably I will need to switch to the nightly, right?

Thanks.

It should be available in both the stable and nightly versions.

1 Like