forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Access Violation on STOP

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
dgurok



Joined: 26 May 2011
Posts: 66

PostPosted: Fri Feb 05, 2016 9:37 am    Post subject: Access Violation on STOP Reply with quote

Dear Paul,

in one of our applications we get an access violation when we try to close the application while using STOP. For testing we have compiled all sources with option /undef but the application works fine. Only when we try to close the application the problem occurs. STOP/END is the last code sequence of the program.



Do you have an idea what the problem could be?

We use FTN95 Ver. 7.10.0

:edit

We have figured out that this problem has something to do with WINIO using %HW, %LW and OPEN_TO_WINDOW@. The code is very old but until now we had no problems with it. Maybe OPEN_TO_WINDOW@ is not needed in our case no more...

In the debbuger the problem does not occur. It happens most of the time during run time. Very strange behavior.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Feb 05, 2016 5:04 pm    Post subject: Reply with quote

This looks like the problem you get when the return code path is no longer available. Explaining it simply (which is the way I understand it!) if you have

ii = winio@ ....

and ii is a local variable, then it may no longer be a valid place to put the winio@ exit code as everything shuts down - including the window accepting fortran output.

My solution when I had a similar problem was to SAVE things, either whole blocks of subroutines, or just the return variables, or put them in COMMON blocks. Which you choose depends on your programming style. If you use lots of local variables, the the compiler SAVE option may not be helpful.

You might just need to explicitly close down that window by finding its handle and operating on that.

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group