Fix 2101425: Camera crashes spontaneously in preview.

The problem is we missed an "obj" parameter while calling
postEventFromNative (which put it in a field of a Message object),
so a garbage value on stack is used.

When the GC tries to follow that "obj" field, expecting to find
another object, it crashes.
This commit is contained in:
Chih-Chung Chang
2009-09-24 15:29:35 -07:00
parent a30071273a
commit 6157de0e2d

View File

@@ -112,7 +112,7 @@ void JNICameraContext::notify(int32_t msgType, int32_t ext1, int32_t ext2)
}
JNIEnv *env = AndroidRuntime::getJNIEnv();
env->CallStaticVoidMethod(mCameraJClass, fields.post_event,
mCameraJObjectWeak, msgType, ext1, ext2);
mCameraJObjectWeak, msgType, ext1, ext2, NULL);
}
void JNICameraContext::copyAndPost(JNIEnv* env, const sp<IMemory>& dataPtr, int msgType)