- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Message Edited by OliverK on 03-02-2006 05:55 AM
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I gave too less information, sorry about that
strText ist declared in the FORTRAN-Module as
CHARACTER*25 strText
and I also checked that xmax is always suitable with the format specifier (i.e '(F7.2)')
Meanwhile it seems to be an installation problem of VS.NET 2003 on my computer. Because the next point is, if I try to debug the fortran dll's on my computer, I always get a message about "Unmanaged Debugging Not Available".
Using an other computer everything is working fine, also the debugging of the dll's.
Thank you very much for your help, I am going to kill my computer right now :-)
Oliver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is strText a local variable or a dummy-argument? If the latter, fixed-width declaration CHARACTER*25 smells like trouble...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hurra, my partner got the problem on his computer now too. So the problem seems to be alive. He guesses it could be the .NET-garbage collector. We will work on it. If we find a solution, I am going to post it here.
To Jugoslav: I did set the switch "Allow unmanaged debug" in the VB-project.
strText is a local variable inside the dll
I do not pass any text strings from VB.NET to the Fortran-DLL's. I have read all the mesages about passing arguments from VB --> Fortran and vice versa in that forum. It is a really good source.
I also checked my passed arguments inside the dll's using the debugger, therefore I am quite sure, that there is no mistake in passing arguments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have been trying to port some qwin subroutines from CVF 6.6c (where they work fine) to Intel V9.0 and have seen the same problem with the formatted internal write. I found that if I use a listdirect i.e. write(text,*)x instead of write(text,'(G11.4)')x it works, although I really want the text string to be formmatted. Please email me if you find a work around. In the mean time I going to write my own conversion routines.
Thank you.
Ray
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Steve.
I have been trying to reproduce this errror in a code fragment without any success. The code that I'm having trouble with is about 4000 lines long and is very convoluted, many recursive calls and a lots of pointers. I have also tried to use a formatted write statement to a scratch file and got the same error on the write but if I use list direct I don't get the error writing to the file. Give me a couple of more days to see if I can reproduce it in a code fragment, if not I will send the subroutines with a driver program.
Ray
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
... we still working on it:
We have 5 different computers:
1: Celeron D 2.8 GHz: no problems
2: Pentium 4 2.4 GHz: no problems
3: PIII 1.3 GHz: System.NullReferenceException
4: AMD XP 2400+: no problems
5: AMD XP 2500+: System.NullReferenceException
(a week ago I had the problem on #2)
-------------------------------------------------------------------
If I substitute
WRITE(strText, '(F7.2)') xmax
with (xmax is in this case xmax = 234.45)
WRITE(strText,*) 234.45
the called graphic routine works 6 times fine and crashes within the 7th-call at the internal write statement with the described System.NullReferenceException: Object reference not set to an instance of an object
If I start the program again it chrashed within the 6th call.
and once again: within the 7th call and now it occurs stable at the 7th call
What could it be? Does anybody have an idea?
Oliver
Message Edited by OliverK on 03-07-2006 07:20 AM
Message Edited by OliverK on 03-07-2006 08:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve,
many thanks for your fast reply. Here we go
VB.NET:
Declare Function SiWaProGM_DrawIsoline Lib "SiWaProGM.dll" ( _
ByRef hWnd As Integer, _
ByRef KX As Integer, ByRef x As Double, _
ByRef y As Double, ByRef z As Double, _
ByRef Normalized As Double, ByRef minNorm As Double, _
ByRef maxNorm As Double, ByRef xObs As Double, _
ByRef zObs As Double, ByRef yObs As Double, _
and the call
SiWaProGM_DrawIsoline(hOnlineFlowGrafikWnd, _
IntegerVariables, KX(0, 0), x(0), y(0), _
hNew(0), Saturation(0), minSat, maxSat, _
xObs(0), zObs(0), yObs(0), FlowIsolineControl)
in the Fortran DLL:
INTEGER FUNCTION SiWaProGM_DrawIsoline(hGrafikWnd, IntVars, KX, x, y, z, &
Normalized, minNorm, maxNorm, &
xObs, yObs, zObs, IsolineControl)
!DEC$ ATTRIBUTES DLLEXPORT :: SiWaProGM_DrawIsoline
!DEC$ ATTRIBUTES STDCALL :: SiWaProGM_DrawIsoline
!DEC$ ATTRIBUTES ALIAS : 'SiWaProGM_DrawIsoline':: SiWaProGM_DrawIsoline
!
!DEC$ ATTRIBUTES REFERENCE :: hGrafikWnd
!DEC$ ATTRIBUTES REFERENCE :: IntVars
!DEC$ ATTRIBUTES REFERENCE :: KX
!DEC$ ATTRIBUTES REFERENCE :: Normalized, minNorm, maxNorm
!DEC$ ATTRIBUTES REFERENCE :: x, y, z
!DEC$ ATTRIBUTES REFERENCE :: xObs, yObs, zObs
!DEC$ ATTRIBUTES REFERENCE :: IsolineControl
!
USE GlobalConst
USE GlobalData
TYPE (typGrafikFenster), POINTER :: Grafik
INCLUDE '..simulationsmodulparam.inc'
TYPE (typIntegerVariables) :: IntVars
INTEGER, INTENT(IN) :: hGrafikWnd
INTEGER, INTENT(IN) :: KX(IntVars%NumEl,4)
DOUBLE PRECISION:: x(IntVars%NumNP), y(IntVars%NumNP), z(IntVars%NumNP)
DOUBLE PRECISION:: Normalized(IntVars%NumNP), minNorm, maxNorm
DOUBLE PRECISION:: xObs(IntVars%NumPoints), yObs(IntVars%NumPoints), &
zObs(IntVars%NumObs)
TYPE (typIsolineControl) IsolineControl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
... still the same, after the 7th call the System.NullReferenceException occurs
I also think, that the problem is caused by a corrupted stack. The corruption occurs somewhere else in the DLL and will turn out later during the internal write to the NullReferenceException. The question is: How find the bug in the code?
I am really happy, that I am able right now to reproduce the error. So I can search for it. But on this machine (#3) the debugger is not yet available (unmanaged debugging not available).
I keep searching ....
Oliver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Debugging does not work on comupter #3 and I don't know why. I already reinstalled IF9, VS.NET 2003. But every time if I check the box "enable unmanaged debugging" (This is a translation from german --> english, I hope it meets that, what you see in the properties box of an VB.NET-project) and try to start the debugging, I get an error message "Unmanaged debugging not available".
Debugging the FORTRAN-DLL works on #2, but it don't have the problem there anymore ....
Oliver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Uninstall Intel Fortran integration into VS.NET
2. Do a Repair/Reinstall of VS.NET (Add/Remove Programs, Change/Modify)
3. Reinstall Intel Fortran integration
See what happens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve,
1.)I uninstalled the Intel Fortran integration into VS.NET
2.) I did a Repair/Reinstall of VS.NET (Add/Remove Programs, Change/Modify)
3.) I reinstalled theIntel Fortran integration
-------------------
and here are my results:
1.) debugging works fine (I should have known this, thank you)
2.) the System.NullReferenceException occurs now in my other DLL also within an internal write like
CHARACTER*255 Zeile
WRITE(Zeile, 1020)
1020 FORMAT('Der aktuelle Zeitschritt..')
---------------------------------
Meanwhile I also found the older threads on the similar topic #8647 form 04-08-2004 and I am going to try, to link again against the multithread dll.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's what I would do. I would set a breakpoint in the debugger at the Fortran routine. When the breakpoint is reached, I would note the value of the ESP register (you'll need to view the Debug..Registers window.) Then let execution continue until the breakpoint is reached again. Ideally, the ESP value should be the same each time the Fortran routine is called, assuming it is from the same location in the VB code. If it is not, that suggests a calling interface error with adjusting the stack.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page