JNI obj_pixels is now a GlobalRef rather than a LocalRef. Added a few asserts