- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran a program and got the error message of
forrtl: severe (157): Program Exception - access violation
By running the Debug configuration, I can see the statement on which the error occurred. When I add or delete a couple of write statements, that location of violation moved to an earlier or later statement.
It seems that this kind of error occurred to me before when the stack size is a little short. For the current application, I know I need a stack size of less than 10,000,000 before. This time, I kept on increasing the stack to 50,000,000 and I still got the error of access violation.
Please help.
Wen
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An access violation happens when you try to access memory that is not allocated to your program. So this indeed can happen when you overun your stack, but it can also happen if you have a coding error in your program. You might try adding the /check switch to your command line options to add some runtime checking to your application that might give you heads on the cause. If you feel it might be a stack issue you can address it by increasing stack size or reducing the compilers use of the stack. This article outlines the details.
If these are not solutions you may need to try to debug your application to determine the cause of the error.
If these are not solutions you may need to try to debug your application to determine the cause of the error.
------
Wendy
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