View previous topic :: View next topic |
Author |
Message |
calum.finlayson
Joined: 06 Feb 2008 Posts: 9 Location: edinburgh
|
Posted: Thu May 01, 2008 10:33 am Post subject: Intermittent debugger crash as I step from C# into FTN95 |
|
|
I got the following message as soon as I tried to step over the boundary from C# into the fortran environment :-
CallbackOnCollectedDelegate was detected
A callback was made on a garbage collected delegate of type 'ftn95lib.mdl!Salford.Fortran.RTLibrary+clearwin_callback::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.
Sliverfrost Fortran was integrated with Microsoft Visual Studio 2005
The fortran code is contained in a DLL which is visible to the C# application.
The help on MDAs talks about ...isolating hard-to-find application bugs that occur when transitioning between managed and unmanaged code...
The following Fotran compiler options were used to create the DLL
/DEBUG/SINGLE_THREADED/FPP
linker switch
/NOT_SEALED
Can anyone help ?
Regards
Calum Finlayson |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8208 Location: Salford, UK
|
Posted: Thu May 01, 2008 11:59 am Post subject: |
|
|
You do not say if this is something that you have managed to do in the past or if you are using the debugger in a new way.
I do not know what is causing the problem but there is no reason to think that a change in the command line options will make any difference...
/DEBUG is needed and can be upgraded to /CHECKMATE.
/SINGLE_THREADED has no effect unless used with /LINK, even then it is the default linker option.
/FPP has no effect unless you are using preprocessing directives.
/NOT_SEALED should make no difference.
In short, only /DEBUG is relevant and normally /CHECK or /CHECKMATE is preferred. |
|
Back to top |
|
 |
Abhishek
Joined: 22 Dec 2010 Posts: 28
|
Posted: Fri Jan 14, 2011 1:04 pm Post subject: |
|
|
I am getting the same error. I am using FORTRAN .NET dll called by VB .NET dll.
The error is obtained randomly during debugging session - sometimes it comes up and sometimes doesnt ... and obtained when VB .NET control passes to first FORTRAN function.
I am using shared functions to call FORTRAN functions, and FORTRAN functions are also shared - so there doesnt seem to be a possibility of something going out of scope.
Any directions ?
Thanks
Abhishek |
|
Back to top |
|
 |
GoldenHeat
Joined: 13 Jul 2011 Posts: 6
|
Posted: Thu Jul 14, 2011 9:11 pm Post subject: |
|
|
Bump-
I am looking for some FORTRAN direction as well, just thought if a thread bump could help get this thread finished off. I have been getting a lot of questions from my readers and potential customers about FORTRAN and unfortunately this isn't one of the things I can make look pretty with my email marketing software or a video converter. I actually have to have an answer of my own not just a video from YouTube. |
|
Back to top |
|
 |
|