NullReferenceException while tracking

Oct 14, 2008 at 1:08 PM

I'm getting a NullReferenceException in my application.
I created a marker image using the demo and stored it on disk. Then I included the image (and the marker data) in my application as a resource. After that, I included the touchless-tracking in my application using the following code:

mgr = new TouchlessMgr();           
mgr.CurrentCamera = mgr.Cameras[0];
_width = mgr.CurrentCamera.CaptureWidth;
_height = mgr.CurrentCamera.CaptureHeight;
Marker marker = mgr.AddMarker("testmarker", Resources.image, new System.Drawing.Point(99, 84), 19.5f); // this is the markerdata created in the demo application.
marker.OnChange += new EventHandler<MarkerEventArgs>(Marker_OnChange);   

Well, the tracking works fine for some seconds, but then it stops and I get a NullReferenceException. Unfortunately, I do not get any more information about the source of the exception.

Is this a known problem and is there a workaround?!

Oct 14, 2008 at 9:01 PM

false alarm.

I had a GC issue in which my object was collected when it should not be. So far, everything is working now!