dkprojektai
Members-
Content Count
61 -
Joined
-
Last visited
Everything posted by dkprojektai
-
procedure TOmniParallelSimpleLoop.Execute(loopBody: TOmniIteratorSimpleSimpleDelegate); begin InternalExecute( procedure (const task: IOmniTask; taskIndex: integer) var first: integer; last : integer; step : integer; begin first := FPartition[taskIndex].LowBound; last := FPartition[taskIndex].HighBound; step := FStep; if step > 0 then begin if assigned(FCancelWith) then while (first <= last) and (not FCancelWith.IsSignalled) do begin loopBody(first); Inc(first, step); end else while first <= last do begin loopBody(first); <<<<<<<< HERE error rises, How to find where it is in my code? Inc(first, step); end end else begin if assigned(FCancelWith) then while (first >= last) and (not FCancelWith.IsSignalled) do begin loopBody(first); Inc(first, step); end else while first >= last do begin loopBody(first); Inc(first, step); end end; end); end; { TOmniParallelSimpleLoop.Execute }
-
Debug info shows not in my code I guess...
-
Error: Provider: TELDebugInfoMap Location: (00DAF3EF){ANPR_VID.exe } [0666F3EF] OtlParallel.TOmniParallelSimpleLoop.Execute[2]$ActRec.$0$Body (Line 3440, "OtlParallel.pas" + 16) + $0 Unit: OtlParallel Source: OtlParallel.pas Class: TOmniParallelSimpleLoop.Execute[2]$ActRec Routine: $0$Body Line: 3440 Routine offset (bytes): 87 Routine offset (lines): 16 Line offset (bytes): 0 Why it happens?
-
Very strange issue, Thread exits without any notice
dkprojektai replied to dkprojektai's topic in Delphi IDE and APIs
try Try ----<<< deleted candidates:= Processor_analyze(proc,p,3*W, W, H,StrToInt(max_height)); ----<<<< call from dll except ----<<< deleted // end; ----<<< deleted raise Exception.Create('Test Exception'); ----<<<< if here - program terminates except // end; Miracle - I commented try except block and it start working like usual :)))) Maybe any comments? -
Memory leak in UnicodeString to string conversion
dkprojektai replied to dkprojektai's topic in OmniThreadLibrary
I'm now trying on - Finalize(result_text); Leak detectors does not register leaks. Will write if it will help... -
Memory leak in UnicodeString to string conversion
dkprojektai replied to dkprojektai's topic in OmniThreadLibrary
allocation number: 1804277 program up time: 3:04 min type: UnicodeString address: $da9db60 size: 26 access rights: read/write code page: 1200 reference counter: 1 string length: 6 contents: Detected text thread $85e8 (TOTPWorkerThread): 671a52b3 madExcept32.dll madExceptDbg 1736 GetMemCallback 004073e8 Main_program.exe System 4758 @GetMem 0040bd86 Main_program.exe System 24650 @NewUnicodeString 0040bfb7 Main_program.exe System 25328 @UStrFromPWCharLen 01268b1f Main_program.exe Unit1 14371 TWorkerThread.Execute$ActRec.$2$Body 0118353a Main_program.exe OtlParallel 3440 TOmniParallelSimpleLoop.Execute[2]$ActRec.$0$Body 01183054 Main_program.exe OtlParallel 3380 TOmniParallelSimpleLoop.CreateForTask$ActRec.$0$Body 0115b76f Main_program.exe OtlTaskControl 1991 TOmniTaskExecutor.Asy_Execute 0115a51e Main_program.exe OtlTaskControl 1584 TOmniTask.InternalExecute 0040a038 Main_program.exe System 17320 TObject.GetInterface 0040a081 Main_program.exe System 17327 TObject.GetInterface 00411d3b Main_program.exe System 38375 TInterfacedObject.QueryInterface 00410916 Main_program.exe System 37361 @IntfCast 0115a248 Main_program.exe OtlTaskControl 1502 TOmniTask.Execute 0114c624 Main_program.exe OtlThreadPool 889 TOTPWorkerThread.ExecuteWorkItem 0114c800 Main_program.exe OtlThreadPool 918 TOTPWorkerThread.GetMsg 0114c19f Main_program.exe OtlThreadPool 846 TOTPWorkerThread.Execute 004adbb7 Main_program.exe madExcept HookedTThreadExecute 0053ca51 Main_program.exe System.Classes 14945 ThreadProc 0040bcd4 Main_program.exe System 24423 ThreadWrapper 004ada9d Main_program.exe madExcept CallThreadProcSafe 004adb02 Main_program.exe madExcept ThreadExceptFrame 755e0417 KERNEL32.DLL BaseThreadInitThunk I quess - convertion from widestring to string is the problem. But how to fix it? -
Hello, I have an exception "DynArraySetLength" in code: var Locking: TOmniMREW; String_list: TStringList; procedure TWorkerThread.Execute; begin ... OtlParallel.Parallel.For(0, 20,1).NumTasks(6).Execute( procedure (value: integer) begin ... Locking.EnterReadLock; Try String_list.Add('text text'); ->>>> exception Finally Locking.ExitReadLock; End; .... end); ... end; What could be the problem? I Use Delphi 10.2.3 and Omnithreadlibrary 3.07.7
-
Thank's for all. Yes, write lock - is the answer.
-
Yes it is, But I use it just for locking. Or I'm wrong?
-
Imposible. Very big project. I Think the problem is on TOmniMREW
-
I'm doubt. Here is full stack: 0040f509 ANPR_VID.exe System 35017 DynArraySetLength 0040f651 ANPR_VID.exe System 35119 @DynArraySetLength 004c0572 ANPR_VID.exe System.Classes 7281 TStringList.SetCapacity 004c0275 ANPR_VID.exe System.Classes 7172 TStringList.Grow 004c033d ANPR_VID.exe System.Classes 7197 TStringList.InsertItem 004bfed7 ANPR_VID.exe System.Classes 7008 TStringList.AddObject 004bfe7d ANPR_VID.exe System.Classes 6995 TStringList.Add 012816d4 ANPR_VID.exe Unit1 15764 TWorkerThread.Execute$ActRec.$2$Body 0111970e ANPR_VID.exe OtlParallel 3440 TOmniParallelSimpleLoop.Execute[2]$ActRec.$0$Body 01119228 ANPR_VID.exe OtlParallel 3380 TOmniParallelSimpleLoop.CreateForTask$ActRec.$0$Body 010f1943 ANPR_VID.exe OtlTaskControl 1991 TOmniTaskExecutor.Asy_Execute 010f06f2 ANPR_VID.exe OtlTaskControl 1584 TOmniTask.InternalExecute 0040a6ec ANPR_VID.exe System 17320 TObject.GetInterface 004124f3 ANPR_VID.exe System 38375 TInterfacedObject.QueryInterface 004110ce ANPR_VID.exe System 37361 @IntfCast 010e27f8 ANPR_VID.exe OtlThreadPool 889 TOTPWorkerThread.ExecuteWorkItem 010e2373 ANPR_VID.exe OtlThreadPool 846 TOTPWorkerThread.Execute 004d19c9 ANPR_VID.exe System.Classes 14945 ThreadProc 0040c388 ANPR_VID.exe System 24423 ThreadWrapper 755e0417 KERNEL32.DLL BaseThreadInitThunk