<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
I'm sorry I think a founded the problem , I didn't know that I had to create a new "pqLookupTableManager" myself and set it to pqApplicationCore::instance() with setLookupTableManager.<br><br>I had no problem with ObjectBuilder and PluginManager that I didn't needed to instantiate.<br><br>Is it a bug ?<br><br>Thanks <br><br><hr size="2" width="100%"><blockquote><blockquote><b>Wertz Gil</b><br></blockquote><i>gilwertz@hotmail.com</i><br></blockquote><hr size="2" width="100%"><br><br><br><br><hr id="stopSpelling">From: gilwertz@hotmail.com<br>To: utkarsh.ayachit@kitware.com<br>Date: Fri, 1 Apr 2011 08:23:21 +0200<br>CC: paraview@paraview.org<br>Subject: Re: [Paraview] pqColorScaleEditor crash<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
I'm not sure of what I could give you ( I tried to debug with gdb but it just say that the application crash, I knew it -_- )<br><br>But I made a sandbox and have the same problem, the code is shorter, I'll give it.<br><br>I joined 3 files, the app file named paraview-crash-on-legend.cpp and my 3D widget.<br><br>By the way I'm open for all comment or idea of improvement or else about good practise.<br><br>Thanks for your fast answer !<br><br>I use :<br>Qt 4<br>Paraview 10.0-RC1.<br><br><hr size="2" width="100%"><blockquote><blockquote><b>Wertz Gil</b><br></blockquote><i>gilwertz@hotmail.com</i><br></blockquote><hr size="2" width="100%"><br><br><br><br>> Date: Thu, 31 Mar 2011 10:40:46 -0400<br>> Subject: Re: [Paraview] pqColorScaleEditor crash<br>> From: utkarsh.ayachit@kitware.com<br>> To: gilwertz@hotmail.com<br>> CC: paraview@paraview.org<br>> <br>> Gil,<br>> <br>> If you can provide the call-stack for where you're getting the<br>> segfault, it will be helpful.<br>> <br>> Utkarsh<br>> <br>> On Thu, Mar 31, 2011 at 10:13 AM, Gil Wertz <gilwertz@hotmail.com> wrote:<br>> > I'm making a program that make calculation and try to integrate some<br>> > Paraview stuff, every things goes fine, I have my render from the server,<br>> > but when I use pqColorScaleEditor, the dialog show himself, I can change<br>> > color depending on scale but when I check the legend checkbox, the<br>> > application crash and I have no idea why ...<br>> ><br>> > Part of my code :<br>> ><br>> > void Widget3D::show_color_editor(){<br>> ><br>> > scaleEdit = new pqColorScaleEditor(m_RenderView->getWidget());<br>> > pqDataRepresentation* repr = m_input->getRepresentation(m_RenderView);<br>> > scaleEdit->setRepresentation(repr);<br>> > scaleEdit->show();<br>> ><br>> > }<br>> ><br>> > void Widget3D::createView(){<br>> > if(m_server){<br>> > // create a graphics window and put it in our main window<br>> > this->m_RenderView = qobject_cast<pqRenderView*>(<br>> > m_object_builder->createView(pqRenderView::renderViewType(),<br>> > m_server));<br>> ><br>> > if(m_RenderView){<br>> > m_layout_v->insertWidget(0,this->m_RenderView->getWidget());<br>> > }else{<br>> > //NLog::globalLog()->addError("Problem when creating a<br>> > RenderView.");<br>> > }<br>> > }else{<br>> > //NLog::globalLog()->addError("Cannot create RenderView if no<br>> > paraview server connection is set.");<br>> > }<br>> ><br>> > }<br>> ><br>> > void Widget3D::showRender()<br>> > {<br>> > if(m_source){<br>> ><br>> > m_input = m_source;//m_filter2;<br>> ><br>> ><br>> > m_object_builder->createDataRepresentation(m_input->getOutputPort(0),<br>> > this->m_RenderView);<br>> ><br>> > changeStyle();<br>> ><br>> > pqDataRepresentation* repr =<br>> > m_input->getRepresentation(m_RenderView);<br>> ><br>> ><br>> > this->m_color->setRepresentation(m_input->getRepresentation(m_RenderView));<br>> ><br>> ><br>> > //this->scaleEdit->setRepresentation(m_input->getRepresentation(m_RenderView));<br>> ><br>> > qDebug() << repr->getLookupTable();<br>> > //m_RenderView->get<br>> > qDebug() << repr->getLookupTableProxy();<br>> ><br>> > // zoom to object<br>> > this->m_RenderView->resetCamera();<br>> > // make sure we update<br>> > this->m_RenderView->render();<br>> ><br>> > }else{<br>> > //NLog::globalLog()->addError("There is no file to render.");<br>> > }<br>> > }<br>> ><br>> > Widget3D::Widget3D(QWidget *parent) :<br>> > QWidget(parent)<br>> > {<br>> > // automatically make a server connection<br>> > m_core = pqApplicationCore::instance();<br>> > m_object_builder = m_core->getObjectBuilder();<br>> ><br>> > // Register ParaView interfaces.<br>> > m_plugin_manager = m_core->getPluginManager();<br>> ><br>> > // adds support for standard paraview views.<br>> > m_plugin_manager->addInterface(new<br>> > pqStandardViewModules(m_plugin_manager));<br>> ><br>> > createView();<br>> ><br>> > showRender();<br>> ><br>> ><br>> > connect(m_show_color_palet,SIGNAL(released()),this,SLOT(show_color_editor()));<br>> ><br>> > }<br>> ><br>> ><br>> ><br>> > You'll notice that I use client - server paraview architecture. What is<br>> > strange is that I have no problem seting color on my mesh but the legend<br>> > make the application crash.<br>> ><br>> > I tryed different things like :<br>> > scaleEdit = new pqColorScaleEditor(m_RenderView->getWidget());<br>> > scaleEdit->show();<br>> > => it show me that there is no map ta set the legend... So I think it<br>> > found the map<br>> ><br>> > Maybe the problem is that the rendering is made in server side, but I did<br>> > not have problems with "pqDisplayColorWidget" that also use<br>> > pqDataRepresentation.<br>> ><br>> ><br>> > Thanks for any idea, if you need the full code I can provide it.<br>> ><br>> > ________________________________<br>> ><br>> > Wertz Gil<br>> ><br>> > gilwertz@hotmail.com<br>> ><br>> > ________________________________<br>> ><br>> ><br>> > _______________________________________________<br>> > Powered by www.kitware.com<br>> ><br>> > Visit other Kitware open-source projects at<br>> > http://www.kitware.com/opensource/opensource.html<br>> ><br>> > Please keep messages on-topic and check the ParaView Wiki at:<br>> > http://paraview.org/Wiki/ParaView<br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > http://www.paraview.org/mailman/listinfo/paraview<br>> ><br>> ><br>                                           
<br>_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview                                            </body>
</html>