Solved

TMultiReadExclusiveWriteSynchronizer.EndWrite throw EAccessViolation

Posted on 2002-07-01
5
689 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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