[Paraview] NULL qApp in Paraview Plugin

Thomas D. Uram turam at mcs.anl.gov
Thu Jan 17 17:33:23 EST 2008


Okay, that's clear, and now works.  Thanks for your help.

I'm now off to try to replicate the same success on Linux and Windows...

Tom


On 1/17/08 2:24 PM, David Cole wrote:
> That was why Clint asked you to run otool... Both ParaView and the 
> plugin need to refer to exactly the same Qt shared library file, not 
> just the same version with two different file references.
>
> You need to run "install_name_tool" or set up your build so that your 
> plugin references the Qt shared library with the same name as ParaView.
>
> Global qt state is not really global if you have two sets of qt shared 
> libraries loading.
>
>
> On 1/17/08, *Thomas D. Uram* < turam at mcs.anl.gov 
> <mailto:turam at mcs.anl.gov>> wrote:
>
>     otool against the plugin gives me:
>
>            
>     /usr/local/Trolltech/Qt-4.2.2/lib/QtGui.framework/Versions/4/QtGui
>     (compatibility version 4.2.0, current version 4.2.2)
>
>     admittedly a different path, but the same version.
>
>
>
>
>     On 1/17/08 1:53 PM, clinton at elemtech.com
>     <mailto:clinton at elemtech.com> wrote:
>>     What does otool give you when you do it on the plugin?
>>     Does it 
>>     contain "@executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui"  or 
>>     something else?
>>
>>     On the Mac, if its something else, you're going to get two instances of QtGui 
>>
>>     in the application.
>>
>>     Clint
>>
>>     On Thursday 17 January 2008 12:47:48 pm Thomas D. Uram wrote:
>>       
>>>     otool (I'm on OSX currently) reports the Qt version as 4.2.2:
>>>
>>>             @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui
>>>     (compatibility version 4.2.0, current version 4.2.2)
>>>
>>>     which is what I used to build Paraview and my plugin.  I built the
>>>
>>>     Paraview 3.1 source, built my plugin against it, and am subsequently
>>>     trying to load the plugin with the released 3.1 executable.
>>>
>>>     No luck yet.  I'll report back if I find my way.
>>>
>>>     Thanks,
>>>     Tom
>>>
>>>
>>>     On 1/17/08 1:03 PM, clinton at elemtech.com <mailto:clinton at elemtech.com> wrote:
>>>         
>>>>     Did you build your plugin against the same Qt version and same ParaView
>>>>     code that the ParaView releases were made from?
>>>>
>>>>     Its possible to have a NULL qApp if a different version of Qt is used
>>>>     when building the plugin.
>>>>
>>>>
>>>>     I'd probably check in the debugger (even in release mode) what libraries
>>>>     are actually being used, after your plugin loads.
>>>>
>>>>     Clint
>>>>
>>>>     On Thursday 17 January 2008 11:04:14 am Thomas D. Uram wrote:
>>>>
>>>>           
>>>>>     I've written a plugin for Paraview, following the directions at
>>>>>
>>>>>         http://www.vtk.org/Wiki/Plugin_HowTo
>>>>>      <http://www.vtk.org/Wiki/Plugin_HowTo>
>>>>>
>>>>>     and it works fine with the Paraview executable I've built.  I'd like for
>>>>>     it to also work with the official Paraview releases, but in that case
>>>>>     Paraview crashes trying to load the plugin.
>>>>>
>>>>>     That's because the plugin code makes a call against qApp (as does the
>>>>>     Paraview plugin example), but qApp is NULL.  So my questions are:
>>>>>
>>>>>     - Is there a related build dependency that I need to consider?  (I've
>>>>>     already ensured that my plugin uses CMAKE_BUILD_TYPE=='release')
>>>>>
>>>>>     - Should I be able to successfully build plugins for loading by the
>>>>>     release code?  (I expect that's the long term plan, but wonder if it is
>>>>>     not yet possible.)
>>>>>
>>>>>
>>>>>     Any help would be appreciated.
>>>>>
>>>>>     Thanks,
>>>>>     Tom
>>>>>
>>>>>
>>>>>
>>>>>     _______________________________________________
>>>>>     ParaView mailing list
>>>>>     ParaView at paraview.org <mailto:ParaView at paraview.org>
>>>>>     http://www.paraview.org/mailman/listinfo/paraview
>>>>>             
>>       
>
>     _______________________________________________
>     ParaView mailing list
>     ParaView at paraview.org <mailto:ParaView at paraview.org>
>     http://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20080117/d66a5579/attachment.htm


More information about the ParaView mailing list