<div dir="ltr">Try throwing in a <span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">VTK_MODULE_INIT(</span><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">vtkRenderingFreeType) in there.</span><div><font color="#000000" face="Verdana, Geneva, Helvetica, Arial, sans-serif"><br></font><div><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px"><br></span></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div>
<br><div class="gmail_quote">On Fri, Jan 8, 2016 at 1:39 PM, cfd new via vtkusers <span dir="ltr"><<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div dir="ltr">I compiled vtk 6.3 with VS 2010.</div><div dir="ltr">I had a few crashes when my GUI Is launched.</div><div dir="ltr">I added the following code in my application program</div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">#include <vtkAutoInit.h></span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">VTK_MODULE_INIT(vtkRenderingOpenGL); </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">VTK_MODULE_INIT(vtkRenderingContextOpenGL); </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">VTK_MODULE_INIT(vtkInteractionStyle); </span><br></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><br></span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">to avoid these crashes.</span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><br></span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">Then </span><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">when my code starts from</span><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"> </span></div><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">QApplication app(argc, argv); </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">MyQTGUI mygui; </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">mygui.show(); </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">app.exec(); <==crashes from here. </span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><br></span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">call stack shows this->Implementation->TextRenderer is <span style="background:rgb(255,255,153)">NULL</span></span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">in the following code. </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">what is the reason?</span><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><br></span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><br></span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">vtkVector2i vtkTextRendererStringToImage::GetBounds( </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">    vtkTextProperty *property, const vtkUnicodeString& string, int dpi) </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">{ </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">  int tmp[4] = { 0, 0, 0, 0 }; </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">  vtkVector2i recti(tmp); </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">  if (!property) </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">    { </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">    return recti; </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">    } </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">  this->Implementation->TextRenderer->GetBoundingBox(property, string, tmp, </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">                                                     dpi); </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">  recti.Set(tmp[1] - tmp[0], </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">            tmp[3] - tmp[2]); </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">  return recti; </span><br style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">} </span><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><br></span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><br></span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px">======================call statck output=======================================</span></div><div dir="ltr"><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13.44px"><span style="font-size:13.44px">  vtkRenderingCore-6.3.dll!vtkTextRenderer::GetBoundingBox(vtkTextProperty * tprop, const vtkUnicodeString & str, int * bbox, int dpi, int backend)  Line 158 + 0x5 bytes        C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingFreeType-6.3.dll!vtkTextRendererStringToImage::GetBounds(vtkTextProperty * property, const vtkUnicodeString & string, int dpi)  Line 66        C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingContextOpenGL-6.3.dll!vtkOpenGLContextDevice2D::ComputeStringBounds(const vtkUnicodeString & string, float * bounds)  Line 947 C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingContextOpenGL-6.3.dll!vtkOpenGLContextDevice2D::ComputeStringBounds(const vtkStdString & string, float * bounds)  Line 849 + 0x48 bytes        C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingContext2D-6.3.dll!vtkContext2D::ComputeStringBounds(const vtkStdString & string, float * bounds)  Line 646     C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkChartsCore-6.3.dll!vtkAxis::GetBoundingRect(vtkContext2D * painter)  Line 845       C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkChartsCore-6.3.dll!vtkChartXY::UpdateLayout(vtkContext2D * painter)  Line 851       C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkChartsCore-6.3.dll!vtkChartXY::Paint(vtkContext2D * painter)  Line 395      C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingContext2D-6.3.dll!vtkContextScenePrivate::PaintItems(vtkContext2D * context)  Line 81      C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingContext2D-6.3.dll!vtkContextScene::Paint(vtkContext2D * painter)  Line 120 C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingContext2D-6.3.dll!vtkContextActor::RenderOverlay(vtkViewport * viewport)  Line 221 C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingCore-6.3.dll!vtkRenderer::UpdateGeometry()  Line 585 + 0x41 bytes  C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingOpenGL-6.3.dll!vtkOpenGLRenderer::DeviceRender()  Line 273 C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingCore-6.3.dll!vtkRenderer::Render()  Line 298       C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingCore-6.3.dll!vtkRendererCollection::Render()  Line 53      C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingCore-6.3.dll!vtkRenderWindow::DoStereoRender()  Line 771   C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingCore-6.3.dll!vtkRenderWindow::DoFDRender()  Line 739       C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingCore-6.3.dll!vtkRenderWindow::DoAARender()  Line 618       C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingCore-6.3.dll!vtkRenderWindow::Render()  Line 434   C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkRenderingCore-6.3.dll!vtkRenderWindowInteractor::Render()  Line 175 C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkViewsContext2D-6.3.dll!vtkContextInteractorStyle::RenderNow()  Line 147     C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkViewsContext2D-6.3.dll!vtkContextInteractorStyle::ProcessInteractorEvents(vtkObject * __formal, unsigned long eventId, void * clientdata, vtkObject * __formal)  Line 132   C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkCommonCore-6.3.dll!vtkCallbackCommand::Execute(vtkObject * caller, unsigned long event, void * callData)  Line 43   C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkCommonCore-6.3.dll!vtkSubjectHelper::InvokeEvent(unsigned long event, void * callData, vtkObject * self)  Line 619  C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkCommonCore-6.3.dll!vtkObject::InvokeEvent(unsigned long event, void * callData)  Line 785 + 0x1c bytes      C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkGUISupportQt-6.3.dll!QVTKInteractor::TimerEvent(int timerId)  Line 217      C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkGUISupportQt-6.3.dll!QVTKInteractorInternal::TimerEvent(int id)  Line 73    C++ </span><br style="font-size:13.44px"><span style="font-size:13.44px">       vtkGUISupportQt-6.3.dll!QVTKInteractorInternal::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a)  Line 52  C++ </span><br></span></div></div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>