<div dir="ltr">Is the goal to get all the proxy that compose the pipeline browser?<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 6, 2015 at 3:48 PM, houssen <span dir="ltr"><<a href="mailto:houssen@ipgp.fr" target="_blank">houssen@ipgp.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here is a code snippet from myExporter.cpp : crash occurs at line 125 (according to stack below)<br>
105 vtkSMProxyManager * pProxyMgr = vtkSMProxyManager::GetProxyManager ();<br>
106 if ( pProxyMgr )<br>
107 {<br>
108 vtkSMSession * pSession = pProxyMgr -> GetActiveSession ();<br>
109 if ( pSession )<br>
110 {<br>
111 msg << "\n get session";<br>
112 vtkSMSessionProxyManager * pProxyMgr = pSession -> GetSessionProxyManager ();<br>
113 if ( pProxyMgr )<br>
114 {<br>
115 msg << "\n get proxy mgr";<br>
116 vtkSmartPointer<vtkSMProxyIterator> spProxyIterator = vtkSmartPointer<vtkSMProxyIterator>::New();<br>
117 spProxyIterator -> SetSessionProxyManager ( pProxyMgr );<br>
118 spProxyIterator -> SetSession ( pSession );<br>
119 spProxyIterator -> Begin ();<br>
120 vtkSMProxy * pProxy = spProxyIterator -> GetProxy();<br>
121 msg << "\nProxy : " << pProxy -> GetClassName ();<br>
122 while ( pProxy )<br>
123 {<br>
124 vtkObjectBase * pObj = pProxy -> GetClientSideObject ();<br>
125 msg << "\n Proxy client obj : " << pObj -> GetClassName ();<br>
126<br>
127 spProxyIterator -> Next ();<br>
128 pProxy = spProxyIterator -> GetProxy();<br>
129 }<br>
130 }<br>
131 }<br>
133 }<br>
<br>
I tried to use GetClientSideObject as I believe it could be a way to finally scan the pipeline browser. I would like to access each pipeline of the pipeline browser from an exporter.<br>
<br>
Franck<div class="HOEnZb"><div class="h5"><br>
<br>
Le 2015-08-06 23:34, houssen a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I get this :<br>
<br>
Program received signal SIGSEGV, Segmentation fault.<br>
0x00007ffff1e3db76 in vtkObjectBase::GetClassName (this=0x0) at<br>
<br>
/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/VTK/Common/Core/vtkObjectBase.cxx:112<br>
112 return this->GetClassNameInternal();<br>
(gdb) l<br>
107 return this->GetClassNameInternal();<br>
108 }<br>
109 #endif<br>
110 const char* vtkObjectBase::GetClassName() const<br>
111 {<br>
112 return this->GetClassNameInternal();<br>
113 }<br>
114<br>
115 int vtkObjectBase::IsTypeOf(const char *name)<br>
116 {<br>
(gdb) bt<br>
#0 0x00007ffff1e3db76 in vtkObjectBase::GetClassName (this=0x0) at<br>
<br>
/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/VTK/Common/Core/vtkObjectBase.cxx:112<br>
#1 0x00007fffc07f0fb4 in slvPrvExporter::WriteData (this=0x57be820)<br>
at /mnt/users/houssen/Documents/myExporter/myExporter.cpp:125<br>
#2 0x00007fffd1db7971 in vtkExporter::Write (this=0x57be820) at<br>
<br>
/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/VTK/IO/Export/vtkExporter.cxx:65<br>
#3 0x00007ffff493bab2 in vtkSMRenderViewExporterProxy::Write<br>
(this=0x4e621f0)<br>
at<br>
<br>
/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/ParaViewCore/ServerManager/Default/vtkSMRenderViewExporterProxy.cxx:58<br>
#4 0x00007ffff7af57c5 in pqExportReaction::exportActiveView (this=0xa9d0e0)<br>
at<br>
<br>
/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/Qt/ApplicationComponents/pqExportReaction.cxx:170<br>
#5 0x00007ffff7b56b1c in pqExportReaction::onTriggered (this=0xa9d0e0)<br>
at<br>
<br>
/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/BUILD/Qt/ApplicationComponents/../../../Qt/ApplicationComponents/pqExportReaction.h:59<br>
#6 0x00007ffff7b5abc6 in pqReaction::qt_static_metacall<br>
(_o=0xa9d0e0, _c=QMetaObject::InvokeMetaMethod, _id=0,<br>
_a=0x7fffffffd120)<br>
at<br>
<br>
/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/BUILD/Qt/ApplicationComponents/moc_pqReaction.cxx:51<br>
#7 0x00007ffff581087a in QMetaObject::activate<br>
(sender=sender@entry=0xa945d0, m=m@entry=0x7ffff67d7de0<br>
<QAction::staticMetaObject>,<br>
local_signal_index=local_signal_index@entry=1,<br>
argv=argv@entry=0x7fffffffd120) at kernel/qobject.cpp:3539<br>
#8 0x00007ffff5d27a62 in QAction::triggered<br>
(this=this@entry=0xa945d0, _t1=false) at<br>
.moc/release-shared/moc_qaction.cpp:276<br>
#9 0x00007ffff5d29433 in QAction::activate<br>
(this=this@entry=0xa945d0, event=event@entry=QAction::Trigger) at<br>
kernel/qaction.cpp:1257<br>
#10 0x00007ffff6157509 in QMenuPrivate::activateCausedStack<br>
(this=this@entry=0x86c610, causedStack=...,<br>
action=action@entry=0xa945d0,<br>
action_e=action_e@entry=QAction::Trigger, self=self@entry=true)<br>
at widgets/qmenu.cpp:1038<br>
#11 0x00007ffff615ba39 in QMenuPrivate::activateAction<br>
(this=0x86c610, action=0xa945d0, action_e=QAction::Trigger,<br>
self=<optimized out>) at widgets/qmenu.cpp:1130<br>
#12 0x00007ffff5d7d51a in QWidget::event (this=this@entry=0x8fa300,<br>
event=event@entry=0x7fffffffd720) at kernel/qwidget.cpp:8376<br>
#13 0x00007ffff615f83b in QMenu::event (this=0x8fa300,<br>
e=0x7fffffffd720) at widgets/qmenu.cpp:2481<br>
#14 0x00007ffff5d2de2c in QApplicationPrivate::notify_helper<br>
(this=this@entry=0x6faae0, receiver=receiver@entry=0x8fa300,<br>
e=e@entry=0x7fffffffd720)<br>
at kernel/qapplication.cpp:4567<br>
#15 0x00007ffff5d345dd in QApplication::notify (this=<optimized out>,<br>
receiver=0x8fa300, e=0x7fffffffd720) at kernel/qapplication.cpp:4110<br>
#16 0x00007ffff57fc4dd in QCoreApplication::notifyInternal<br>
(this=0x7fffffffdea0, receiver=receiver@entry=0x8fa300,<br>
event=event@entry=0x7fffffffd720)<br>
at kernel/qcoreapplication.cpp:953<br>
#17 0x00007ffff5d33d93 in sendEvent (event=<optimized out>,<br>
receiver=<optimized out>) at<br>
../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231<br>
#18 QApplicationPrivate::sendMouseEvent<br>
(receiver=receiver@entry=0x8fa300, event=event@entry=0x7fffffffd720,<br>
alienWidget=alienWidget@entry=0x0,<br>
nativeWidget=nativeWidget@entry=0x8fa300,<br>
buttonDown=buttonDown@entry=0x7ffff6813318 <qt_button_down>,<br>
lastMouseReceiver=..., spontaneous=spontaneous@entry=true)<br>
at kernel/qapplication.cpp:3178<br>
#19 0x00007ffff5da8d1c in QETWidget::translateMouseEvent<br>
(this=this@entry=0x8fa300, event=event@entry=0x7fffffffda70) at<br>
kernel/qapplication_x11.cpp:4568<br>
#20 0x00007ffff5da8289 in QApplication::x11ProcessEvent<br>
(this=0x7fffffffdea0, event=event@entry=0x7fffffffda70) at<br>
kernel/qapplication_x11.cpp:3627<br>
#21 0x00007ffff5dcfb32 in x11EventSourceDispatch (s=0x7014c0,<br>
callback=0x0, user_data=0x0) at<br>
kernel/qguieventdispatcher_glib.cpp:146<br>
#22 0x00007fffebe71e04 in g_main_context_dispatch () from<br>
/lib/x86_64-linux-gnu/libglib-2.0.so.0<br>
#23 0x00007fffebe72048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br>
#24 0x00007fffebe720ec in g_main_context_iteration () from<br>
/lib/x86_64-linux-gnu/libglib-2.0.so.0<br>
#25 0x00007ffff58297a1 in QEventDispatcherGlib::processEvents<br>
(this=0x716010, flags=...) at kernel/qeventdispatcher_glib.cpp:434<br>
#26 0x00007ffff5dcfbe6 in QGuiEventDispatcherGlib::processEvents<br>
(this=<optimized out>, flags=...) at<br>
kernel/qguieventdispatcher_glib.cpp:204<br>
#27 0x00007ffff57fb0af in QEventLoop::processEvents<br>
(this=this@entry=0x7fffffffde40, flags=...) at<br>
kernel/qeventloop.cpp:149<br>
#28 0x00007ffff57fb3a5 in QEventLoop::exec<br>
(this=this@entry=0x7fffffffde40, flags=...) at<br>
kernel/qeventloop.cpp:204<br>
#29 0x00007ffff5800b79 in QCoreApplication::exec () at<br>
kernel/qcoreapplication.cpp:1225<br>
#30 0x00000000004094e6 in main (argc=1, argv=0x7fffffffdfd8) at<br>
<br>
/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/BUILD/Applications/ParaView/paraview_main.cxx:115<br>
<br>
<br>
Le 2015-08-06 23:12, Sebastien Jourdain a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Something else must be wrong. No matter what you should be able to get<br>
the ProxyManager.<br>
<br>
What does the debugger tell you about the cause of the crash?<br>
<br>
Seb<br>
<br>
On Thu, Aug 6, 2015 at 3:08 PM, houssen <<a href="mailto:houssen@ipgp.fr" target="_blank">houssen@ipgp.fr</a> [11]> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Unfortunately, the code crashes when I call<br>
vtkSMProxyManager::GetProxyManager ().<br>
Is there another way ?<br>
<br>
Franck<br>
<br>
Le 2015-08-06 16:32, Sebastien Jourdain a écrit :<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Try that:<br>
<br>
vtkSMProxyManager::GetProxyManager()->GetActiveSession()<br>
<br>
On Thu, Aug 6, 2015 at 2:50 AM, houssen <<a href="mailto:houssen@ipgp.fr" target="_blank">houssen@ipgp.fr</a> [5]<br>
[5]> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
In ParaView, from an exporter plugin, how can I get the active<br>
session ? (= session associated to the plugin in order later<br>
on to<br>
scan over vtkSMProxy)<br>
<br>
Following some code samples found in<br>
/ParaViewCore/ClientServerCore/Rendering, I tried to do :<br>
vtkProcessModule * pProcMgr =<br>
vtkProcessModule::GetProcessModule<br>
();<br>
vtkSMSession * pSession = ( pProcMgr ) ?<br>
vtkSMSession::SafeDownCast ( pProcMgr -> GetActiveSession () )<br>
:<br>
NULL;<br>
I get pProcMgr != NULL but pSession = NULL<br>
<br>
Franck<br>
<br>
PS : I run Ubuntu-14.04 and use ParaView-4.3.1 (built from<br>
source).<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a> [1] [1]<br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a> [2] [2]<br>
<br>
Search the list archives at:<br>
<a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=Paraview-developers</a> [3] [3]<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
[4] [4]<br>
</blockquote>
<br>
Links:<br>
------<br>
[1] <a href="http://www.kitware.com" rel="noreferrer" target="_blank">http://www.kitware.com</a> [6]<br>
[2] <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a> [7]<br>
[3] <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=Paraview-developers</a> [8]<br>
[4]<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
</blockquote>
[9]<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[5] mailto:<a href="mailto:houssen@ipgp.fr" target="_blank">houssen@ipgp.fr</a> [10]<br>
</blockquote></blockquote>
<br>
<br>
<br>
Links:<br>
------<br>
[1] <a href="http://www.kitware.com" rel="noreferrer" target="_blank">http://www.kitware.com</a><br>
[2] <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
[3] <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=Paraview-developers</a><br>
[4] <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
[5] mailto:<a href="mailto:houssen@ipgp.fr" target="_blank">houssen@ipgp.fr</a><br>
[6] <a href="http://www.kitware.com" rel="noreferrer" target="_blank">http://www.kitware.com</a><br>
[7] <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
[8] <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=Paraview-developers</a><br>
[9] <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
[10] mailto:<a href="mailto:houssen@ipgp.fr" target="_blank">houssen@ipgp.fr</a><br>
[11] mailto:<a href="mailto:houssen@ipgp.fr" target="_blank">houssen@ipgp.fr</a><br>
</blockquote></blockquote>
<br>
</div></div></blockquote></div><br></div>