Threadsafe - Compiler Check Bug - Prevent IMA at runti
Posted: Wed Aug 08, 2007 5:07 pm
You should extend the compiler check for the situation, that a pb user has forgotten any parameter for a threaded procedure.
Without threadsafe the code does run without any problem.
With activated threadsafe the code crashes with IMA at "ProcedureReturn".
If i add a parameter to procedure, as i should, i get no problem. The following code works without any problems.
Can you please add a check at compilation time?
Without threadsafe the code does run without any problem.
With activated threadsafe the code crashes with IMA at "ProcedureReturn".
Code: Select all
Procedure P_Thread_QueuMaster()
; This Procedure crash with enabled threadsafe at "EndProcedure" with
; a hard to find IMA.
Define tmp.l
While tmp < 1000
Delay(1)
tmp+1
Wend
EndProcedure
Define THREAD_ID_QUEUMASTER.l
THREAD_ID_QUEUMASTER = CreateThread(@P_Thread_QueuMaster(),0)
While IsThread(THREAD_ID_QUEUMASTER)
Debug "THREAD_ID_QUEUMASTER is running"
Delay(50)
Wend
Code: Select all
Procedure P_Thread_QueuMaster(bla.)
; This Procedure does not crash
Define tmp.l
While tmp < 1000
Delay(1)
tmp+1
Wend
EndProcedure
Define THREAD_ID_QUEUMASTER.l
THREAD_ID_QUEUMASTER = CreateThread(@P_Thread_QueuMaster(),0)
While IsThread(THREAD_ID_QUEUMASTER)
Debug "THREAD_ID_QUEUMASTER is running"
Delay(50)
Wend