GLBasic forum

Main forum => Bug Reports => Topic started by: MrTAToad on 2009-May-31

Title: *** ERROR - Can't overwrite program. Is it still running?
Post by: MrTAToad on 2009-May-31
There seems to be a problem in Vista whereby, even if a program ends normally, and you attempt to re-compile the program, the linking message *** ERROR - Can't overwrite program. Is it still running? still appears.

It should be noted that there are NO processes belonging to GLBasic nor the executable.
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Hemlos on 2009-May-31
Bummer.


Does it do that if you select "Start a copy" too?
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Schranz0r on 2009-May-31
you use inline right?
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: MrTAToad on 2009-Jun-01
No INLINE is used.

The problem seems to occur when no graphics screen is created - for example with the follow :

Code (glbasic) Select
ok=OPENFILE(0,"filelist.txt",TRUE)
DEBUG "OK : "+ok+"\n"
DEBUG "File exists : "+DOESFILEEXIST("filelist2.txt")+"\n"
KEYWAIT


Unfortunately it cant be stopped with the debugger options either (but only if not debugging).
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Hemlos on 2009-Jun-01
Quote from: MrTAToad on 2009-Jun-01
No INLINE is used.

The problem seems to occur when no graphics screen is created - for example with the follow :

Code (glbasic) Select
ok=OPENFILE(0,"filelist.txt",TRUE)
DEBUG "OK : "+ok+"\n"
DEBUG "File exists : "+DOESFILEEXIST("filelist2.txt")+"\n"
KEYWAIT


Unfortunately it cant be stopped with the debugger options either (but only if not debugging).

I remember reporting this a few years ago actually, while using windows xp.
Correct me if im wrong, but from what i understand; showscreen is essential for glbasic to function properly.
Something to do with flushing memory.
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: MrTAToad on 2009-Jun-01
I wouldn't be surprised with SHOWSCREEN being needed, especially if it also does the message pumping.
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: happylewie on 2009-Jun-07
Try running as 'Admin'. Worked out for me. Had the same problem. ;)
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Kitty Hello on 2009-Jun-07
Very strange. Take a look at the program's attributes. Can you delete the file?
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: MrTAToad on 2009-Jun-08
QuoteTry running as 'Admin'. Worked out for me. Had the same problem.
Dont worry - I am running as Admin

QuoteVery strange. Take a look at the program's attributes. Can you delete the file?
No, the file is being locked - it cant be deleted.

Its not a worry too much now - as Ocean suggested, as there is no window display it should really be compiled as a console application (which it isn't).  The main problem is that even trying to "End Task" it wont work - the only thing that will is to exit GLBasic.
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Kitty Hello on 2009-Jun-09
Is it in Debug mode? Please get the Sysinternals ProcesMonitor program, and see if you can see the process running there.
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Ian Price on 2009-Jun-09
I had this yesterday on XP - however, I think it was because I pressed the RUN button twice (I wasn't sure if it was compiling/running or not, it didn't look like it was) and it was trying to run two instances. Dunno.
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: MrTAToad on 2009-Jun-09
QuoteIs it in Debug mode? Please get the Sysinternals ProcesMonitor program, and see if you can see the process running there.
Yes, this is debug mode.  In the ProcessMonitor, the last entry (when the debugger is used to stop the program), is :

17:17:45.9630984   tEST2.exe   2384   Thread Exit      SUCCESS   Thread ID: 2112, User Time: 1.2012077, Kernel Time: 8.9076571

And it can't be re-built due to still "running"

When GLBasic is quit, the last line for test2.exe is :

17:20:16.3957162   tEST2.exe   2384   Process Exit      SUCCESS   Exit Status: 0, User Time: 1.2948083, Kernel Time: 9.5160610, Private Bytes: 18,886,656, Peak Private Bytes: 43,175,936, Working Set: 17,137,664, Peak Working Set: 21,925,888
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Steinbock on 2010-Aug-25
Hi

Was there any solution for this? Because i have the same problem on my new pc. Windows 7 Home Premium 64bit.
Same code worked fine on (old) XP.  O_O
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Kitty Hello on 2010-Aug-25
can you delete the old exe file in windows explorer?
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Steinbock on 2010-Aug-25
Yes, it's possible.
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: MrTAToad on 2010-Aug-25
Hopefully Gernot will get Windows 7 at some point :)
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Kitty Hello on 2010-Aug-26
February :/
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: MrTAToad on 2010-Aug-26
Nice :)

There isn't any real rush - although a program wont end when the debugger stop option isn't used (the program just hangs and you usually cant terminate with the Task Manager), closing the IDE does end the program
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Kitty Hello on 2010-Aug-26
Oh - I *think* I had that on Vista right now, too.
How can I reproduce it, please?
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: MrTAToad on 2010-Aug-26
Quite simple really - create a program that runs in a loop (but has SHOWSCREEN in), compile and run in debug mode, and then try and stop it with Compiler -> Debugger -> Stop.

Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Steinbock on 2010-Aug-26
If i run only *.exe-file first from explorer and close it.
And then try to compile the project, the error occurs, even if the file was not run by IDE.
No difference if in debug mode or not.
As MrTAToad said, a loop with SHOWSCREEN.
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Cliff3D on 2010-Sep-02
I have now had this in Windows XP Pro running under Virtual PC 2007, although if I keep retrying to build it will eventually do so, but the length of timing between building one version and bulding the next can be...variable :(
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: MrTAToad on 2010-Sep-03
We think (especially on Windows 7) its how files are cached or something - trying to re-compile a file before Windows has marked that its not in use or something.

I haven't had the problem for ages now - no idea why...

I dont really use GLBasic under VirtualBox, so I dont know whether XP would exhibit the same problem...
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: MrTAToad on 2010-Sep-05
Another cause is when an anti-virus program decides to quarantine the program - ESET is starting with the false positives again...
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: Steinbock on 2010-Nov-19
Ok. i've found a solution and for me it works.  :)

In the filebrowser (windows explorer) move to the editor of GLBASIC (EditorE.exe).
Then right-click and select properties.
Select compatibility-tab.
Choose compatibilitymode for Windows XP (Servic Pack 2).

Hope this helps.

[attachment deleted by admin]
Title: Re: *** ERROR - Can't overwrite program. Is it still running?
Post by: ketil on 2010-Nov-20
Same thing happens with me on XP sp3 when i try to compile, but after 2-3 tries it compiles and runs fine.
It's almost as the program hangs until i try to compile it a couple of times, and then get released.
For me this error is periodically ...