CORE DUMP SEGMENTATION FAULT

My System Config

UBUNTU 16.04
GPU DRIVER 367.57
GPU 1060
OPENCV 3.2
CUDA TOOLKIT 8.0

OPENCV gets properly built with CUDA.
Configuration and Generation were done using CMAKE.

Building and Making was successful.

Cuda basic programs such as DeviceQuery , bandwidth test runs successfully.

Opencv sample programs doesn’t run. Core dump occurs. Segmentation fault appears.
What may me the problem and how to solve it.

Same problem here.

This example program crashes when cv::cuda::threshold routine is called.

#include <iostream>
#include "opencv2/opencv.hpp"
#include "opencv2/core.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/cudaarithm.hpp"

using namespace cv;

int main (int argc, char* argv[])
{
	try
	{
		cv::Mat src_host = cv::imread("./file.png", cv::IMREAD_GRAYSCALE);
		cv::cuda::GpuMat dst, src;
		src.upload(src_host);
		cv::cuda::threshold(src, dst, 128.0, 255.0, cv::THRESH_BINARY);

		cv::Mat result_host;
		dst.download(result_host);

		cv::imshow("Result", result_host);
		cv::waitKey();
	}
	catch(const cv::Exception& ex)
	{
		std::cout << "Error: " << ex.what() << std::endl;
	}
	return 0;
}

Have you solved this problem?