Click here to Skip to main content
15,915,975 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Defrag Registry Pin
Richard MacCutchan18-Dec-09 23:29
mveRichard MacCutchan18-Dec-09 23:29 
GeneralRe: Defrag Registry Pin
Adnan56219-Dec-09 7:39
Adnan56219-Dec-09 7:39 
Questionwinsock select don´t react on incoming message Pin
CrazyDogg18-Dec-09 4:31
CrazyDogg18-Dec-09 4:31 
QuestionJNI CallVoidMethod leads to Runtime Error Pin
TheInfernalCrow18-Dec-09 4:22
TheInfernalCrow18-Dec-09 4:22 
AnswerRe: JNI CallVoidMethod leads to Runtime Error Pin
Richard MacCutchan18-Dec-09 9:21
mveRichard MacCutchan18-Dec-09 9:21 
GeneralRe: JNI CallVoidMethod leads to Runtime Error Pin
TheInfernalCrow18-Dec-09 23:53
TheInfernalCrow18-Dec-09 23:53 
GeneralRe: JNI CallVoidMethod leads to Runtime Error Pin
Richard MacCutchan19-Dec-09 3:16
mveRichard MacCutchan19-Dec-09 3:16 
GeneralRe: JNI CallVoidMethod leads to Runtime Error Pin
TheInfernalCrow19-Dec-09 4:08
TheInfernalCrow19-Dec-09 4:08 
Yes, using the class in a plain java application works just fine.

Directly in front and behind the JNI call for the void method are the following debug outputs ...

fprintf(m_debug, "calling java void method\n" );
fflush(m_debug);

m_jni_env->CallVoidMethod(jobject_instance, j_method_id,(jint)n);

fprintf(m_debug, "called java void method\n" );
fflush(m_debug);


... and the last entry in debug text file is "calling java void method".

But while playing with both, C++ and Java code to get closer to the reason of this error, I discovered that removing

this.debugOutWriter.write("testMethod called, n = " + Integer.toString(n) );
this.debugOutWriter.write("----------------------");


from the Java code solves the problem. Funny thing is, the file access does not seem to be the problem because the lines

this.debugOutWriter.newLine();
this.debugOutWriter.flush();


remain as they were and the "CR/LF"-newline is written into the file correctly. But using the write method is causing the error.

Even if this is only a debug output that won't be required in the final version, I'm still curious about it's origin.
File writing operations won't be required for real functionality, but file read operations and the Java2D framework, and I doubt that this is just a special attitude of the BufferedWriter class..
GeneralRe: JNI CallVoidMethod leads to Runtime Error Pin
Richard MacCutchan19-Dec-09 7:27
mveRichard MacCutchan19-Dec-09 7:27 
GeneralRe: JNI CallVoidMethod leads to Runtime Error Pin
TheInfernalCrow21-Dec-09 3:00
TheInfernalCrow21-Dec-09 3:00 
GeneralRe: JNI CallVoidMethod leads to Runtime Error Pin
Richard MacCutchan21-Dec-09 5:57
mveRichard MacCutchan21-Dec-09 5:57 
QuestionRelease Build to Debug Build Pin
Benjamin Bruno18-Dec-09 1:46
Benjamin Bruno18-Dec-09 1:46 
AnswerRe: Release Build to Debug Build Pin
Rajesh R Subramanian18-Dec-09 1:55
professionalRajesh R Subramanian18-Dec-09 1:55 
QuestionRe: Release Build to Debug Build Pin
David Crow18-Dec-09 2:54
David Crow18-Dec-09 2:54 
QuestionDLL appearing only after .EXE execution in temp folder, how does it works ? Pin
GuimaSun18-Dec-09 1:29
GuimaSun18-Dec-09 1:29 
AnswerRe: DLL appearing only after .EXE execution in temp folder, how does it works ? Pin
Rajesh R Subramanian18-Dec-09 1:33
professionalRajesh R Subramanian18-Dec-09 1:33 
GeneralRe: DLL appearing only after .EXE execution in temp folder, how does it works ? Pin
GuimaSun18-Dec-09 2:05
GuimaSun18-Dec-09 2:05 
QuestionMenu dropdown event in SDI application Pin
rp_suman18-Dec-09 0:23
rp_suman18-Dec-09 0:23 
AnswerRe: Menu dropdown event in SDI application Pin
Code-o-mat18-Dec-09 1:03
Code-o-mat18-Dec-09 1:03 
QuestionMSSQL USE DATABASE Pin
MsmVc17-Dec-09 22:30
MsmVc17-Dec-09 22:30 
AnswerRe: MSSQL USE DATABASE Pin
Code-o-mat17-Dec-09 23:24
Code-o-mat17-Dec-09 23:24 
GeneralRe: MSSQL USE DATABASE Pin
MsmVc17-Dec-09 23:29
MsmVc17-Dec-09 23:29 
GeneralRe: MSSQL USE DATABASE Pin
Code-o-mat18-Dec-09 0:52
Code-o-mat18-Dec-09 0:52 
GeneralRe: MSSQL USE DATABASE Pin
David Crow18-Dec-09 2:56
David Crow18-Dec-09 2:56 
GeneralRe: MSSQL USE DATABASE Pin
MsmVc18-Dec-09 17:19
MsmVc18-Dec-09 17:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.