Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EAccessViolation drawback, need help on this one 2

Status
Not open for further replies.

Gutto

Programmer
Aug 2, 2006
2
BR
An exception class EAccessViolation with message AccessViolation at address 00491AA7 read of address 00000000 has shown up in my program. need to solve this one, but can find the light. help!!
 
I have found that access violations occur when you are trying to do something with an object that no longer exists or hasn't been created yet. For instance, if you have a form named frmTwo with a function GetInfo and frmOne is trying to use GetInfo, but frmTwo hasn't been created.

Have you located where in the code the error occurs? What line is the program trying to run when you get the violation?

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases:
The Fundamentals of Relational Database Design
Understanding SQL Joi
 
try to debug to where it generates the AV.

then show us some code

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Usualy the debugger will halt execution somwhere past the point where the Exception was generated. put a breakpoint in the code a few lines in front of this, and move it up until you dont get the error, then use the 'step' button to find the exact line where the error is generated.
But as lespaul says this is often (but not always) down to trying to access objects that havnt been 'created'.


Steve: Delphi a feersum engin indeed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top