- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting a crash on a write statement that I don't understand. Any help appreciated.
The code crashes when allocating memory on the heap it appears. The line in question is the first executable line in routine WRSTAT
character*13 VALUE,VALUE2
real val,val2
WRITE(VALUE,100)VAL
100 format(1pG13.6)
All default REAL are 64 bits as are all default INTEGERS via compiler option. The call stack is shown in the attached picture:
I suspect it may be something else wrong elsewhere in the code, but maybe someone can spot something here I have missed.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Most likely something corrupted memory elsewhere in your program. Doing a Memory Analysis run under Intel Inspector XE might be illuminating. Errors such as this are rarely caused by code where the error appears.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is kind of strange that the argument list in the call stack for WRSTAT isn't correct. There should be 3 arguments plus the hidden string length.
SUBROUTINE WRSTAT(routine, val,val2)
character*(*) routine
real val,val2
And I haven't found anything else that looks misdefined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not exactly sure how to interpret the call stack here, but I see what looks like three arguments. However, I suggest ignoring that.

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