| JRevor (147) | |||||||
|
Hello, At the moment, I'm working on a university project that uses the OpenNI kinect library, to do image processing. I'm having the following problem The code is a modification of an existing project, which works perfectly. It has a series of global variables declared on main.cpp
The class imgProc reunites all the image processing functions. In order to do that, we need to use the global variables in main.cpp, so I did the following. in imgProc.h
in imgProc.cpp
Now, on main.cpp i do imgProc p(g_depth, g_image);The code compiles properly. However, I obtain the following error executing the application Uncontrolled exception in 0x654ed455 in NiSimpleViewer.exe (The executable file) : 0xC0000005: access infraction reading 0x00000050 (Sorry if the translation isn't perfect, the error was in spanish ) Thanks in advance for your help | |||||||
|
|
|||||||
| JRevor (147) | |||||
|
Looks like I can't do this either (Note : on imgProc.h i've declared extern DepthGenerator g_depth;) on imgProc.cpp
I've also done the following test
and both numbers are equal (and not null) , which means I'm not accessing a pointer set to null. What could be happening here? | |||||
|
Last edited on
|
|||||
| JRevor (147) | |
|
First of all, sorry for the tripe post. Eventually, I decided to scrap the code and work C-style. (no objects. Instead, it's just a library of independent functions) Not the smartest choice, but I'm in a bit hurry with this project. If by chance, anybody happens to find the answer, i'd love to hear it. | |
|
|
|