replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Mystery Crash?
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 

Mystery Crash?

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



Joined: 06 Jul 2008
Posts: 111
Location: San Diego

PostPosted: Wed Feb 18, 2009 2:36 am    Post subject: Mystery Crash? Reply with quote

I've started writing a new program in fixed-format FTN95. It puts up a window with various menus and menu entries, and several buttons, display boxes, and an edit box. The buttons and menu entries mostly have dummy functions for now, that don't do anything, just placeholders for now.

When I run it, it seems to work correctly, but then at the end either locks up or crashes with a gruesome error message, saying that the program tried to access location xxxxxxxxx with a bunch of traceback information. No line numbers are indicated in the error messages, it seems to be referring to machine locations.

When I run this program under Windows 2000, it does the above and locks up. Won't respond, so when I click on the X in the upper right corner of the window it creates, it says the program is not responding, and would I like to shut it down? Clicking YES results in a shutdown.

But when I run it on Vista 64-bit version, it does the above, and then I get the gruesome error message with traceback info.

And the oddest thing is, when I put a WRITE(6,2010) print statement in a certain place near the end of the code, with an appropriate FORMAT statement, suddenly everything works perfectly. The WRITE statement causes a big white window to appear, with the stuff I want written in it, as expected. And the program seems to terminate normally, with no lockup, error messages, etc., on both Win2000 and Vista64, when that WRITE statement is in place.

Any of this sound familiar? Neither the lockup (Win2000) or gruesome error message (Vista64) help me much.

I can send the FTN95 code for examination if you like, might help diagnosis. It's only about 17K of text now, though later I intend it will be much bigger.

Puzzled in California,
Steve
Back to top
View user's profile Send private message
Little-Acorn



Joined: 06 Jul 2008
Posts: 111
Location: San Diego

PostPosted: Thu Feb 19, 2009 3:13 am    Post subject: Reply with quote

I've ZIPped the fortran program into a compressed file, it's 5,097 bytes long. Is there a way I can attach it here? Might be handy for diagnostic purposes.

If not, it can be found at:
http://www.Little-Acorn.com/html/Simxaa_for.zip

In this version, the extra WRITE(6,2020) statement I mentioned, is commented out. So this one crashes under WIN2000, and locks up under Vista64.

The WRITE(6,2020) statement is at line 272 of the program. It's the last executable statement before the end of SUBROUTINE CREATMAINWIN, just before the beginning of SUBROUTINE writstat.

If you remove the letter C in column 1 of this WRITE(6,2020) statement, the program will run without crashing, and terminate normally.

I wish I knew why.

Thanks for your help!!
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 506
Location: Sunderland

PostPosted: Thu Feb 19, 2009 1:55 pm    Post subject: Reply with quote

Hi,

I had a quick look and set a compiler option of:
"Set Global SAVE"

I ran it on Windows 2000. I'm sure it is not that simple.


The help states

"WINAPP must be the first compiler directive in the file and must appear before the main program."

You had it after the "program" statement - Not that it seems to make much difference.

Regards

Ian
Back to top
View user's profile Send private message Send e-mail
Little-Acorn



Joined: 06 Jul 2008
Posts: 111
Location: San Diego

PostPosted: Thu Feb 19, 2009 3:58 pm    Post subject: Reply with quote

Thank you, Ian.

As you pointed out, it's probably not that simple. I moved the WINAPP statement to the first line, before the PROGRAM line, recompiled and ran again (without the WRITE(6,2020) statement). I ran it on my Vista64 system. Same result - it seemed to run correctly to nearly the end, putting up the expected window with buttons etc., and then crashed with the gruesome error message.

I've captured a screenshot of the error message window and saved it as a JPG file at:
http://www.Little-Acorn.com/pics/CrashDiag00.jpg

Does it have any useful information for a knowledgeable person (which I am not)?

Again, this latest run (and errror message) was on a Vista 64-bit OS system.

Thanks again for your help!
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 506
Location: Sunderland

PostPosted: Thu Feb 19, 2009 5:10 pm    Post subject: Reply with quote

Steve,

On the few occasions that I get messages such as that (he lied), I normally get the line number and the name of the Fortran file in the trace back. Here are a few questions:

1. What is your compile command?
2. Are you using Plato or Visual Studio.
3. Have you used Checkmate or Win32 debug?
4. Did you switch on the global save for compilation.

Regards

Ian
Back to top
View user's profile Send private message Send e-mail
Little-Acorn



Joined: 06 Jul 2008
Posts: 111
Location: San Diego

PostPosted: Thu Feb 19, 2009 5:53 pm    Post subject: Re: Reply with quote

IanLambley wrote:
Steve,

On the few occasions that I get messages such as that (he lied), I normally get the line number and the name of the Fortran file in the trace back.

Yes, so do I, normally (and it's very normal for me Smile . And that line number makes it easy to find the problem. It's because I didn't get such a line number this time, that I started whining and asking for help.

Quote:
Here are a few questions:

1. What is your compile command?

I start Plato, load the .for file, and then click the menu item Build/Start Run.

Quote:
2. Are you using Plato or Visual Studio.

Plato.

Quote:
3. Have you used Checkmate or Win32 debug?

Not familiar with them, sorry. There have been times (in other programs) when I surely could have used a way to check bounds on array subscripts, and do other such things. Will these do that?

Quote:
4. Did you switch on the global save for compilation.

Also not familiar with that. I've been in "jump in and then learn to swim" mode from the beginning here, and I've certainly missed many of the finer points of usage for this system. (By contrast, my first FORTRAN programs were typed on punched paper cards, praised be the gods of WATFIV. They were run on an IBM 360/91 with core-plane memories). How does one use Global Save?

Thanks!
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 506
Location: Sunderland

PostPosted: Thu Feb 19, 2009 6:24 pm    Post subject: Reply with quote

In Plato, at the top is a pull down box, containing things such as:
Checkmate win32
Debug Win32

Try selecting the latter for now.

Select the "Project, properties" command and under the "Compiler Options, Language", check the "Set global SAVE" option

In Diagnostics, switch on List files and the compilation listing for each .for/.f95 source file will be output as a .lis, which includes lots of information, such as all the options used in the compilation and warning/error messages.

Have a look at these and try a few options.

Regards

Ian
Back to top
View user's profile Send private message Send e-mail
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Thu Feb 19, 2009 11:14 pm    Post subject: Reply with quote

I tried compiling in a dos box, using /check.
It crashed for me and did not give the file/line address in the call back list.
This information must be being corrupted with the bug that exists somewhere in your program.
Try reducing some array sizes
Back to top
View user's profile Send private message
Little-Acorn



Joined: 06 Jul 2008
Posts: 111
Location: San Diego

PostPosted: Thu Mar 12, 2009 6:31 am    Post subject: Re: Reply with quote

IanLambley wrote:
In Plato, at the top is a pull down box, containing things such as:
Checkmate win32
Debug Win32

Try selecting the latter for now.

Done! Smile

Quote:
Select the "Project, properties" command

I clicked on Project at the top of the window, and a box dropped down with a number of options, the bottom one was "Properties". But it was greyed out, as were all the other options except "Add References..." which was black. Trying to click on "Properties" elicited no response, needless to say.

How can I get the "Properties" option in this menu, to show up as black and clickable?

(Sorry it's been so long, many priorities being juggled, not always successfully.)

BTW, I'm using the free version of Silverfrost, the one that puts up the litle banner for a short time at every RUN. Also Plato version 4.10. Does this one have the same diagnostic etc. features as the paid-for version?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Thu Mar 12, 2009 8:31 am    Post subject: Reply with quote

You need to create a project in order to set its properties.
However, you can select Checkmate etc without creating a project.

You get everything in the free version of FTN95 etc. The only difference is that the free version gives you the niggle banner in the hope that you will get tired of seeing it.
Back to top
View user's profile Send private message AIM Address
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