[omniORB] Strange access violation -- What do you think?
Brenneis, Steven W.
BRENNES1@RJRT.com
Thu, 27 Aug 1998 07:41:38 -0400
Sorry about the lack of version information.
Yes I am using the 4/10 snapshot on version 2.5.0 on Windows-NT version 4.0. I compared the snippet of code you sent to what I am
using and they are identical. The application uses a callback mechanism to notify clients of changes to object states. The client
registers the callback with the server object on construction and then unregisters the callback during destruction. The server
invokes the callback notification member function from within a separate (omni_) thread. The problem usually occurs shortly after
the client application has exited.
Steve Brenneis
> -----Original Message-----
> From: Sai-Lai Lo [SMTP:S.Lo@orl.co.uk]
> Sent: Wednesday, August 26, 1998 5:31 PM
> To: Brenneis, Steven W.
> Cc: omniorb-list@cam-orl.co.uk
> Subject: Re: [omniORB] Strange access violation -- What do you think?
>
> Brenneis,
>
> Are you using omniORB_2.5.0? There is a bug in Strand::SyncWrTimedLock()
> which has been fixed in snapshot_980410. If you have already using that
> version, then we have to dig deeper.
>
>
> -------- src/lib/omniORB2/strand.cc ------------------------
> CORBA::Boolean
> Strand::
> Sync::WrTimedLock(Strand* s,
> CORBA::Boolean& heartbeat,
> unsigned long secs,
> unsigned long nanosecs)
> {
> CORBA::Boolean notimeout;
> // Note: the caller must have got the mutex s->pd_rope->pd_lock
> while (s->pd_wr_nwaiting < 0) {
> s->pd_wr_nwaiting--;
> notimeout = s->pd_wrcond.timedwait(secs,nanosecs);
> if (s->pd_wr_nwaiting >= 0)
> s->pd_wr_nwaiting--;
> else
> s->pd_wr_nwaiting++;
> if (!notimeout && s->pd_wr_nwaiting < 0) {
> // give up;
> return 0;
> }
> }
> s->pd_wr_nwaiting = -s->pd_wr_nwaiting - 1;
>
> CORBA::Boolean hb = s->pd_heartbeat;
> s->pd_heartbeat = heartbeat;
> heartbeat = hb;
> return 1;
> }
> ---------------------------------------------------------------
>
>
> Sai-Lai
>
>
> --
> Dr. Sai-Lai Lo | Research Scientist
> |
> E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab
> | 24a Trumpington Street
> Tel: +44 223 343000 | Cambridge CB2 1QA
> Fax: +44 223 313542 | ENGLAND