PureBasic Forum
http://forums.purebasic.com/english/

Sourcefile ist still locked on HDD after closing TAB in IDE
http://forums.purebasic.com/english/viewtopic.php?f=4&t=72657
Page 1 of 1

Author:  kurzer [ Tue Apr 16, 2019 1:54 pm ]
Post subject:  Sourcefile ist still locked on HDD after closing TAB in IDE

Windows 7 x64 SP2 / Purebasic 5.62 and 5.70.

- Create a directory on your hard drive and copy a PureBasic sourceode file to this directory
- Start PB and load the sourcode via drag and drop into the IDE
- Compile the source code
- Then close the TAB with the sourcecode.

Now the directory is still locked by the PureBasic IDE. You cannot delete it until the PureBasic IDE is closed.

Regards,
Kurzer

Author:  infratec [ Tue Apr 16, 2019 6:36 pm ]
Post subject:  Re: Sourcefile ist still locked on HDD after closing TAB in

I reported this already years ago, but many of the other users was not able to reproduce this.

Maybe it is only on network drives.

Author:  kurzer [ Tue Apr 16, 2019 6:40 pm ]
Post subject:  Re: Sourcefile ist still locked on HDD after closing TAB in

Thanks for confirming this problem.
In my case its not a network directory. It's drive D:\ the second partition of my systems harddrive.

btw.: The problem only occurs, if the file was loaded via drag and drop! If you write a fresh programcode in the IDE and save it or if you load a sourcecode via filemenu from hdd and close the tab, then there is no lock on the file.

Author:  Little John [ Tue Apr 16, 2019 8:07 pm ]
Post subject:  Re: Sourcefile ist still locked on HDD after closing TAB in

Problem confirmed for PB 5.70 LTS on Windows 10, using a local drive.

Author:  Dude [ Tue Apr 16, 2019 10:04 pm ]
Post subject:  Re: Sourcefile ist still locked on HDD after closing TAB in

kurzer wrote:
Compile the source code

When you say compile, do you mean compile and run (F5 key), or create executable? I read it as compile and run.

Author:  skywalk [ Tue Apr 16, 2019 10:17 pm ]
Post subject:  Re: Sourcefile ist still locked on HDD after closing TAB in

I also noticed this and thought it standard behavior.
It may be the IDE mechanism that checks for source code file changes still has a file handle?

Author:  kurzer [ Wed Apr 17, 2019 8:52 am ]
Post subject:  Re: Sourcefile ist still locked on HDD after closing TAB in

Dude wrote:
When you say compile, do you mean compile and run (F5 key), or create executable?

Yes, compile and run is correct. It is not necessary to create an executable.

I haven't tested since when the problem exists, but I can imagine that it has to do with the implementation of the formerly new TabBar gadget. The TabBar gadget is originally from the user Stargate and has been used by Fred in the past to make the PB IDE Multi-TAB capable. A bug may have been built into this implementation.

As I said, the problem only exists if you drag and drop a file into one of the editor TABs.

skywalk wrote:
It may be the IDE mechanism that checks for source code file changes still has a file handle?

I dont think so, because why the IDE have to check for changes, if the sourcecode is actually not loaded in the IDE?

Author:  Dude [ Wed Apr 17, 2019 9:49 am ]
Post subject:  Re: Sourcefile ist still locked on HDD after closing TAB in

kurzer wrote:
the problem only exists if you drag and drop a file into one of the editor TABs

Nope, I also get the problem if I load the app normally, without using drag and drop:

https://i.imgur.com/ganeD6f.png

Using Win 10 Pro (64-bit) with PureBasic v5.70 LTS Final (32-bit).

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/