Question

I am trying to integrate Qt with OpenCV.

Here is the example: http www opendesktop org/content/show.php/Qt+Opencv+webcam+viewer?content=89995

But the function:

 putImage(IplImage* cvimage)

is giving exit error code: 1073741819, wherever following..:

 cvimage->depth

.. is being used.

How can I prevent this error occurring?

Was it helpful?

Solution

The error number you quote in hex is 0xC0000005 which indicates an access violation in windows. An access violation means your process has tried to access memory (ie dereference a pointer) that does not belong to it. Most likely cvimage is not a valid pointer and hence dereferencing of that pointer causes your error.

Edit: A Stack overflow will cause the application to exit suddenly.

See this article for an explanation of how to write an exception handler that will tell you what the crash was.

OTHER TIPS

then maybe you don't return any value from your main function? It looks like "uninitialized value" for me

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top