Page 13 of 23

Re: PureBasic 6.10 beta 4 is out !

Posted: Sat Jan 27, 2024 5:13 pm
by Axolotl
Thanks PB-Team for the new BETA,

still trying to use the new flag on ....

Code: Select all

If CreatePreferences(fname, #PB_Preference_GroupSeparator | #PB_Preference_NoBOM) 
I try and fail dramatically with this messages

Code: Select all

[17:04:16] Waiting for executable to start...
[17:04:16] Executable type: Windows - x64  (64bit, Unicode)
[17:04:16] Executable started.
[17:04:19] [ERROR] MyBeautifulNewApp.pb (Line: 967)
[17:04:19] [ERROR] CreatePreferences(): invalid value specified for parameter 'Flags'.
[17:04:22] The Program was killed.

Same behavior on both compilers (FASM, C) and also with 4 instead of #PB_Preference_NoBOM

Re: PureBasic 6.10 beta 4 is out !

Posted: Sat Jan 27, 2024 5:38 pm
by Marco2007
Justin wrote: Sat Jan 27, 2024 5:12 pm any hints?
Check the option "Create temporary executable in the source directory" ... maybe this could fix the issue. 🤔

Re: PureBasic 6.10 beta 4 is out !

Posted: Sat Jan 27, 2024 6:15 pm
by mk-soft
@justin

I don't have these problems here. But do not use the Windows program folder, but a separate folder C:\WinAPP.
Then rename the PureBasic folder PureBasic-v604x64 or depending on the version.
This already solves many problems with the new security guidelines of Window.

Then there are the virus scanners that block a lot and set up exceptions

Re: PureBasic 6.10 beta 4 is out !

Posted: Sat Jan 27, 2024 6:44 pm
by Justin
Thanks guys for the help,

checking create exe in source dir works, but unchecking it fails even if installing pb in c:\

it's annoying because i have a project in a slow thumb drive and it takes a lot to compile in the source dir.
Very weird because before the update everything worked, Fred said something about the temp dirs in this update maybe it's something related to that

Re: PureBasic 6.10 beta 4 is out !

Posted: Sat Jan 27, 2024 7:03 pm
by Marco2007
I think, there was an Update from Microsoft at the same time, because I'm still using 6.03 and had suddenly the same problem while testing an app. I'm using Win 11.

Re: PureBasic 6.10 beta 4 is out !

Posted: Sat Jan 27, 2024 7:36 pm
by Fred
We didn't changed something related to temp dir IIRC, you said it was the same with 6.04, so it's not 6.10 specific ?

Re: PureBasic 6.10 beta 4 is out !

Posted: Sat Jan 27, 2024 8:03 pm
by fryquez
Maybe there are special characters in the Temp folder?

Current IDE uses UTF-8 communication with compiler. So if you use old compiler with new IDE, it will cause problems.

Re: PureBasic 6.10 beta 4 is out !

Posted: Sat Jan 27, 2024 8:29 pm
by Justin
To clarify a little,

Compiling with create temp exe in source dir checked works

Compiling with create temp exe in source dir unchecked fails:
With integrated IDE debugger:
Cannot execute the file with the internal debugger. Please try the standalone one

With the standalone GUI debugger:
Cannot execute file
c:\Users\user\AppData\Local\Temp\PureBasic_Compilation.exe
There aren`t special characters

The weird thing is i am using 6.04 LTS not the beta and before the update worked.

It can be related to this?
https://www.purebasic.fr/english/viewtopic.php?t=83164

Re: PureBasic 6.10 beta 4 is out !

Posted: Sat Jan 27, 2024 8:48 pm
by mk-soft
This looks like a virus scanner problem.
This is probably blocking the compiled execute. I know that too.
The wish is that you can set the TMP folder yourself in the IDE and then add this folder to the exception list of the virus scanner.

Re: PureBasic 6.10 beta 4 is out !

Posted: Sat Jan 27, 2024 9:21 pm
by Quin
@Fred, is it possible to be able to differentiate between single and double clicks with SysTrayIconMenu()? It's currently very limiting in when the menu fires. I want to be able to click the icon with the keyboard and have a menu pop up. I can't do that though, because pressing enter/space performs a double click, and SysTrayIconMenu() only fires on right click. Even if I make the menu pop up manually, the double click seems to do weird things and try and show and hide the menu at the same time due to two single click events. The only way I found to work around this was to have a timer in the event handler, but even that broke a lot of the time. Ideally SysTrayIconMenu() would abstract this all away. It would improve accessibility of all PB apps that use sys tray icons by default too.

Re: PureBasic 6.10 beta 4 is out !

Posted: Sun Jan 28, 2024 9:28 am
by Justin
mk-soft wrote: Sat Jan 27, 2024 8:48 pm This looks like a virus scanner problem.
This is probably blocking the compiled execute. I know that too.
The wish is that you can set the TMP folder yourself in the IDE and then add this folder to the exception list of the virus scanner.
I'm not using any antivirus program.

Re: PureBasic 6.10 beta 4 is out !

Posted: Sun Jan 28, 2024 10:16 am
by Fred
Windows Defender does it as well and it's activated by default on Windows

Re: PureBasic 6.10 beta 4 is out !

Posted: Sun Jan 28, 2024 10:31 am
by Marc56us
Hi,
Same for me: #PB_Preference_NoBOM = crash IDE :|
CreatePreferences without flag = OK :wink:

6.10 B4 Windows x64
Microsoft Windows [version 10.0.19045.3930]
ASM or C
compile in source dir
With/without AV enable
(all other PB sources compile OK)

Test file:

Code: Select all

INI$ = GetTemporaryDirectory() + "setup.ini"
DeleteFile(INI$)
Debug "#PB_Preference_NoBOM = " + #PB_Preference_NoBOM

Debug "--- Without Flag"
IsOK = CreatePreferences(INI$)
Debug "Create: " + IsOK
DeleteFile(INI$)

Debug "--- With Flag"
IsOK = CreatePreferences(INI$, #PB_Preference_NoBOM)
Debug "Create: " + IsOK

Code: Select all

#PB_Preference_NoBOM = 4 ; So constant exist
--- Without Flag
Create: 344 ; Ok create
--- With Flag
; (crash)

Code: Select all

[10:28:40] Waiting for executable to start...
[10:28:40] Executable type: Windows - x64  (64bit, Unicode)
[10:28:40] Executable started.
[10:28:40] [ERROR] PB_Preference_NoBOM.pb (Line: 11)
[10:28:40] [ERROR] CreatePreferences(): invalid value specified for parameter 'Flags'.
invalid value specified for parameter 'Flags' :?:
(Last error message rules out antivirus problem IMHO)

Re: PureBasic 6.10 beta 4 is out !

Posted: Sun Jan 28, 2024 1:07 pm
by Justin
Fred wrote: Sun Jan 28, 2024 10:16 am Windows Defender does it as well and it's activated by default on Windows
That was the problem, i think it was the real time protection,
By the way the installer was marked as untrusted maybe that was the cause
Thanks.

Re: PureBasic 6.10 beta 4 is out !

Posted: Sun Jan 28, 2024 1:36 pm
by Inner
okay, what's life with out sense of humor..

What's #PB_Preference_NoBOM a Pure Basic Anti-Terrorism Flag?