Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

TMultiReadExclusiveWriteSynchronizer.EndWrite throw EAccessViolation

Posted on 2002-07-01
5
Medium Priority
?
701 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
 
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 400 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

618 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