Topic: Fwin.exe not responding

Using Win 7 and running unregistered SF Ver 2.20 on this desktop machine

Using code that I know compiles clean,
Build Now works OK and no Target.exe processes are shown in TaskManager
Launch Fails and Task Manager now show 3 Target.exe processes.
One can be deleted and the other two cannot be deleted.
To remove the other two, I need to reboot.
What should I do?
BTW I do have my registration code and look forward to resolving this issue.
Also, all works well on my Laptop
Bob

Re: Fwin.exe not responding

Bob,

When  you say that "Launch Fails," is there an error code displayed by Simply Fortran?  If no error is produced, it might be starting the process, but not actually generating any output.  It is often advisable in those situations to use the "External Console" option in the Launch Options window.  That way, if your process does seem to lock up, you can simply close the console associated with it.  Additionally, make sure that "Windows GUI" is not checked in Project Options.

Jeff Armstrong
Approximatrix, LLC

Re: Fwin.exe not responding

Here is what I see
==============================================================================
Generating Makefile... Okay
==============================================================================
Compiling .\hello.f90
Generating hello.exe
c:/program files (x86)/simply fortran 2/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
            cannot open output file hello.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
Error(E42): Last command making (hello.exe) returned a bad status
Error(F43): Deleting (hello.exe): Permission denied
Error(E02): Make execution terminated

* Failed *

Re: Fwin.exe not responding

Bob,

Is the program currently running?  Usually when you see a "Permission Denied" error during building, it means that the executable is currently running, and the compiler can't overwrite the executable.

Does your window's toolbar show a red square when you go to build your project, as shown below?

http://i.imgur.com/9zvJN9M.png

Before you recompile, you need to either click the red square (Terminate), select "Terminate" from the Build menu, or exit your program through its normal procedures.

You can see that building failed in your status window (and my example image) because the "Build Status" tab ends with "Failed."

There are reasons why Simply Fortran does not automatically terminate programs when a build is requested, but perhaps it should change since this is a recurring problem for users.

Jeff Armstrong
Approximatrix, LLC

Re: Fwin.exe not responding

Jeff ( or anyone),

Do you know of any Fortran source code or compiler directive we can put in which would cause the compiler to embed some machine code that will always end the executable whenever we close the program window?

I ask because I am often having to Ctrl-alt-delete to the task manager to kill off the process still sitting there with the name of my program executable. 

I don't mean when running my program from within SF.  I know I can use the big red square zapp-dot to kill orphan processes (or whatever they're called). I'm talking about when running the program outside SF.

I'm quite sure ther's no fault with SF.  I'm just looking for an easy way to circumvent having to write more robust programs!
---
John

Re: Fwin.exe not responding

Jeff and John,

FYI,

I've seen this problem before when using prior versions of SF.

On more than one occasion I've had to Ctrl-ALt-Del and stop the *.exe process before SF would compile again.

I wasn't sure if it was something I did or SF.

Frank

Re: Fwin.exe not responding

Jeff ( or anyone),

Do you know of any Fortran source code or compiler directive we can put in which would cause the compiler to embed some machine code that will always end the executable whenever we close the program window?

I ask because I am often having to Ctrl-alt-delete to the task manager to kill off the process still sitting there with the name of my program executable. 

I don't mean when running my program from within SF.  I know I can use the big red square zapp-dot to kill orphan processes (or whatever they're called). I'm talking about when running the program outside SF.

I'm quite sure ther's no fault with SF.  I'm just looking for an easy way to circumvent having to write more robust programs!
---
John

Re: Fwin.exe not responding

Jeff
--------------------------------------------------
SF Build Status tab shows -
===============================
Generating Makefile... Okay
===============================
Compiling .\Test99.f95
Generating target.exe

* Complete *

I click Launch
A Project Console window is opened and empty and
  shows a blinking cursor.
Task Manager shows 3 target.exe processes
The Green Launch icon is still there,
  and no red square appears.
-----------------------------------------------------
I cannot delete the three target.exe  processes.
I end the FWin process but still
I cannot delete the three target.exe  processes.
Any suggestions are appreciated.
Bob

Re: Fwin.exe not responding

Bob,

When the "Project Console" window opens and the cursor is just blinking, it means your program, target.exe, is actually running.  If you expect to see some output at some point, there may be something wrong in your code.  If you close this window using the "X" in the upper right, it should kill the process.

If the process is not being killed or if it is somehow spawning multiple copies of itself (which I doubt), there still may be something wrong with your code.  You said that there were three "target.exe" programs in the Task Manager.  Is there a chance that these were from earlier attempts to run your code?

When the "External Console" option is selected in Launch Options, Simply Fortran just asks Windows to execute your program in a Command Window, nothing more.   When in a  external console, Simply Fortran releases control of the executable entirely; it is no longer controlling the process.  It is actually executing a batch file via cmd.exe that contains only your executable and a "pause" statement.  If the process is not being killed when you close the "Project Console" window, it means something serious is causing your program to fail to terminate, which I find doubtful.  I would more likely guess that the target.exe processes that you're seeing in the task manager are some sort of legacy launch attempts.

Could you either post here or send the source code for Test99.f95 to support@approximatrix.com so I can try to replicate the problem?  I can't explain why you'd be seeing this behavior without seeing the source code.

Jeff Armstrong
Approximatrix, LLC

10

Re: Fwin.exe not responding

Jeff, Used Demo Code as follows:
program helloworld
implicit none
CHARACTER myChar
    Print *, "Hello World From Bob!"
    Read(*,*)myChar   
end program helloworld
Placed this in  Project Folder Test99.
Checked External Console and Unchecked Build before Launch.
---------------------------------------------------------------------------
I click Build Now and see
==============================================================================
Generating Makefile... Okay
======================================================
Compiling .\hello.f90
Generating hello.exe
* Complete *
-------------------------------------------------------------------------
Folder Test99  now contains hello.exe
And when I click on the file from within Windows Explorer,  it runs as expected.
Now will it run  from within SF using the  Launch!   ???????
NO and three hello.exe *32  Processes are created
I see the empty Console window with the blinking cursor and
I dismiss it and the three hello.exe processes are still there
For fun I'll now double click Hello.exe again from within Windows Explorer and
It runs and terminates  as expected.
---------------------------------------------
Conclusion -  SF Launch! does not work for me.
                          And what amazes me is that Task Manager can only
                         remove two of the three processes.
Your thoughts ?

Re: Fwin.exe not responding

Bob,

I still don't know how you'd get three processes, so I'll need to look into it further.  Out of curiosity, what directory are you working in? Also, are you clicking "Launch" in the menu?

The fact that there are processes that are stalled makes me think you might be clicking the "Debug" icon on the toolbar.  That would explain why the program seems to start and freeze. I apologize if I'm incorrect.

Jeff Armstrong
Approximatrix, LLC

12

Re: Fwin.exe not responding

I may have been using the Debug. I can now report all is well.
Thanks for your patience with a newbie.

Re: Fwin.exe not responding

Bob,

That's great to hear!  If you have any other questions or problems, please don't hesitate to post!

Jeff Armstrong
Approximatrix, LLC