- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have written a short program to manage data that runs fine the first
time. The second time I run the executable, I get the following
error message:
forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source
temp.exe 0040103C Unknown Unknown Unknown
temp.exe 00449891 Unknown Unknown Unknown
temp.exe 0043C328 Unknown Unknown Unknown
kernel32.dll 7C816FD7 Unknown Unknown Unknown
If I copy the executable to a different file name, the new executable seems to work fine for the first time too.
I am a researcher that is a self-taught programmer and use fortran primarily for data management and manipulation of large datafiles, so I'm hoping there is an easy fix that I am not aware of... (I have checked array dimensions and all seems to be fine and the program runs fine -- but only once...)
forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source
temp.exe 0040103C Unknown Unknown Unknown
temp.exe 00449891 Unknown Unknown Unknown
temp.exe 0043C328 Unknown Unknown Unknown
kernel32.dll 7C816FD7 Unknown Unknown Unknown
If I copy the executable to a different file name, the new executable seems to work fine for the first time too.
I am a researcher that is a self-taught programmer and use fortran primarily for data management and manipulation of large datafiles, so I'm hoping there is an easy fix that I am not aware of... (I have checked array dimensions and all seems to be fine and the program runs fine -- but only once...)
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would suspect an antivirus tool or some other background task. Try this. Reboot the PC into Safe Mode (F8 during the initial Windows boot screen) and then try running your program multiple times. If it then works, you have some detective work to do to figure out which of the background tasks that normally run is interfering with your program.
I don't see any way that it could be the compiler.
I don't see any way that it could be the compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks much for the quick reply. I'll give this a try over the weekend and let you know how things go.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also check you don't have the datafile open in an editor at the same time - or that you don't have an instance of your program still running in the background (or a process spawned by it) that hasn't closed down properly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First thing, turn on the /traceback and all the debugging options, at least then the error message will point you to the line with the problem.
Next check all your variables to make sure they're initialized to some value. Programs that run once and then don't the next time often have this problem.
Also make sure the first program has completely quit before you try running it again.
Also make sure your program closes all its input and output files (if any) at program end. That is, don't just do a "STOP" or "END",
Also if you open any files, use the END = and ERR = options so you can capture any missing file or read past end of file errors.
Next check all your variables to make sure they're initialized to some value. Programs that run once and then don't the next time often have this problem.
Also make sure the first program has completely quit before you try running it again.
Also make sure your program closes all its input and output files (if any) at program end. That is, don't just do a "STOP" or "END",
Also if you open any files, use the END = and ERR = options so you can capture any missing file or read past end of file errors.

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