shwets
asked on
Debug Error i386\chkesp Line 65
Hi
I am migrating my project from VS6 to VS .Net . My application uses
Jace version jace-1.1rc1_04.
The solution builds successfully in VS.Net but when I execute it , it
gives me the following error :-
/************************* ********** ********** ********** */
Debug Error :
Program : <MyApplication.exe>
Module:
File:i386\chkesp
Line:65
The value of ESP was not saved across a function call.This is usually a
result of calling a function declaredwith one calling convention with a
function pointer declared with a
different calling convention.
/************************* ********** ********** ********** */
When I debug the application it gets into the jace generated source
file and throws an exception at a function call
"staticGetJavaJniClass()".
In the call stack it shows msvcr70.dll!_chkesp().
Can anyone help me with this ? Am not sure if this error is coming due
to a new jace version or VS.Net.
cheers
I am migrating my project from VS6 to VS .Net . My application uses
Jace version jace-1.1rc1_04.
The solution builds successfully in VS.Net but when I execute it , it
gives me the following error :-
/*************************
Debug Error :
Program : <MyApplication.exe>
Module:
File:i386\chkesp
Line:65
The value of ESP was not saved across a function call.This is usually a
result of calling a function declaredwith one calling convention with a
function pointer declared with a
different calling convention.
/*************************
When I debug the application it gets into the jace generated source
file and throws an exception at a function call
"staticGetJavaJniClass()".
In the call stack it shows msvcr70.dll!_chkesp().
Can anyone help me with this ? Am not sure if this error is coming due
to a new jace version or VS.Net.
cheers
>>When I debug the application it gets into the jace generated source
>>file and throws an exception at a function call
>>"staticGetJavaJniClass() ".
Usually, this points to a calling convention mismatch, i.e. calling a '__cdecl' function with a '__stdcall' declaration or vice versa. An other option is a different parameter count between the declaration and the actual implementation.Did you update/regenerate all header files also?
>>file and throws an exception at a function call
>>"staticGetJavaJniClass()
Usually, this points to a calling convention mismatch, i.e. calling a '__cdecl' function with a '__stdcall' declaration or vice versa. An other option is a different parameter count between the declaration and the actual implementation.Did you update/regenerate all header files also?
ASKER
I tried debugging it and it fails at the return statement of the foll function:-
const JClass* InteractiveSalesServer::st aticGetJav aJniClass( ) throw ( JNIException )
{
static JClassImpl javaClass( "com/citi/tcmt/fox/service /deal/XYZ" );
string str = javaClass.GetName();
return &javaClass; /*Throws exception here*/
}
This code snippet is from a jace generated cpp file which is called by my applicaltion. It is being called from another jace generated function
virtual const ::jace::JClass* getClass()
{
return T::staticGetJavaJniClass() ;
}
cheers
const JClass* InteractiveSalesServer::st
{
static JClassImpl javaClass( "com/citi/tcmt/fox/service
string str = javaClass.GetName();
return &javaClass; /*Throws exception here*/
}
This code snippet is from a jace generated cpp file which is called by my applicaltion. It is being called from another jace generated function
virtual const ::jace::JClass* getClass()
{
return T::staticGetJavaJniClass()
}
cheers
ASKER
Yes I regenerated all the header files . It wouldn't even compile without that.
>>Yes I regenerated all the header files . It wouldn't even compile without that.
But have you tried a ReBuildeAll?
But have you tried a ReBuildeAll?
ASKER
yup. done that many times.
Could you post the declaration of 'const JClass* InteractiveSalesServer::st aticGetJav aJniClass( ) throw ( JNIException )'?
ASKER
static const JClass* staticGetJavaJniClass() throw ( JNIException );
Stupid Q - are you copying the new binaries to the right place (and registering them correctly, if required)? Maybe you're still using an old version that causes that error.
ASKER
Not actually a stupid question , happens pretty often thats why am working on a fresh build & I have cross checked the version of libs/dlls my executable is picking on dependency walker.
The problem is it doesn't even give me a linker error , It links with some warnings and fails on execution.
It fails even before the application loads properly.
The problem is it doesn't even give me a linker error , It links with some warnings and fails on execution.
It fails even before the application loads properly.
>>It links with some warnings
Which warnings exactly?
Which warnings exactly?
ASKER
warning LNK4204: 'z:\.....\debug\vc70.pdb' is missing debugging information for referencing module; linking object as if no debug info
Well, see http://msdn2.microsoft.com/en-US/library/5ske5b71.aspx on this warning. Especially "The .pdb file has an erroneous signature" makes me think that something like that *could* be the reason for your problem, even though I first thought you could jut ignore the warning.
ASKER
Got rid of the warnings too , but am still getting the error.
ASKER
Finally fixed this problem. I had to change the following project setting:-
C/C++ tab -> General -> Detect 64-bit Portability Issues = Yes[/Wp64].
C/C++ tab -> General -> Detect 64-bit Portability Issues = Yes[/Wp64].
That should not affect the code generation. Odd.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I would try putting trace statements in different main points of your code, so you can narrow down what section of the code is causing the problem.