JNI fatal error when calling GetStringChars
I'm trying to write a native function for  

    protected static native boolean _connect(String user, String password,
	                                         String machine) throws Exception;

The implementation goes like this:  

    JNIEXPORT jboolean JNICALL Java_jniprint__1connect
    (JNIEnv *env, jclass clazz, jstring _machine, jstring _user, jstring _pass)
    {
	cout << "Connecting !!!!!!!!" << endl;
	const jchar *machine = env->GetStringChars(_machine, JNI_FALSE);	
	cout << "after machine!!!!!!!!" << endl;
	return JNI_FALSE;
    }

It works perfectly when the _machine parameter is not null, when it is null - jvm crashes violently


 A fatal error has been detected by the Java Runtime Environment:  

  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d96019f, pid=16444, tid=10744  

 JRE version: 6.0_30-b12  
 Java VM: Java HotSpot(TM) Client VM (20.5-b03 mixed mode, sharing windows-x86 )  
 Problematic frame:  
 V  [jvm.dll+0xa019f]  
...

Whats going on?

JNI fatal error when calling GetStringChars
===

I'm trying to write a native function for  

    protected static native boolean _connect(String user, String password,
	                                         String machine) throws Exception;

The implementation goes like this:  

    JNIEXPORT jboolean JNICALL Java_jniprint__1connect
    (JNIEnv *env, jclass clazz, jstring _machine, jstring _user, jstring _pass)
    {
	cout << "Connecting !!!!!!!!" << endl;
	const jchar *machine = env->GetStringChars(_machine, JNI_FALSE);	
	cout << "after machine!!!!!!!!" << endl;
	return JNI_FALSE;
    }

It works perfectly when the _machine parameter is not null, when it is null - jvm crashes violently


 A fatal error has been detected by the Java Runtime Environment:  

  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d96019f, pid=16444, tid=10744  

 JRE version: 6.0_30-b12  
 Java VM: Java HotSpot(TM) Client VM (20.5-b03 mixed mode, sharing windows-x86 )  
 Problematic frame:  
 V  [jvm.dll+0xa019f]  
...

Whats going on?
