Friday, April 18, 2014

Forum posting on the existence of a serious contempt


Forum posting, I have one word for word Qiaowan posting content. But this time I did not have a post Results posted.
Click on the posting time, unable to go, this time I'm ready to send the content will post all cleared.

1, I have no statement posted posts, not because it was not given the answer statement posted
2, if the forum had finished the posts are knot, you can post messages, then you tips on tips, I'm unable opinions unable to go. Why not put the content of my posts Qingdiao it? I knock each word content is very easy! ! ! !
3, if you have to clear the content of the post, why not see anywhere tips, this operation will result in the removal.
4, if it is a BUG, ​​he should exist for a long time now, long before I have encountered this problem, but now actually there.
5, this is the case, a very serious impact on the mood, ah, this is too pit father of it.

Some brothers encounter this problem, be sure to top.

Finally, I put my problems say something,
JNI call JAVA layer method.
/ / JAVA
public class JNITest
{
public static native void Test (TestInterface testInterface);
public interface TestInterface {
public void DoTest ();
}
}
JNITest.Test (new TestInterface () {
public void DoTest () {
}
})
I want to call JNITest.Test pass an object, then go through the callback method DoTest this object.
/ / JNI
I got a problem when TestInterface.
1, can be obtained if you use GetObjectClass TestInterface of jclass, can callback DoTest way, but I was out of question in multiple threads. I have two threads are calling JNITest.Test, but only one can be the callback DoTest. Another callback unsuccessful.
2, I now want to use to get TestInterface FindClass the jclass, but I have tried many ways to get are empty, all said no class.
(* Env) -> FindClass (env, "Lcom / test / JNITest / TestInterface;");
(* Env) -> FindClass (env, "Lcom / test / JNITest $ TestInterface;");
(* Env) -> FindClass (env, "com / test / JNITest / TestInterface");
(* Env) -> FindClass (env, "com / test / JNITest $ TestInterface");
FindClass not in the main thread which called, and this should be okay. Just under $ online search is used to find a subclass that find use interface object what to do?
If the class should also get his first problem is the problem of multiple threads callbacks.
Hand knock code, there may be a problem writing, wish to express clearly.
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Open the page are prompted to create the post, rather than posting when prompted click. .
Could you delay too much?
Reply:
I really click submit reply when pop up. My network is normal, I generally take a look into the forum are those posts I did not end, then go browse. Out again posting. . . This really is CSDN the BUG. Just not one hundred percent arise.

I have this problem. I have solved. . Written in C language JNI calls should use
FindClass(* Env) -> FindClass (env, "com / test / JNITest $ TestInterface");
Others are not available.
Then multithreaded following words, it can save a global jclss can be directly used.
My reason for this problem is that a call is successful is due to an unsuccessful call, I had to write a canSend inside the interface function, then I deleted, and then I JNI which corresponds GetMethodID forget deleted. . So this has led to the BUG. Specifically for what reason is unclear.

No comments:

Post a Comment