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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I can't access on variable 'Self' because....

Status
Not open for further replies.

David28

Programmer
Nov 14, 2004
8
DE
Hello,
In my Programm I get an EAcces-Violation Exception.
It occurs when I use the 'Scanline' method of a TBitmap - Object which I named FBitmap.
If I verify FBitmap with the debugger I get the message:

"Auf Variable 'Self' kann wegen Optimierung nicht zugegriffen werden"

"I can't access on variable 'Self' because of optimizing."
(Sorry,I dont know the the exact English translation.)


A instance of FBitmap exists. FBitmap is not nil.

Has anybody an idea what this means ?
Any idea about possible causes ?
Under which circumstances could this happen ?


Thank you very much for your answers.
 
Hi there.

Send a codesnippet and we will solve it for you... Probably... :)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is always another way to solve it, but I prefer my way.
 
The variable is most likly a local within a procedure or a function, the debugger can't see these if you stop on a breakpoint (due to optomistaion).
I belive newer versions of Delphi allow you to add a watch on locals, but I don't know how well this works as yet.


Steve: Delphi a feersum engin indeed.
 
I have found the error.
It was an aftereffect of an overflow-error.
Thank you very much for trying to help me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top