Solved

TMultiReadExclusiveWriteSynchronizer.EndWrite throw EAccessViolation

Posted on 2002-07-01
5
687 Views
Last Modified: 2010-04-04
Hi,

A TMultiReadExclusiveWriteSynchronizer that was initialized (in the initialization section of the unit) raised a EAccessViolation on attempt to EndWrite().
This happen suddently after many calls to the function containing the call to EndWrite()

How can that be?

(Delphi 6 Professinal)

Offir.
0
Comment
Question by:mathought
  • 3
  • 2
5 Comments
 
LVL 14

Expert Comment

by:AvonWyss
ID: 7121932
Maybe the memory area whgere the object is stored in got overwritten, or its pointer was somehow corrupted? This is more often the case than you may think.
0
 

Author Comment

by:mathought
ID: 7122012
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 7122303
Deadlocks have nothing top do with AVs. Therefore, this bug (which actually is a conclusion of the way a TMultiReadExclusiveWriteSynchronizer works) has nothing to do with the problem mentionned here.

A deadlock happens when two (or more) threads are in a waiting state, each one waiting for the other one, therefore never existing the wait state.
0
 

Author Comment

by:mathought
ID: 7123981
I had both daed-locks and this AV.
When I moved to TCriticalSection, the problem disappeared.
0
 
LVL 14

Accepted Solution

by:
AvonWyss earned 100 total points
ID: 7124601
A critical section is both smaller and cannot lead to deadlocks as long as only one CS is in use. However, I still would not expect any AV to happen.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now