2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 9f1697a1 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed various initialization issues found by valgrind.

parent 3018dc6b
......@@ -66,6 +66,7 @@ namespace campvis {
, _viewportSizeProp(viewportSizeProp)
, _cpnw(cameraProperty)
, _trackball(0)
, _sceneBounds(tgt::vec3(0.f))
{
tgtAssert(_cameraProperty != 0, "Assigned camera property must not be 0.");
tgtAssert(_viewportSizeProp != 0, "Assigned viewport size property must not be 0.");
......
......@@ -74,7 +74,7 @@ namespace sigslot {
while (! _stopExecution) {
// try pop the next event from the event queue
_signal_handle_base* signal;
_signal_handle_base* signal = nullptr;
if (_signalQueue.try_pop(signal)) {
signal->processSignal();
delete signal;
......
......@@ -250,8 +250,16 @@ namespace sigslot {
/// Base class for signal handles that provides an interface to emit the signal.
class SIGSLOT_API _signal_handle_base {
public:
// default constructor
_signal_handle_base()
#ifdef CAMPVIS_DEBUG
: _callingLine(0)
#endif
{};
/// Virtual destructor
virtual ~_signal_handle_base() {};
/// Emits the signal of this signal handle.
virtual void processSignal() const = 0;
......@@ -270,7 +278,6 @@ namespace sigslot {
#ifdef CAMPVIS_DEBUG
// This is debug information only, automatically removed from release builds
std::string _callingFunction; ///< Function that emitted this signal
std::string _callingFile; ///< File which emitted this signal
int _callingLine; ///< Line where this signal was emitted
......
......@@ -53,6 +53,8 @@ namespace campvis {
, p_enableScribbling("EnableScribbling", "Enable Scribbling in Slice Views", false)
, p_seProperties("SliceExtractorProperties", "Slice Extractor Properties")
, p_vrProperties("VolumeRendererProperties", "Volume Renderer Properties")
, _shader(nullptr)
, _quad(nullptr)
, _raycaster(viewportSizeProp, raycaster)
, _sliceRenderer(sliceRenderer)
, p_smallRenderSize("SmallRenderSize", "Small Render Size", tgt::ivec2(32), tgt::ivec2(0), tgt::ivec2(10000), tgt::ivec2(1))
......@@ -61,8 +63,11 @@ namespace campvis {
, _ySliceHandler(&_sliceRenderer->p_ySliceNumber)
, _zSliceHandler(&_sliceRenderer->p_zSliceNumber)
, _windowingHandler(nullptr)
, _trackballEH(0)
, _trackballEH(nullptr)
, _mousePressedInRaycaster(false)
, _viewUnderEvent(VOLUME)
, _eventPositionOffset(0)
, _eventViewportSize(0)
, _scribblePointer(nullptr)
, _cachedImageSize(0)
{
......
......@@ -67,10 +67,10 @@ protected:
}
~ConcurrentHistogramNDUniform() {
delete max;
delete min;
delete numBuckets;
delete histogram;
delete [] max;
delete [] min;
delete [] numBuckets;
delete [] histogram;
}
virtual void SetUp() {
......@@ -202,10 +202,10 @@ protected:
}
~ConcurrentHistogramNDSpecific() {
delete max;
delete min;
delete numBuckets;
delete histogram;
delete [] max;
delete [] min;
delete [] numBuckets;
delete [] histogram;
}
virtual void SetUp() {
......
......@@ -145,8 +145,11 @@ GTEST_API_ int main(int argc, char **argv) {
XInitThreads();
#endif
app = new QApplication(argc, argv);
// Make Xlib and GLX thread safe under X11
QApplication::setAttribute(Qt::AA_X11InitThreads);
testing::InitGoogleTest(&argc, argv);
int ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment