win32lib et multitasking
- Posted by chadal <francois.chadal at girce.caisse-epargne.fr> Nov 08, 2006
- 824 views
My project uses Euphoria 3.0.1 and win32lib. Recently, i've insert multi-taking functions (task_create, task_schedule, task_suspend and task_yield). Since this update, i've often this kind of error i've never seen before multi-tasking version. Why there is no value ?!? for parms and funcid parameters !?! How can i help to analyse this trouble ? Are there some restrictions of using task_yield in main task ? François Chadal ---------------------- TASK ID 0 initial task ---------------------------- D:\EUPHORIA\Biblio\win32lib\Include\w32dll.ew:283 in procedure w32Proc() A machine-level exception occurred during execution of this statement funcid = <no value> parms = <no value> libfunc = <no value> lFuncDef = <no value> memset = <no value> i = <no value> ... called from D:\EUPHORIA\Biblio\win32lib\Include\Win32Lib.ew:33346 in procedure eventLoop() pData = {} temp = <no value> msg = 10474436 getRC = 1 inc = <no value> el = 1 lTock = 0 ... called from D:\EUPHORIA\Biblio\win32lib\Include\Win32Lib.ew:33553 in procedure WinMain() id = 3 style = 0 lInitFocus = -1 lRtnId = <no value> lEventName = <no value> lInitView = <no value> i = <no value> ... called from D:\EUPHORIA\ose\bin\winOSE.exw:541
global procedure w32Proc(atom funcid, sequence parms) atom libfunc object lFuncDef atom memset memset = 0 for i = 1 to length(parms) do if sequence(parms[i]) then if memset = 0 then memset = w32new_memset() end if parms[i] = w32acquire_mem(memset, parms[i]) end if end for if funcid > kMagicRtnID then funcid -= kMagicRtnID if funcid <= length(vw32Routines) then lFuncDef = vw32Routines[funcid] if sequence(lFuncDef) then if lFuncDef[1] < 0 then lFuncDef[1] = -lFuncDef[1] if vw32Libraries[lFuncDef[1]][1][1] = 0 then vw32Libraries[lFuncDef[1]][1] = linkDLL(vw32Libraries[lFuncDef[1]][2]) end if lFuncDef[1] = vw32Libraries[lFuncDef[1]][1][2] end if lFuncDef = linkProc( lFuncDef[1], -- library lFuncDef[2], -- function name lFuncDef[3] -- param signature ) vw32Routines[funcid] = lFuncDef end if c_proc(lFuncDef, parms) else abortErr(Err_BADFUNCID) end if else if funcid > 0 then c_proc(funcid, parms) -- <--ligne 283 of win32lib\Include\w32dll.ew else abortErr(Err_BADFUNCID) end if end if if memset != 0 then w32release_mem(memset) end if
end procedure