-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullReferenceException in LargeArrayPool.cs line 36 #754
Comments
Happens to me too, but only on rare occasions. I'm using SDK version 1.3.0 from the nuget package. Camera firmware is all the same as the original post. |
Same here, on rare occassion I end up in this code:
x.isAlive will be true for the if condition but by the time the buffer assignment happens isAlive is false and Target is null. Seems like there is a thread safety issue here. |
I've just had this problem and it was due to the garbage collector being called on another thread after the x.IsAlive test and before buffer is assigned. My fix was to test if buffer is null before using it (which according to the WeakReference docs is a valid test - also see https://stackoverflow.com/questions/1687045/thread-safety-of-weakreference) |
…other thread after the x.IsAlive test and before buffer is assigned. The fix is to test if buffer is null before using it. (refer to https://stackoverflow.com/questions/1687045/thread-safety-of-weakreference)
* Fix for issue #754. Garbage collector can being called on another thread after the x.IsAlive test and before buffer is assigned. The fix is to test if buffer is null before using it. (refer to https://stackoverflow.com/questions/1687045/thread-safety-of-weakreference) * Fix crash when calling k4a_device_get_installed_count(), libusb_get_device_list() can return a negative number on some machines which would crash usb_cmd_get_device_count().
Describe the bug
To Reproduce
I get depth images from the sensor and use a transform to create the point cloud from the depth image. The code looks like the following:
This works for some time but eventually throws the NullReferenceException.
Expected behavior
No NullReferenceException
Desktop (please complete the following information):
Current Firmware Versions:
RGB camera firmware: 1.6.102
Depth camera firmware: 1.6.75
Depth config file: 6109.7
Audio firmware: 1.6.14
Build Config: Production
Certificate Type: Microsoft
The text was updated successfully, but these errors were encountered: