[Paraview-developers] PVSM state file reader

Chiranjib Sur sur.chiranjib at gmail.com
Wed Jul 13 02:43:44 EDT 2016


HI Utkarsh,
I am revisiting again this part now.
Any clue about how to build the pqServerManagerModel from
pqApplicationCore? I still have the seg fault problem.

Thanks,
Chiranjib

On Thu, Jun 23, 2016 at 10:40 PM, Chiranjib Sur <sur.chiranjib at gmail.com>
wrote:

> Hi Utkarsh,
> Still something I am missing, but I can't figure out what is it.
>
> Following is my intention:
>
>
> 1. (From my C++ application) Load an external .pvsm file --> Scan through
> all the objects in the pipeline (this part works in PV GUI extension).
>
> 2. instead of using the pqLoadStateReaction can I directly load the file
> like this :
>
>    std::string pvsm_file = "myOwn.pvsm";
>    QString qstr = QString::fromStdString(pvsm_file); // converts
> std:;string to QString
>
>       pqApplicationCore*    core =  pqApplicationCore::instance();
>    pqServer* server;
>    vtkSMStateLoader* loader;
>    core->loadState( pvsm_file.c_str(), server, loader);
>
>
> If I do that, the program operated normally (no seg fault), but I can't
> build the servermanager model using the pqApplicationcore, the program
> give me a seg fault if  I do
>
> pqServerManagerModel* sm = core->getServerManagerModel();
>
> 3. I need this pqServerManagerModel to use it later for scanning through
> the pipeline of objects as I see them in PV.
>
> Any help?
>
> Thanks,
> Chiranjib
>
> On Mon, Jun 20, 2016 at 7:22 PM, Utkarsh Ayachit <
> utkarsh.ayachit at kitware.com> wrote:
>
>> > The code compiles (all the necessary headers are taken care of) but I
>> get a
>> > seg fault during run time.
>>
>> Hard to say why. Debugger is really your friend. If you haven't
>> already, I'd suggesting doing a debug build of ParaView and seeing
>> what's going on.
>>
>> > Is there any place where I can see some examples on that.
>> pqLoadStateReaction is the example of how to load a state. That's the
>> code ParaView uses when you click "Load State" from the File menu.
>>
>> > I am familiar with step 2 by which I can scan the paraview pipeline and
>> get
>> > the information all object proxies. At this stage I am not able to
>> figure
>> > out how to link between step 1 and step 2.
>>
>> Just step through the code in pqLoadStateReaction.
>>
>> pqLoadStateReaction::loadState() --> pqApplicationCore::loadState()
>> --> vtkSMSessionProxyManager::LoadXMLState() --> vtkSMStateLoader.
>>
>> Utkarsh
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160713/f6fde44f/attachment-0001.html>


More information about the Paraview-developers mailing list