*** ERROR - Can't overwrite program. Is it still running?

Previous topic - Next topic

MrTAToad

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.

Hemlos

Bummer.


Does it do that if you select "Start a copy" too?
Bing ChatGpt is pretty smart :O

Schranz0r

I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

MrTAToad

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).

Hemlos

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.
Bing ChatGpt is pretty smart :O

MrTAToad

I wouldn't be surprised with SHOWSCREEN being needed, especially if it also does the message pumping.

happylewie

Try running as 'Admin'. Worked out for me. Had the same problem. ;)

Kitty Hello

Very strange. Take a look at the program's attributes. Can you delete the file?

MrTAToad

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.

Kitty Hello

Is it in Debug mode? Please get the Sysinternals ProcesMonitor program, and see if you can see the process running there.

Ian Price

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.
I came. I saw. I played.

MrTAToad

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

Steinbock

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
Time will come. It's just a matter of time...

Kitty Hello

can you delete the old exe file in windows explorer?

Steinbock

Time will come. It's just a matter of time...