Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29278 Discussions

Java C F90 Mixed Mode Sharing Crash

pecan204
Beginner
688 Views
Steve,
Can you please help. I have tried everything and I go from one error to another.
There is a libifcormd.dll error and problematic frame seen in screen shot. I can't tell if its a setting or logic. As seen in the jpg a java class calls a c dll which in turn calls a f90 dll with a pipe. The pie connects there is data then it blows.
This had previously run through to the end of the F90 dll. So I don't think it is the java.
Thanks
Ken
0 Kudos
3 Replies
Steven_L_Intel1
Employee
688 Views
I don't see anything in the message that suggests a fix. All I can think of is that you should make sure that the calling conventions are consistent from Java to C++ to Fortran. You may also want to do some validation of the arguments as passed to the Fortran DLL.

Is the C++ DLL built as multithread?
0 Kudos
pecan204
Beginner
688 Views

Yes the C dll is built as multi threaded.The f90 is multithreaded dll also

I have a version from two weeks ago that was working almot all the way through( it stopped due to the extent of the programming). UnfortunatelyI don't have the build setup as it wasanymore.

I looked at the working c dll with PE explorer and some differences are: There is no imported user32.dll in the versions that crash. Also the exports do not have an @8 or 12, or 16 following the method.

There is also a cppdebugHook in the one that worked.

Can youconfirm with you below, is for a c dll with a f static lib setup

extern "C" void dllName

and below should be for c dll with f dll ?

extern "C" __declspec(dllimport) void dllName

The problematic frame error indicates C [libifcoremdd.dll+0x3bd9a]

Do you know if maybe that dll is not being accessed in the build such as not having the correct library paths?

Thanks

Ken

0 Kudos
Steven_L_Intel1
Employee
688 Views
The declarations look right to me. I suspect there is data corruption occurring which could cause the run-time library (libifcoremd.dll) to fail. Tracing this can be quite difficult as the error could have occurred almost anywhere. It would be helpful if you can determine where in your DLL the failure is occurring. You could, for example, set a debug executable path in your DLL project options that starts the Java program (or whatever), and set a breakpoint in your DLL and step through it. That is the approach I would take. You would of course need a debug build for this.
0 Kudos
Reply