why printf method makes mistake in jni?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Wang_Yue
Posted On:   Thursday, May 15, 2008 10:10 PM

JNIEXPORT jstring JNICALL Java_playaudio_BeatTrack_myBeatTrack (JNIEnv *env, jobject obj, jstring wavfile) { const char* filename = env->GetStringUTFChars(wavfile,0); printf("the jni call beattrack!"); return env->NewStringUTF(filename); } the printf makes mistake when I run it in the java, the mistake is follows # An unexpected error has been detected by Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x488b3174, pid=9304, tid=7152 # # Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing windows-x86) # Problematic frame: # C 0x488b31   More>>


			

JNIEXPORT jstring JNICALL Java_playaudio_BeatTrack_myBeatTrack
(JNIEnv *env, jobject obj, jstring wavfile)
{
const char* filename = env->GetStringUTFChars(wavfile,0);
printf("the jni call beattrack!");
return env->NewStringUTF(filename);
}



the printf makes mistake when I run it in the java, the mistake is follows






# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x488b3174, pid=9304, tid=7152
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing windows-x86)
# Problematic frame:
# C 0x488b3174
#
# An error report file with more information is saved as:
# D:programsplayAudiohs_err_pid9304.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)

   <<Less
About | Sitemap | Contact