ParaView error "Could not locate server on which the source is being added."

@Haocheng_Liu I did eventually find the exact error I ran into with modelbuilder 6; in my case, modelbuilder would start but when the pqBehavior instance was requested or when a reader was created (I can’t recall which), ParaView would complain:

Could not locate the server on which the source is being added.

The error is emitted from pqPipelineModel’s addSource method:

void pqPipelineModel::addSource(pqPipelineSource* source)
  pqServer* server = source->getServer();
  pqPipelineModelDataItem* _parent =
    this->getDataItem(server, &this->Internal->Root, pqPipelineModel::Server);

  if (!_parent)
    qDebug() << "Could not locate server on which the source is being added.";
  // ...

I could not figure out why this error was occurring and when I had TJ nudge Utkarsh about it, his response was that it sounded like a plugin load-order issue. I resolved things by moving code which had been in smtkPVServerExtPlugin into smtkPVServerExt and making smtkPQComponentsExt depend on explicitly depend on smtkPVServerExt (SMTK commit 7019f0bb6a1731a522de7dc8ee25cb58a090eabb…ebc558cbeb0aecf07cb9a4cc61adef246db588e8).

It sounds like you have the same error in SMTK2/CMB5 but the same fix does not directly apply. Perhaps it is a more insidious initialization problem that my changes just pushed out of the way temporarily.

@Bob_Obara Utkarsh narrowed this down in a few minutes. The problem was that the pipeline browser widget is only created in modelbuilder once the cmbPostProcessingModePlugin is loaded, which is after the server is created and the pipeline browser widget was not using the proper constructor (which adds already-active servers) for its pqPipelineModel.

The fix is to use the right constructor in the pqPipelineBrowserWidget, which will mean bumping ParaView forward. We also discussed the issue where SMTK’s custom readers were being skipped, and that may (depending on what we find) also require us to bump ParaView.

Great news! - well I’ve just made changes to ParaView to Support QT 5.11 so we will probably need to bump it any way :slight_smile:

Robert M. O’Bara, MEng.
Assistant Director of Scientific Computing

Kitware Inc.
28 Corporate Drive
Suite 101
Clifton Park, NY 12065

Phone: (518) 881- 4931

Please wait for PV MR 2477 before bumping SMTK’s PV forward.

Hi David, my problem is that PV is able to load CMB’s plugins, however all the proxies associated with them are not registered with PV. As a result, CMB refuses to run since a proxy for model manager is missing.
My gut tells me that I should do similar things somewhere …?

@Haocheng_Liu Can you remind me of the exact error message or failure mode? Are you running paraview or modelbuilder? (You said PV was able to load CMB plugins…)

@dcthomp I’m running Modelbuilder. Though Modelbuilder has loaded needed plugins( Ex ModelBridge_Plugin), it still complains that it cannot create a(“ModelBridge”, “ModelManager”) proxy. Thus ModelBuilder can not run.

ERROR: Failed to create an Model Manager Proxy!

ERROR: Failed to create an Model Manager Proxy!

Segmentation fault (core dumped)

@Haocheng_Liu I would add a breakpoint to ModelBridge_Plugin_Plugin::GetXMLs() to understand how the XML in Source/ModelBridges/smconfigModelBridge.xml is being processed when the plugin is loaded.

1 Like