RO 7.0.73 and Eurekalog 7.0.7

Hello, I try to use Delphi XE3 + RO SDK 7.0.73 + Eurekalog 7. When I enable Eurekalog for the server project I have a problem. When the server tries to handle SOAP request it says that “CoInitialize has not been called”. My dpr file already contains uRoComInit, but when I enable Eurekalog, it is not the first unit in uses list. I also tried to move uRoComInit to top, i get messagebox “Cannot install Eurekalog memory filter”, "EMemLeaks.pas MUST be the first unit in your project’s dpr file.

DPR contents:
program CoreTester;
{#ROGEN:CoreTester.rodl}
uses
EMemLeaks,
EResLeaks,
EDialogWinAPIMSClassic,
EDialogWinAPIEurekaLogDetailed,
EDialogWinAPIStepsToReproduce,
EDebugExports,
EFixSafeCallException,
EMapWin32,
EAppVCL,
ExceptionLog7,
uROComInit,
Forms,

Is there any way to use RO SDK and Eurekalog?

regards
Piotr

Hello,
Try to set uROInitializedThread.InitializeThreads := True on starting application instead of using uROComInit unit.

That helped. I put:
uROInitializedThread.ROInitializeThreads := True;

And now my server app can parse requests.

Thanks a lot
Piotr

UPDATE:
uROInitializedThread.InitializeThreads := True

helped but only for single request. When I send second request I get “CoInitialize() was not called” again :frowning:

UPDATE: :smile:
Agian it works fine. I was calling CoInitialize()/CoUnitialize() inside onBefoerParseEnvelope / onAfterParseEnvelope.
After removing them, uROInitializedThread.ROInitializeThreads := True works fine

I have a question about this too. I’m converting from 2010 to XE4 and am having similar issues with EurekaLog working. I tried the suggestions above however, my app just freezes when I try to stop/close the app. Even without EurekaLog configured, just using ROInitializeThreads := True instead of uROCOMInit has the same behavior.

Hello,
Can you send us a small testcase which reproduces it?

Hello,
You wrote:

I tried the suggestions above however, my app just freezes when I try to stop/close the app.

Can you send us a small testcase which reproduces it?

I can try, but I have a little more info that may help. Tracing through the close process,it’s hanging on uROThreadTimer line 218 lEvent.WaitFor(INFINITE);

I have a test app, where can I send it privately?

Hi,

you can send it to support@remobjects.com

BTW, i have the same problem using latest eureka log.

Reviving an old thread I know but I have exactly the same problem. Giving EurekaLog a try in a desperate attempt to find another issue and can’t get rid of this error. Adding the call mentioned above has no effect and I get the error anyway.

For anyone reading this article in 2017+ , the variable listed above is now in uROClasses

if you mean InitializeThreads, it is still in uROInitializedThread.pas

Where should I put uROInitializedThread.InitializeThreads := True? I put it in the project file, but it still didn’t work.

Hi,

can you share your .dpr, pls?
you can drop email to support@ for keeping privacy.

Thank you for the response - I contacted EurekaLog, and they gave me a solution that solve the problem:
EurekaLog v7.9.4 Project Options → Advanced->Custom/Manual, add this line:

PreInitUnits="uROCOMInit"

Then, uROCOMInit can be listed as the first unit in the dpr file, without any problem.

But regardless, I found setting uROInitializedThread.ROInitializeThreads := True really does NOT work for me (I am using latest RO SDK, and Delphi 10.4.2) - the problem is solved from EurekaLog side, anyway.

1 Like