JeffBurroughs 0 Posted May 29, 2020 Installed latest Delphi 10.4. When I try and compile a project that uses otlparralel I get these errors [dcc64 Error] OtlParallel.pas(3884): E2010 Incompatible types: 'TObject' and 'IOmniTaskControl' [dcc64 Error] OtlParallel.pas(4215): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments [dcc64 Error] OtlParallel.pas(4234): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments [dcc64 Error] OtlParallel.pas(4306): E2250 There is no overloaded version of 'CreateTask' that can be called with these arguments [dcc64 Error] OtlParallel.pas(4600): E2250 There is no overloaded version of 'Execute' that can be called with these arguments [dcc64 Error] OtlParallel.pas(4622): E2250 There is no overloaded version of 'Task' that can be called with these arguments [dcc64 Error] OtlParallel.pas(4683): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments [dcc64 Error] OtlParallel.pas(4945): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments [dcc64 Error] OtlParallel.pas(5016): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments [dcc64 Error] OtlParallel.pas(5035): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments [dcc64 Error] OtlParallel.pas(5282): E2250 There is no overloaded version of 'OnTerminated' that can be called with these arguments [dcc64 Error] OtlParallel.pas(5342): E2250 There is no overloaded version of 'Initialize' that can be called with these arguments [dcc64 Error] OtlParallel.pas(5349): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments [dcc64 Error] OtlParallel.pas(5367): E2250 There is no overloaded version of 'Execute' that can be called with these arguments [dcc64 Error] OtlParallel.pas(5394): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments [dcc64 Error] OtlParallel.pas(5416): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments [dcc64 Error] OtlParallel.pas(5519): E2250 There is no overloaded version of 'Execute' that can be called with these arguments Using latest 3.07.7 omnithreadlibrary download. Is this my issue or a problem that needs patching in otlparallel? Share this post Link to post
JeffBurroughs 0 Posted May 29, 2020 If you remark out line 3884 it gets it all compiling and running, but I assume with memory leaks. Although doing some tests with lots of parallel loops does not seem to have any serious leaks? procedure TOmniFuture<T>.Execute(action: TOmniTaskDelegate; taskConfig: IOmniTaskConfig); begin FTask := CreateTask(action, 'TOmniFuture action'); Parallel.ApplyConfig(taskConfig, FTask); FTask.Unobserved; if assigned(FTask.CancellationToken) and FTask.CancellationToken.IsSignalled then begin FCancelled := true; //FreeAndNil(FTask); //REMARK THIS LINE end else Parallel.Start(FTask, taskConfig); end; { TOmniFuture<T>.Execute } Share this post Link to post
Vincent Parrett 750 Posted May 30, 2020 No memory leak, FTask is an interface reference. FreeAndNil should never have been called on it. Share this post Link to post
JeffBurroughs 0 Posted May 30, 2020 OK, great. Makes an easy fix for otlparallel to support 10.4 then. Since remarking that line all of the parallel loop tests I have tried run perfectly. Share this post Link to post
Dalija Prasnikar 1396 Posted May 30, 2020 14 hours ago, JeffBurroughs said: Using latest 3.07.7 omnithreadlibrary download. You already fixed the issue, but that issue is already fixed in Omni Thread, too. There is newer version in the making, not released yet, but it has fixes and packages for 10.4. Last commit was just 4 days ago. https://github.com/gabr42/OmniThreadLibrary When new Delphi release comes out and you find issues with some of the libraries you are using, it is good to recheck library for updates. Keep in mind that libraries cannot be publicly updated before official release and sometimes takes a few days to have those patches and fixes generally available. 1 Share this post Link to post
Primož Gabrijelčič 223 Posted May 30, 2020 Thank you, @Dalija Prasnikar, I just wanted to post exactly that 🙂 New release should go out this weekend. 1 Share this post Link to post