Closed szotsaki closed 9 years ago
Valgrind gave me the following error:
Conditional jump or move depends on uninitialised value(s) in ImageBlender::GetBlendedImage(cv::Mat&, cv::Rect_<int>) in /home/aki/Dokumentumok/Egyetem/Diplomaterv/marvany/MarbleCommon/ImageBlender.cpp:117 1: ImageBlender::GetBlendedImage(cv::Mat&, cv::Rect_<int>) in /home/aki/Dokumentumok/Egyetem/Diplomaterv/marvany/MarbleCommon/ImageBlender.cpp:117 2: ImageBlender::GetBlendedImage()::{lambda()#1}::operator()() const in /home/aki/Dokumentumok/Egyetem/Diplomaterv/marvany/MarbleCommon/ImageBlender.cpp:72 3: void std::_Bind_simple<ImageBlender::GetBlendedImage()::{lambda()#1} ()>::_M_invoke<>(std::_Index_tuple<>) in /usr/include/c++/4.9/functional:1700 4: std::_Bind_simple<ImageBlender::GetBlendedImage()::{lambda()#1} ()>::operator()() in /usr/include/c++/4.9/functional:1688 5: std::thread::_Impl<std::_Bind_simple<ImageBlender::GetBlendedImage()::{lambda()#1} ()> >::_M_run() in /usr/include/c++/4.9/thread:115 6: execute_native_thread_routine in /usr/src/debug/gcc-4.9.0-r211729/obj-x86_64-suse-linux/x86_64-suse-linux/libstdc++-v3/src/c++11/../../../../../libstdc++-v3/src/c++11/thread.cc:84 7: start_thread in /usr/src/debug/glibc-2.19/nptl/pthread_create.c:309 8: clone in /usr/src/debug/glibc-2.19/sysdeps/unix/sysv/linux/x86_64/clone.S:111 Uninitialised value was created by a heap allocation 1: malloc in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so 2: cv::fastMalloc(unsigned long) in /usr/src/debug/opencv-2.4.11/modules/core/src/alloc.cpp:64 3: cv::Mat::create(int, int const*, int) in /usr/src/debug/opencv-2.4.11/modules/core/src/matrix.cpp:215 4: cv::Mat::create(int, int, int) in /usr/include/opencv2/core/mat.hpp:353 5: cv::Mat::Mat(int, int, int) in /usr/include/opencv2/core/mat.hpp:75 6: SupplementaryImageLayer::Render(ProcessingStateDescriptor const&) in /home/aki/Dokumentumok/Egyetem/Diplomaterv/marvany/GrainAutLine/GrainAutLine/Layers/SupplementaryImageLayer.cpp:34 7: Layer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) in /home/aki/Dokumentumok/Egyetem/Diplomaterv/marvany/GrainAutLine/build-GrainAutLine-Qt_5_2_1-Debug/GrainAutLine/moc_Layer.cpp:113 8: QMetaObject::activate(QObject*, int, int, void**) in /usr/src/debug/qtbase-opensource-src-5.4.2/src/corelib/kernel/qobject.cpp:3717 9: Processor::ComputationReady(ProcessingStateDescriptor const&) const in /home/aki/Dokumentumok/Egyetem/Diplomaterv/marvany/GrainAutLine/MarbleCommon/moc_Processor.cpp:168 10: Processor::Run(ProcessingStateDescriptor&) in /home/aki/Dokumentumok/Egyetem/Diplomaterv/marvany/MarbleCommon/Processors/Processor.cpp:25 11: QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<ProcessingStateDescriptor&>, void, void (Processor::*)(ProcessingStateDescriptor&)>::call(void (Processor::*)(ProcessingStateDescriptor&), Processor*, void**) in /usr/include/qt5/QtCore/qobjectdefs_impl.h:500 12: void QtPrivate::FunctionPointer<void (Processor::*)(ProcessingStateDescriptor&)>::call<QtPrivate::List<ProcessingStateDescriptor&>, void>(void (Processor::*)(ProcessingStateDescriptor&), Processor*, void**) in /usr/include/qt5/QtCore/qobjectdefs_impl.h:519 13: QtPrivate::QSlotObject<void (Processor::*)(ProcessingStateDescriptor&), QtPrivate::List<ProcessingStateDescriptor&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in /usr/include/qt5/QtCore/qobject_impl.h:143 14: call in /usr/src/debug/qtbase-opensource-src-5.4.2/src/corelib/../../src/corelib/kernel/qobject_impl.h:124 15: QMetaObject::activate(QObject*, int, int, void**) in /usr/src/debug/qtbase-opensource-src-5.4.2/src/corelib/kernel/qobject.cpp:3702 16: SlotManager::RunElementaryProcessorsAndRender(ProcessingStateDescriptor&) const in /home/aki/Dokumentumok/Egyetem/Diplomaterv/marvany/GrainAutLine/build-GrainAutLine-Qt_5_2_1-Debug/GrainAutLine/moc_SlotManager.cpp:275 17: SlotManager::FileOpened(QUrl const&) in /home/aki/Dokumentumok/Egyetem/Diplomaterv/marvany/GrainAutLine/GrainAutLine/SlotManager.cpp:158 18: SlotManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) in /home/aki/Dokumentumok/Egyetem/Diplomaterv/marvany/GrainAutLine/build-GrainAutLine-Qt_5_2_1-Debug/GrainAutLine/moc_SlotManager.cpp:146 19: QMetaObject::activate(QObject*, int, int, void**) in /usr/src/debug/qtbase-opensource-src-5.4.2/src/corelib/kernel/qobject.cpp:3717 20: QQmlVMEMetaObject::metaCall(QMetaObject::Call, int, void**) in /usr/src/debug/qtdeclarative-opensource-src-5.4.2/src/qml/qml/qqmlvmemetaobject.cpp:914 21: CallMethod(QObject*, int, int, int, int*, QV8Engine*, QV4::CallData*) in /usr/src/debug/qtdeclarative-opensource-src-5.4.2/src/qml/jsruntime/qv4qobjectwrapper.cpp:1151 22: CallPrecise(QObject*, QQmlPropertyData const&, QV8Engine*, QV4::CallData*) in /usr/src/debug/qtdeclarative-opensource-src-5.4.2/src/qml/jsruntime/qv4qobjectwrapper.cpp:1403 23: QV4::QObjectMethod::callInternal(QV4::CallData*) in /usr/src/debug/qtdeclarative-opensource-src-5.4.2/src/qml/jsruntime/qv4qobjectwrapper.cpp:1888 24: call in /usr/src/debug/qtdeclarative-opensource-src-5.4.2/src/qml/jsruntime/qv4object_p.h:278 25: QV4::Runtime::callActivationProperty(QV4::ExecutionContext*, QV4::String*, QV4::CallData*) in /usr/src/debug/qtdeclarative-opensource-src-5.4.2/src/qml/jsruntime/qv4runtime.cpp:904 26: 0x17be3a68 27: QV4::SimpleScriptFunction::call(QV4::Managed*, QV4::CallData*) in /usr/src/debug/qtdeclarative-opensource-src-5.4.2/src/qml/jsruntime/qv4functionobject.cpp:511
It seems it was caused by the uninitialized Cache of the supplementary canvas rendering. Now the Cache is initialized with an all-black image with a red cross on it.
Valgrind gave me the following error: