<div dir="ltr"><div>Oh thanks Cory. A very silly error! Sorry I missed that and thanks for pointing it out. <br><br></div>Regards,<br>Girish<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 26 August 2014 16:09, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">My guess is that you have a member variable in RealUALGrid called<br>
"User" that is a char *, but you aren't initializing it to NULL in the<br>
constructor. When RealUALGrid::SetUser() is called, it checks whether<br>
the parameter string passed in is the same as the "User" member<br>
variable. Since "User" is initialized to an invalid pointer, you get<br>
the segmentation fault<br>
<span class="HOEnZb"><font color="#888888"><br>
Cory<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Tue, Aug 26, 2014 at 9:59 AM, Girish Ramesh <<a href="mailto:rgirish28@gmail.com">rgirish28@gmail.com</a>> wrote:<br>
> This is the backtrace i get when I run through gdb.<br>
><br>
> Output:<br>
><br>
> Program received signal SIGSEGV, Segmentation fault.<br>
> 0x00002aaabf3c21c4 in __strcmp_sse42 () from /lib64/libc.so.6<br>
> (gdb) bt full<br>
> #0  0x00002aaabf3c21c4 in __strcmp_sse42 () from /lib64/libc.so.6<br>
> No symbol table info available.<br>
> #1  0x00002aaac9cb4ee9 in ReadUALGrid::SetUser (this=0x10e3c10,<br>
> _arg=0x1b2ab39 "diy")<br>
>     at<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/paraview/ParaView-v4.1.0/Plugins/ReadUALGrid/ReadUALGrid.h:38<br>
> No locals.<br>
> #2  0x00002aaac9cb6937 in ReadUALGridCommand (arlu=0xecf5b0, ob=0x10e3c10,<br>
> method=0x1b2ab29 "SetUser", msg=..., resultStream=...)<br>
>     at<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/paraview/ParaView-v4.1.0/Plugins/ReadUALGrid/ReadUALGridClientServer.cxx:175<br>
>         temp0 = 0x1b2ab39 "diy"<br>
>         op = 0x10e3c10<br>
>         vtkmsg = <incomplete type><br>
> #3  0x00002aaab1ee11c8 in<br>
> vtkClientServerInterpreter::CallCommandFunction(char const*, vtkObjectBase*,<br>
> char const*, vtkClientServerStream const&, vtkClientServerStream&) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkClientServer-pv4.1.so.1<br>
> No symbol table info available.<br>
> #4  0x00002aaab1ee5102 in<br>
> vtkClientServerInterpreter::ProcessCommandInvoke(vtkClientServerStream<br>
> const&, int) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkClientServer-pv4.1.so.1<br>
> No symbol table info available.<br>
> #5  0x00002aaab1ee4746 in<br>
> vtkClientServerInterpreter::ProcessOneMessage(vtkClientServerStream const&,<br>
> int) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkClientServer-pv4.1.so.1<br>
> No symbol table info available.<br>
> #6  0x00002aaab1ee480d in<br>
> vtkClientServerInterpreter::ProcessStream(vtkClientServerStream const&) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkClientServer-pv4.1.so.1<br>
> No symbol table info available.<br>
> #7  0x00002aaaae5011bb in<br>
> vtkSIProperty::ProcessMessage(vtkClientServerStream&) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #8  0x00002aaaae516ad7 in<br>
> vtkSIStringVectorProperty::Push(vtkSIStringVectorProperty::vtkVectorOfStrings<br>
> const&) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #9  0x00002aaaae517431 in<br>
> vtkSIStringVectorProperty::ReadXMLAttributes(vtkSIProxy*, vtkPVXMLElement*)<br>
> ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #10 0x00002aaaae503832 in vtkSIProxy::ReadXMLProperty(vtkPVXMLElement*) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #11 0x00002aaaae50249f in vtkSIProxy::ReadXMLAttributes(vtkPVXMLElement*) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #12 0x00002aaaae513809 in<br>
> vtkSISourceProxy::ReadXMLAttributes(vtkPVXMLElement*) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #13 0x00002aaaae502e12 in<br>
> vtkSIProxy::CreateVTKObjects(paraview_protobuf::Message*) ()<br>
> ---Type <return> to continue, or q <return> to quit---<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #14 0x00002aaaae515765 in<br>
> vtkSISourceProxy::CreateVTKObjects(paraview_protobuf::Message*) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #15 0x00002aaaae50209d in vtkSIProxy::Push(paraview_protobuf::Message*) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #16 0x00002aaaae4e6e32 in<br>
> vtkPVSessionCore::PushStateInternal(paraview_protobuf::Message*) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #17 0x00002aaaae4e52e7 in<br>
> vtkPVSessionCore::PushState(paraview_protobuf::Message*) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #18 0x00002aaaae4e2b2d in<br>
> vtkPVSessionBase::PushState(paraview_protobuf::Message*) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerImplementationCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #19 0x00002aaaadfe7663 in vtkSMProxy::CreateVTKObjects() ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerManagerCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #20 0x00002aaaae0277e5 in vtkSMSourceProxy::CreateVTKObjects() ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerManagerCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #21 0x00002aaaae01c8f2 in vtkSMSessionProxyManager::RegisterProxy(char<br>
> const*, char const*, vtkSMProxy*) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkPVServerManagerCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #22 0x00002aaaab7f051b in pqObjectBuilder::createProxyInternal(QString<br>
> const&, QString const&, pqServer*, QString const&, QString const&,<br>
> QMap<QString, QVariant> const&) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkpqCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #23 0x00002aaaab7ecd09 in pqObjectBuilder::createSource(QString const&,<br>
> QString const&, pqServer*) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkpqCore-pv4.1.so.1<br>
> No symbol table info available.<br>
> #24 0x00002aaaaad7838a in pqSourcesMenuReaction::createSource(QString<br>
> const&, QString const&) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkpqApplicationComponents-pv4.1.so.1<br>
> No symbol table info available.<br>
> #25 0x00002aaabe7c99bf in QMetaObject::activate(QObject*, QMetaObject<br>
> const*, int, void**) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtCore.so.4<br>
> No symbol table info available.<br>
> #26 0x00002aaaaad902a7 in pqProxyGroupMenuManager::triggered(QString const&,<br>
> QString const&) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkpqApplicationComponents-pv4.1.so.1<br>
> No symbol table info available.<br>
> #27 0x00002aaaaad679a7 in pqProxyGroupMenuManager::triggered() ()<br>
> ---Type <return> to continue, or q <return> to quit---<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/paraview/4.1/lib/paraview-4.1/libvtkpqApplicationComponents-pv4.1.so.1<br>
> No symbol table info available.<br>
> #28 0x00002aaabe7c99bf in QMetaObject::activate(QObject*, QMetaObject<br>
> const*, int, void**) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtCore.so.4<br>
> No symbol table info available.<br>
> #29 0x00002aaabd7f7da2 in QAction::triggered(bool) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #30 0x00002aaabd7f7f90 in QAction::activate(QAction::ActionEvent) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #31 0x00002aaabdc2e3b3 in ?? () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #32 0x00002aaabdc347c9 in ?? () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #33 0x00002aaabd84da99 in QWidget::event(QEvent*) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #34 0x00002aaabdc35b0b in QMenu::event(QEvent*) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #35 0x00002aaabd7fdfac in QApplicationPrivate::notify_helper(QObject*,<br>
> QEvent*) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #36 0x00002aaabd8026db in QApplication::notify(QObject*, QEvent*) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #37 0x00002aaabe7b44de in QCoreApplication::notifyInternal(QObject*,<br>
> QEvent*) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtCore.so.4<br>
> No symbol table info available.<br>
> #38 0x00002aaabd7fedeb in QApplicationPrivate::sendMouseEvent(QWidget*,<br>
> QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #39 0x00002aaabd87977c in ?? () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #40 0x00002aaabd878651 in QApplication::x11ProcessEvent(_XEvent*) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #41 0x00002aaabd89e322 in ?? () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> No symbol table info available.<br>
> #42 0x00002aaac543960a in g_main_context_dispatch () from<br>
> /usr/lib64/libglib-2.0.so.0<br>
> No symbol table info available.<br>
> #43 0x00002aaac543ce88 in ?? () from /usr/lib64/libglib-2.0.so.0<br>
> No symbol table info available.<br>
> #44 0x00002aaac543d03c in g_main_context_iteration () from<br>
> /usr/lib64/libglib-2.0.so.0<br>
> No symbol table info available.<br>
> #45 0x00002aaabe7e2ac6 in<br>
> QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)<br>
> ()<br>
>    from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtCore.so.4<br>
> No symbol table info available.<br>
> #46 0x00002aaabd89dfae in ?? () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtGui.so.4<br>
> ---Type <return> to continue, or q <return> to quit---<br>
> No symbol table info available.<br>
> #47 0x00002aaabe7b30df in<br>
> QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtCore.so.4<br>
> No symbol table info available.<br>
> #48 0x00002aaabe7b3368 in<br>
> QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtCore.so.4<br>
> No symbol table info available.<br>
> #49 0x00002aaabe7b8248 in QCoreApplication::exec() () from<br>
> /pfs/work/kosl/sohpc/girish/paraview_plugin/staging/qt/lib/libQtCore.so.4<br>
> No symbol table info available.<br>
> #50 0x0000000000407ac5 in main ()<br>
> No symbol table info available.<br>
><br>
><br>
> No idea what's happening. Please help.<br>
><br>
> Regards,<br>
> Girish<br>
><br>
><br>
> On 26 August 2014 15:49, Cory Quammen <<a href="mailto:cory.quammen@kitware.com">cory.quammen@kitware.com</a>> wrote:<br>
>><br>
>> Girish,<br>
>><br>
>> Can you run ParaView with your plugin through a debugger to find out<br>
>> where it is segfaulting? That will point out where the segfault occurs<br>
>> which is often a clue to why it is occurring.<br>
>><br>
>> Thanks,<br>
>> Cory<br>
>><br>
>> On Tue, Aug 26, 2014 at 9:41 AM, Girish Ramesh <<a href="mailto:rgirish28@gmail.com">rgirish28@gmail.com</a>><br>
>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > I am writing my own plugin but each time I try to add another check box,<br>
>> > the<br>
>> > plugin suddenly segfaults. I have no idea why. The XML and C++ code are<br>
>> > attached.<br>
>> ><br>
>> > XML:<br>
>> ><br>
>> > <IntVectorProperty<br>
>> >          name="FieldLoadStatus"<br>
>> >          command="SetFieldLoadStatus"<br>
>> >          number_of_elements="1"<br>
>> >          default_values="0"<br>
>> >          panel_visibility="default" ><br>
>> >         <BooleanDomain name="bool"/><br>
>> >         <Documentation><br>
>> >           The values of this property sets the run number.<br>
>> >         </Documentation><br>
>> >       </IntVectorProperty><br>
>> > C++:<br>
>> ><br>
>> > public:<br>
>> >   vtkTypeMacro(ReadUALGrid, vtkUnstructuredGridAlgorithm);<br>
>> >   void PrintSelf(ostream& os, vtkIndent indent);<br>
>> ><br>
>> >   static ReadUALGrid *New();<br>
>> ><br>
>> >   vtkGetMacro(Shot,int)<br>
>> >   vtkSetMacro(Shot,int);<br>
>> ><br>
>> >   vtkGetMacro(Run,int);<br>
>> >   vtkSetMacro(Run,int);<br>
>> ><br>
>> >   vtkGetMacro(RefRun,int);<br>
>> >   vtkSetMacro(RefRun,int);<br>
>> ><br>
>> >   vtkGetMacro(CPOLoad,int);<br>
>> >   vtkSetMacro(CPOLoad,int);<br>
>> ><br>
>> >   vtkGetMacro(FieldLoadStatus,int);<br>
>> >   vtkSetMacro(FieldLoadStatus,int);<br>
>> ><br>
>> > protected:<br>
>> >   ReadUALGrid();<br>
>> >   ~ReadUALGrid(){}<br>
>> ><br>
>> >   int Shot;<br>
>> >   int Run;<br>
>> >   int RefRun;<br>
>> >   int CPOLoad;<br>
>> >   int FieldLoadStatus;<br>
>> ><br>
>> > I have no idea why because it worked perfectly for other check boxes.<br>
>> > Thank<br>
>> > you.<br>
>> ><br>
>> > Regards,<br>
>> > Girish<br>
>> ><br>
>> > _______________________________________________<br>
>> > Paraview-developers mailing list<br>
>> > <a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
>> > <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>