Error segmentation Fault -CL_ENQUEUENDRANGEKRNEL

I am working with Convolution with OpenCL, I am getting segmentation fault after enqueuendrangeKernel API. If anyone can help me out with this. I am still a beginner in OpenCL.

Here is my host code: -

const int width  = image.size().width;
const int height = image.size().height;
std::cout<<"width: 	"<<width<<"	 height: "<<height<<std::endl;
std::size_t in_imagesize = (width*height)*sizeof(float);

std::vector<float> ptr(width*height,0);

const float filter[3] = {1,2,3};
float filter_size = 3*sizeof(float);
const int FilterRadius = 1;

cv::Mat result_image = cv::Mat(cvSize(width,height), CV_32FC1);
std::size_t out_imagesize = sizeof(float)*(width*height);
std::vector<float> read_buffer(width*height,0);

…context, command queue, kernel program…

cl::Buffer input_dev, filter_kernel, output_dev;

input_dev = cl::Buffer(ctx,CL_MEM_READ_ONLY|CL_MEM_USE_HOST_PTR,in_imagesize,,&err);
if(error!= CL_SUCCESS){
	std::cout<<"Input Buffer Failed "<<std::endl;

output_dev =cl::Buffer(ctx,CL_MEM_READ_WRITE,out_imagesize,NULL,&err);
if(error!= CL_SUCCESS){
	std::cout<<"Output Buffer Failed "<<std::endl;

filter_kernel = cl::Buffer(ctx,CL_MEM_READ_ONLY,filter_size,NULL,&err);
if(error!= CL_SUCCESS){
	std::cout<<"Output Buffer Failed "<<std::endl;

std::cout<<"filter_kernel write buffer "<<std::endl;

// Create Kernel

std::cout<<"Now try create kernel objects .."<<std::endl;

	cl::Kernel kernel(prg,"ConvH_naive",&err);
	if(error!= CL_SUCCESS)
		std::cout<<"create Kernel_naive failed 


cl::NDRange globalsize(width,height);
cl::NDRange localsize(1,1);
cl::NDRange offset(0,0);

std::cout&lt;&lt;"Enqueuing the Kernel"&lt;&lt;std::endl;
	std::cout&lt;&lt;"Failed enqueuing the Kernel"&lt;&lt;std::endl;

…Then Read buffer…n all…

But it is stopping here!!! GIving a segmentation fault!!! any one has any idea???

Where do you set the arguments of your kernel ?