ParaView/Developer Info: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
Line 19: Line 19:
== Debugging ==
== Debugging ==


A great way to track down VTK classes that are leaking is using [[DebugLeaksView]]. The widget is designed to work out of the box with any VTK+Qt application- just construct the widget and call show(). More information can be found on the [[DebugLeaksView]] page
A great way to track down VTK classes that are leaking is using [[DebugLeaksView]]. The widget is designed to work out of the box with any VTK+Qt application- just construct the widget and call show(). More information can be found on the [[DebugLeaksView]] page. The vtk code is available in the qt-vtk-debug-leaks-view branch of git://github.com/patmarion/VTK.git and
the code to embed the widget into paraview is available in the qt-vtk-debug-leaks-view branch of git://github.com/patmarion/ParaView.git


[[Image:Debug_leaks_widget_1.png|center|thumb|500px]]
[[Image:Debug_leaks_widget_1.png|center|thumb|500px]]
* the vtk code is available in the qt-vtk-debug-leaks-view branch of git://github.com/patmarion/VTK.git
* code to embed the widget into paraview is available in the qt-vtk-debug-leaks-view branch of git://github.com/patmarion/ParaView.git


== Environment Flags ==
== Environment Flags ==

Revision as of 17:02, 9 May 2011

This is a general collection of knowledge to help make developing for ParaView easier.

VTK Development

Server Manager Development

XML Hints

http://www.paraview.org/Wiki/ServerManager_XML_Hints

Qt Development

QApplication::processEvents()

Because of the testing framework we are unable to safely use processEvents. The testing framework has a busy lock it uses to determine when it should play the next testing event. If that busy lock is running when your code calls processEvents it will cause the tests to start playing, which will break the test. The solution is dependent on where you need to call processEvents.

 pqCoreUtilities::processEvents();
 pqEventDispatcher::processEvents(); //only in Widgets since widgets can't depend on core

Both methods support the QEventLoop::ProcessEventsFlags flags argument. For more information on processEvents please see the Qt Documentation

Debugging

A great way to track down VTK classes that are leaking is using DebugLeaksView. The widget is designed to work out of the box with any VTK+Qt application- just construct the widget and call show(). More information can be found on the DebugLeaksView page. The vtk code is available in the qt-vtk-debug-leaks-view branch of git://github.com/patmarion/VTK.git and the code to embed the widget into paraview is available in the qt-vtk-debug-leaks-view branch of git://github.com/patmarion/ParaView.git

Debug leaks widget 1.png

Environment Flags

PARAVIEW_DATA_ROOT

Change the location of the data root for testing.

PV_DEBUG_TEST

Prints debugging information about the testing framework during playback to cout.

PV_ICET_WINDOW_BORDERS

Force render windows to be 400x400 instead of fullscreen

PV_NO_OFFSCREEN_SCREENSHOTS

Disable the use of offsceen screenshots

PV_PLUGIN_DEBUG

Prints debugging information when loading plugins into ParaView.

PV_PLUGIN_PATH

Directories containing plugins to be loaded on startup

PV_SOFTWARE_RENDERING

Force software rendering for ParaView.

PV_LOCK_SAFE

Disables the use of the vtkTransmit<Type>Piece classes and instead uses vtkExtract<Type>Piece

QT_MAC_NO_NATIVE_MENUBAR

Qt flag to force the Qt menu bar rather than the native mac menu bar.