Compiler Option: Main source file
Compiler Option: Main source file
If I set a main source file in Compiler Options for an included source, will that included source use the same Compiler Options as the main? Or do I need to go in and set things like "Thread safe" for the include file, even if "Thread safe" is set in the main?
Re: Compiler Option: Main source file
It is enough to set ThreadSafe in the main program.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Compiler Option: Main source file
Good to know. I'm getting illegal memory access errors and despite triple-checking literally everything (with Purifier on and such), I just can't find the cause. Even with OnError lines support on, it reports lines that have no obvious cause. So I wondered if it were because I didn't have "thread safety" turn on in an include file. I guess not. Have to keep looking.
Re: Compiler Option: Main source file
I never followed-up on what was causing this error. Turns out I was using procedures without any parameter for the thread, like this:
Once I added the required procedure parameter, the crashes stopped:
A silly mistake to make.
Code: Select all
Procedure MyThread()
; Do something
EndProcedure
CreateThread(@MyThread(),0)
Code: Select all
Procedure MyThread(null)
; Do something
EndProcedure
CreateThread(@MyThread(),0)
Re: Compiler Option: Main source file
I wouldn't call it a silly mistake, it is more a common mistake.
The sentence in the help should be somehow highlited:
The sentence in the help should be somehow highlited:
The procedure which you use as a thread must take one parameter and cannot return anything.
{Home}.:|:.{Dialog Design0R}.:|:.{Codes}.:|:.{Downloads}.:|:.{History Viewer Online}