Minor threading flaw in TOraAlerter

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
river2974
Posts: 2
Joined: Mon 04 Aug 2008 00:52

Minor threading flaw in TOraAlerter

Post by river2974 » Mon 04 Aug 2008 01:05

I am running ODAC professional version 6.50.0.35 against Delphi 7 build 4.453.

I created a test application which exposes a minor threading flaw in TOraAlerter. Actually, there are two applications. One sends an alert using TOraAlerter. The other receives the alert, also using TOraAlerter.

I will attach the application to this topic once I figure out how (I am new to this forum.)

I use the etAlert (DBMS_ALERT) type, not the pipe.

The basic problem occurs in the TOraAlerter OnEvent event. I use ShowMessage procedure within the event, to display a message with the time so that I can tell how long it took to post and then receive the message.

While the ShowMessage dialog is opened, I noticed that one CPU (I have a four-CPU system) was fully occupied. (Peformance monitor went to 25%, and stayed there.)

As soon as I close the ShowMessage dialog box, then CPU goes back down to 0%. This was intriguing, because it should not happen.

Anyway, see the test application to verify.

I also include a work-around in the test application. By using PostMessage to a call-back function, within the OnEvent event, the ShowMessage box can come up, and CPU stays at 0%.

river2974
Posts: 2
Joined: Mon 04 Aug 2008 00:52

test app can be found here...

Post by river2974 » Mon 04 Aug 2008 01:19

The test app can be found here...

http://rapidshare.com/files/134660237/test.zip.html

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 04 Aug 2008 08:16

We have fixed this problem. The fix will be included in the next build of ODAC.

Post Reply