cdew / omnithreadlibrary

Automatically exported from code.google.com/p/omnithreadlibrary
0 stars 0 forks source link

CreateTask in Task group with Unobserved function call fails #71

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Following code produces on certain machines an error. The error happens 
sometimes but not all the times.

    TaskGroup := CreateTaskGroup;
    try
      for I := 0 to 2 do
        CreateTask (TestTask, Format ('TestTask %d', [I]))
          .SetParameter ('Number', I)
          .Unbserved
          .Join (TaskGroup);

      TaskGroup.RunAll;

Starting the tasks inside the Task Group Fails with the following stack trace:

OtlEventMonitor:221 (OtlEventMonitor.TOmniEventMonitor.Destroy) Access 
violation at address 0000000002060A36 in module 'ABC.exe'. Read of address 
0000000000000000

[0000000002060A36] OtlEventMonitor.TOmniEventMonitor.Destroy (Line 221, 
"OtlEventMonitor.pas")
[0000000076D21278] KiUserExceptionDispatcher
[0000000002060A36] OtlEventMonitor.TOmniEventMonitor.Destroy (Line 221, 
"OtlEventMonitor.pas")
[000000000205E2DF] OtlTaskControl.TOmniTaskControlEventMonitor.Create (Line 
3348, "OtlTaskControl.pas")
[0000000002061BE6] OtlEventMonitor.TOmniEventMonitorPool.Allocate (Line 414, 
"OtlEventMonitor.pas")
[000000000205E55D] OtlTaskControl.TOmniTaskControlEventMonitorPool.Allocate 
(Line 3379, "OtlTaskControl.pas")
[000000000205A114] OtlTaskControl.TOmniTaskControl.CreateInternalMonitor (Line 
2491, "OtlTaskControl.pas")
[000000000205CD54] OtlTaskControl.TOmniTaskControl.Unobserved (Line 3045, 
"OtlTaskControl.pas")

What version of the product are you using? On what operating system?

Using Version 3.03b on an Windows Server 2008R2 64bit.

Please provide any additional information below.

Removing the Unobserved function call works for us!

Original issue reported on code.google.com by Saskat...@googlemail.com on 11 Nov 2014 at 2:21

GoogleCodeExporter commented 9 years ago
Forgot to mention that the app is a 64bit application using Delphi XE3

Original comment by Saskat...@googlemail.com on 11 Nov 2014 at 2:22