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 

Problems with START_PROCESS@
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Thu Mar 30, 2017 3:19 pm    Post subject: Problems with START_PROCESS@ Reply with quote

When migrating from FTN95 7.xx to FTN95 8.xx (32bit), I get problems with the call of START_PROCESS@. The return code is now -1, which means a problem with calling the new process.

How can I get more information about the reason of this problem?
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Thu Mar 30, 2017 3:54 pm    Post subject: Reply with quote

START_PROCESS@ returns -1 when

a) the length of the command string is zero (i.e. only spaces in Fortran)

b) the resulting call to the API CreateProcess returns NULL.

Case (b) is far more likely but that's as far as I can go.

I have wondered what happens if you try to start up a 32 bit app from a 64 bit app.
Back to top
View user's profile Send private message AIM Address
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Thu Mar 30, 2017 4:08 pm    Post subject: Reply with quote

I try to start up a 32 bit app from a 32 bit app.

When I reduce my project to a small example it is working, but in the complete project I get this problem. I can't see any relevant message when compiling and linking the app.
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



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

PostPosted: Thu Mar 30, 2017 4:20 pm    Post subject: Reply with quote

In answer to Paul's speculation, I'd expect it to just work, same as calling a 64 bit app from a 32 bit one on a 64 bit system. The question is, what return message do you get when calling a 64 bit app from a 32 bit one on a 32 bit system?

My money is on START_PPROCESS@ at best resorting to a Windows message, and START_PROCESS@ causing a mess/crash/hang. Or maybe both cause a mess etc. Or maybe pigs do fly.

Only experimentation will tell.

Eddie
Back to top
View user's profile Send private message
BILLDOWS



Joined: 22 Jul 2005
Posts: 86
Location: Swansea, UK

PostPosted: Thu Mar 30, 2017 4:56 pm    Post subject: Reply with quote

Hi, Have you tried:

START_PROCESS_AND_WAIT@

This solved a recent problem I was having with START_PROCESS - might not help but might be worth a try.

Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Thu Mar 30, 2017 9:39 pm    Post subject: Reply with quote

Another one is START_PPROCESS@ (P is repeated).
They probably all end up calling CreateProcess.

If the problem persists then I could look into recovering the API error report following the call to CreateProcess. Thinking about it, you might even be able to get this report directly in your Fortran code.
Back to top
View user's profile Send private message AIM Address
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Fri Mar 31, 2017 7:57 am    Post subject: Reply with quote

START_PROCESS_AND_WAIT@ returns also error code -1.

START_PPROCESS@ leads to a "Floating point stack overflow" in __clearwin when executing the line with SDBG.
Back to top
View user's profile Send private message Visit poster's website
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Fri Mar 31, 2017 8:04 am    Post subject: Reply with quote

I called now GetLastError() immediate after START_PROCESS@ and got error code 740, which means: "The requested operation requires elevation."

I don't know the meaning of this error code?
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Fri Mar 31, 2017 9:16 am    Post subject: Reply with quote

Google does.
Back to top
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Mar 31, 2017 10:00 am    Post subject: Reply with quote

The message simply states that your code is attempting to do something such as changing an item in the Windows registry, etc., that requires "elevated privilege". When you attempt such actions in Windows Explorer, you get a pop-up that you have to accept with a click or by entering an Admin password.

No, it does not require you to take your laptop into the Kehlsteinhaus :) .


Last edited by mecej4 on Sat Apr 01, 2017 3:21 am; edited 1 time in total
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Fri Mar 31, 2017 11:09 am    Post subject: Reply with quote

Mecej4,

According to Godwin's Law, even with such an oblique reference, your last post has to be declared unhelpful! ;-)

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Mar 31, 2017 3:18 pm    Post subject: Reply with quote

If the application is just for your own use then you can probably fix this by running the primary application under "Run as administrator".
Back to top
View user's profile Send private message AIM Address
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Fri Mar 31, 2017 3:47 pm    Post subject: Reply with quote

Obviously when starting the second app with START_PROCESS@ Windows will give a User Account Control message.

This message does not appear when I start the second app directly and it does not appear when I compile with FTN95 7.xx.

I have also another app compiled with FTN95 8.10 which uses the same algorithms and the same second app and there is no such message. START_PROCESS@ works properly in this case.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Fri Mar 31, 2017 5:12 pm    Post subject: Reply with quote

Are you testing on more than one machine with different operating systems?
If you are only using one machine then the behaviour is very strange.
Can you construct a working sample for me to look at?
Back to top
View user's profile Send private message AIM Address
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Sun Apr 02, 2017 9:11 am    Post subject: Reply with quote

I'm just testing on one machine running Windows 10 Pro 64-bit.

I will try to build an example, but it will need some time.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
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