Nninteractive (slicer client) is stuck

It doesn’t pass this stage during the module initialization. This is on ubuntu 24.04

Switch to module: “SlicerNNInteractive”
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject: Cannot create children for a parent that is in a different thread.
(Parent is qSlicerModuleManager(0x3d3c9760), parent’s thread is QThread(0x3b1f83f0), current thread is QThread(0x40e44840)
QObject::startTimer: Timers can only be used with threads started with QThread
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::setParent: Cannot set parent, new parent is in a different thread

Seems to happen on windows too.

Thanks for reporting @muratmaga. Yes, I noticed this too and it’s been investigated. Probably there will be a fix in 5.12.1. @ebrahim do you think that’s possible?

The fix would be in NNInteractive and not in Slicer, right? I’m looking at where the discussion ended in the issue

Will be addressed here: BUG: Avoid threaded pip install with Slicer 5.12 by ebrahimebrahim · Pull Request #100 · coendevente/SlicerNNInteractive · GitHub

This is nice, but given that the author of the extension hasn’t interacted with any of the PRs from the last 3-4 months (including the one @lassoan introduced for self-contained installation), that’s probably not going to get merged anytime soon.

@ebrahim, since the extension worked in 5.10, and then crashes 5.12 I think this is a Slicer regression and we should somehow make it failsafe. We don’t know who else might have depended on this older behavior.

@muratmaga FYI, the DKFZ team behind nnInteractive contacted me and @lassoan that that will be making an updated SlicerNNInteractive extension available but it’s not ready yet. This will support a new version with improved features. So things are in flux for a while.

It’s more of an API change than a regression.

5.10 to 5.12 API change is acceptable, the extension has to be updated to adapt. If the extension is abandoned by the original author and we still want it in 5.12, then we can fork it. But I feel it’s too early to call it abandoned.

When we were putting together slicer.packaging we had to make a choice as to whether the progress bar is given to everyone using pip_install by default or whether it’s opt-in. In one case many extensions get automatic benefit while a few extensions need to be updated, and in the other case only extensions that update to explicitly invoke the new functionality get the benefit. Andras and I thought about this and opted for the first one.

Hmm… on more thought I suppose a failsafe within Slicer is easy

But this would not be us fixing a regression. This would be us being nice, which I guess we should be :neutral_face:

I think I can get a failsafe out soon