SimpleViewer error

225 views
Skip to first unread message

Kenneth Ng

unread,
Mar 1, 2012, 2:00:04 AM3/1/12
to unitykinect
I have downloaded the ZigFu Unity3D legacy bindings from this site
(http://zigfu.com/legacy.html) and imported onto an empty project. I
tried the SimpleViewer scene that has been given in the package and I
tried to run it in my editor (By the way, i'm using Unity 3.4 on a
Windows 7 x64 OS). But the project gave me quite a few errors. I'll
try to list them down below:

Error opening OpenNI context: xnContextRegisterForShutdown

NullReferenceException: Object reference not set to an instance of an
object
OpenNIImagemapViewer.Start() (at Assets/OpenNI/scripts/
OpenNIImagemapViewer.cs:26)

NullReferenceException: Object reference not set to an instance of an
object
OpenNIImagemapViewer.Start() (at Assets/OpenNI/scripts/
OpenNIImagemapViewer.cs:27)

NullReferenceException: Object reference not set to an instance of an
object
OpenNIDepthmapViewer.FixedUpdate() (at Assets/OpenNI/scripts/
OpenNIDepthmapViewer.cs:128)

NullReferenceException: Object reference not set to an instance of an
object
OpenNIImagemapViewer.FixedUpdate() (at Assets/OpenNI/scripts/
OpenNIImagemapViewer.cs:52)

I am using a pretty old version of OpenNI (v1.0.0.25), NITE
(v1.3.0.17) and Avin2 sensor Kinect and I'm concerned that my previous
Kinect projects that did not use the ZigFu Unity Wrapper would not
work with newer versions of the driver. Previously I have tried
running the NISimpleViewer.exe sample and it used to work but now it
said that Memory Allocation failed. So, is it necessary for me to
uninstall my old OpenNI drivers and install the new ZDK plugin just
released (http://www.zigfu.com) in order to solve the errors stated
above? Is there any other solution to the problem? Would appreciate
your help.

Thanks!

Regards,
Kenneth

Ben Chang

unread,
Mar 4, 2012, 2:46:39 PM3/4/12
to unity...@googlegroups.com
When I've gotten that NullReferenceException it's usually been because it can't initialize the driver or it thinks the device isn't plugged in.  Updating the driver and zigfu versions would be my first move.  Upgrading your openni/nite shouldn't break any old code.

Kenneth Ng

unread,
Mar 16, 2012, 12:49:54 AM3/16/12
to unitykinect
I have tried installing your latest zigfu plugin and now I couldn't
get my older projects to work even though I managed to get the OpenNI
bindings and the ZigFu Unity3D to work. It gave me all the
NullReferenceException Error referencing the UnityInterface.dll files
I have stored in the project folder as instructed by the website
below. All those old projects used to work before i installed the
zigfu plugin. The websites for the old Unity Kinect wrapper and openni
+ NITE versions are shown below:

http://wiki.etc.cmu.edu/unity3d/index.php/Microsoft_Kinect_-_Open_NI

Roee Shenberg

unread,
Mar 16, 2012, 1:03:47 AM3/16/12
to unity...@googlegroups.com
The CMU wrapper is built for a really old versions of OpenNI and NITE (no calibration-free) - the new version of OpenNI probably has breaking API changes...
Reply all
Reply to author
Forward
0 new messages