View previous topic :: View next topic |
Author |
Message |
joylove1978
Joined: 19 May 2015 Posts: 3 Location: United Kingdom
|
Posted: Wed May 20, 2015 2:01 pm Post subject: Fortran DLL is crashing |
|
|
Hi,
I have Fortran dll that is crashing when I call one of it's functions, and I'm not sure why.
It's actually crashing within salflibc.dll, it seems to to calling something that isn't there (you can see the callstack in the screenshot).
I've had a look with dependency walker to try and figure out what's missing, but I'm clueless when it comes to this (I've been googling for a solution for the past few hours).
Any ideas what my problem is here? Thanks v much.
Dom
Callstack:
Dependency walker:
[/img] |
|
Back to top |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1899
|
Posted: Wed May 20, 2015 4:24 pm Post subject: |
|
|
If the routine in your Fortran DLL has corrupted the stack, the information in the stack trace is not reliable.
The information you have given is too sparse to indicate what/where the problem lies. Can you recompile/rebuild with the /DEBUG compiler and reproduce the problem with the debug build? What is the name of the DLL, and what is the routine within the DLL that you called? How big is the Fortran source of the DLL code? |
|
Back to top |
|
 |
joylove1978
Joined: 19 May 2015 Posts: 3 Location: United Kingdom
|
Posted: Thu May 21, 2015 1:52 pm Post subject: |
|
|
Thanks for the reply.
I think I found the cause of the issue. It looks like it's because of the allocate() calls in the Fortran code. When I run the subroutine without any allocate()s, it seems to run ok. Is this expected? Do I need to provide an alllocator to the dll or something?
Thanks |
|
Back to top |
|
 |
joylove1978
Joined: 19 May 2015 Posts: 3 Location: United Kingdom
|
Posted: Thu May 21, 2015 2:50 pm Post subject: |
|
|
Ignore the last reply, that was a red herring.
The problem was with some files that weren't being loaded correctly (they were't in the directory that the calling application was expecting).
Thanks |
|
Back to top |
|
 |
|