[PB 6.20 beta 2] Undeletable file .tmp0 on compile

Just starting out? Need help? Post your questions and find answers here.
User avatar
marcoagpinto
Addict
Addict
Posts: 1076
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

[PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by marcoagpinto »

Heya,

I compiled my app for Windows 10 (using the new checkbox of compiler settings) and for Windows 7 (unticked the checkbox).

It created a .tmp0 file for Windows 10 which not even as admin of Windows I can delete.
MCRTI_V0219_x64_PB620b2_win10.exe
MCRTI_V0219_x64_PB620b2_win7.exe

I have the latest Windows 11 2024H2.

EDIT: it created the file: MCRTI_V0219_x64_PB620b2_win10.exe.tmp0
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by Fred »

PB doesn't create such a file, so that's weird.
User avatar
marcoagpinto
Addict
Addict
Posts: 1076
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: [PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by marcoagpinto »

Fred wrote: Sun Jan 05, 2025 1:27 pm PB doesn't create such a file, so that's weird.
Fred, but it isn't the first time that I see temporary files in the folder where I have the source-code and to which I compile to.

In this case, the file wasn't deletable.

Somehow I was able to make it gone, don't know how.

:oops: :oops: :oops: :oops: :oops: :oops:
User avatar
Caronte3D
Addict
Addict
Posts: 1371
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: [PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by Caronte3D »

Maybe it's not deletable because it's in use? Next time, close your PB and try to delete that file. Anyway is weird even Fred don't know about it :?
benubi
Enthusiast
Enthusiast
Posts: 227
Joined: Tue Mar 29, 2005 4:01 pm

Re: [PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by benubi »

Could be your windows defender or AV scanning & blocking it. I noticed Defender is more suspicious about a 6.20 beta made executable than the same done in 6.11 (or 6.12) a few weeks earlier (a small test program using the 3D engine). It keeps the notification on screen for a few seconds before it seems to have terminated it's analysis. I have W10 home.
User avatar
marcoagpinto
Addict
Addict
Posts: 1076
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: [PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by marcoagpinto »

For example, if I have the debugger on and run my code without compiling to executable (pressing RUN in the IDE), it creates the file:
PureBasic_Compilation0.exe

It isn't PureBasic, creating it?

I can't understand if it is McAfee that creates it and how McAfee creates it.
User avatar
Caronte3D
Addict
Addict
Posts: 1371
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: [PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by Caronte3D »

marcoagpinto wrote: Sun Jan 05, 2025 7:44 pm For example, if I have the debugger on and run my code without compiling to executable (pressing RUN in the IDE), it creates the file:
PureBasic_Compilation0.exe

It isn't PureBasic, creating it?

I can't understand if it is McAfee that creates it and how McAfee creates it.
Yes, that file is the normal behavior when run PB code from the IDE
User avatar
marcoagpinto
Addict
Addict
Posts: 1076
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: [PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by marcoagpinto »

@Fred

The file appeared again even with McAfee virus scan turned off.

Are you sure the temporary file isn't related to C-backend with that library setting for Windows 10?
User avatar
Bisonte
Addict
Addict
Posts: 1320
Joined: Tue Oct 09, 2007 2:15 am

Re: [PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by Bisonte »

Backup your drive !
Make a system malware check, also remove the antivirus totally...
Check your program if there is something could generate such file. (-> IDE Menu :Find in files)
After that, check your harddrive... sometimes a disk failure could deny removing files... (mostly on SSD's)
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
marcoagpinto
Addict
Addict
Posts: 1076
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: [PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by marcoagpinto »

Bisonte wrote: Mon Jan 06, 2025 8:20 am Backup your drive !
Make a system malware check, also remove the antivirus totally...
Check your program if there is something could generate such file. (-> IDE Menu :Find in files)
After that, check your harddrive... sometimes a disk failure could deny removing files... (mostly on SSD's)
I am going to backup everything.

Meanwhile, I have moments ago changed this setting in PureBasic:
Image

EDIT: I unticked it.

Thanks!
benubi
Enthusiast
Enthusiast
Posts: 227
Joined: Tue Mar 29, 2005 4:01 pm

Re: [PB 6.20 beta 2] Undeletable file .tmp0 on compile

Post by benubi »

I added my source codes paths to the AV exceptions (most AV's can manage a list of directories to exclude from scanning), I suggest you do it too instead of totally disabling malware detection, which could potentially expose you to harm. Also in case you have databases with frequent access, the same rule applies here to boost performance; protect those file paths with special exclusive user access/ACL's preferably (some DB's and apps create their own users that should remain the lone privileged beside the admins or robo/system users). I hope this is still a valid "pro tip" ;)
Post Reply