I draw the header of a chart to print by my own.
This works fine in about 50% of all cases.
In the rest there is the message of an access violation.
I have no idea what makes the difference.
I only found the line: The line below throws an exception in about 50% of all cases.
No commons can be found. Sometimes on the first attempt after the software restart, - it works, sometimes it does not.
In the debug window the values of Chart1.Title.ShapeBounds, Chart1, etc. look normal and fine.
So this is the critical line:
Code: Select all
try
Chart1.Canvas.Rectangle(Chart1.Title.ShapeBounds);
except
ShowMessage('the nasty line did it again');
end;
Any repaint, reset, clear,.... any debug?
I cannot post the whole project or a the part containing it.
The project is too huge and nested.
Thanks,
Cheryll