• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

Révisioncfd78ff5fc7f41b4e4abc04d3690d347644e0bdb (tree)
l'heure2009-12-01 15:27:03
AuteurChih-Chung Chang <chihchung@goog...>
CommiterWu-cheng Li

Message de Log

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.

Cherry-pick from Eclair.

Change Summary

Modification

--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -112,7 +112,7 @@ void JNICameraContext::notify(int32_t msgType, int32_t ext1, int32_t ext2)
112112 }
113113 JNIEnv *env = AndroidRuntime::getJNIEnv();
114114 env->CallStaticVoidMethod(mCameraJClass, fields.post_event,
115- mCameraJObjectWeak, msgType, ext1, ext2);
115+ mCameraJObjectWeak, msgType, ext1, ext2, NULL);
116116 }
117117
118118 void JNICameraContext::copyAndPost(JNIEnv* env, const sp<IMemory>& dataPtr, int msgType)