Build error caused by qSlicerSubjectHierarchyPlotsPlugin

I’m having this error while building Slicer on Linux (Qt5/VTK9, gcc 7.3.0) :

 /home/arc/src/Slicer/Modules/Loadable/Plots/SubjectHierarchyPlugins/qSlicerSubjectHierarchyPlotsPlugin.cxx:306:10: error: cannot convert 'bool' to 'vtkMRMLPlotViewNode*' in return
   return false;

This trivial patch allows the build to complete :

diff --git a/Modules/Loadable/Plots/SubjectHierarchyPlugins/qSlicerSubjectHierarchyPlotsPlugin.cxx b/Modules/Loadable/Plots/SubjectHierarchyPlugins/qSlicerSubjectHierarchyPlotsPlugin.cxx
index 9f9545f0a..559875adb 100644
--- a/Modules/Loadable/Plots/SubjectHierarchyPlugins/qSlicerSubjectHierarchyPlotsPlugin.cxx
+++ b/Modules/Loadable/Plots/SubjectHierarchyPlugins/qSlicerSubjectHierarchyPlotsPlugin.cxx
@@ -303,5 +303,5 @@ vtkMRMLPlotViewNode* qSlicerSubjectHierarchyPlotsPlugin::getPlotViewNode()const
     }
 
   // no valid plot view in current layout
-  return false;
+  return NULL;
 } 

I guess it’s how the compiler equates false and NULL.

[Sorry for the title, the web app wants a complete sentence !. It doesn’t accept : Build error with qSlicerSubjectHierarchyPlotsPlugin , for example]

And when Slicer is launched or the Python interactor is shown, this message is shown :

Failed to import PythonQt.qSlicerPlotsSubjectHierarchyPlugins

I can’t know how does it impact anything.

This is a feature developed with a good intention (make it harder to submit low-quality posts) but it clearly did not work well in this case. The problem was that qSlicerSubjectHierarchyPlotsPlugin word was too long. I have now increased “title max word length” from 30 to 50 and it solved the problem. As it turns out, Discourse is intentionally giving vague error message for titles that it does not like, to force you to think about how to improve the title in general, instead of just making some minimal formal change to make the title acceptable. The mechanism works well in general but in cases like this it is really frustrating. We’ll keep tuning settings based on forum users feedback.

1 Like

Thanks for reporting this, the build error is fixed now.

The subject hierarchy plugin makes plot charts show up in the subject hierarchy tree in Data module.

1 Like