[Lazarus] Carbon: GetTextExtentPoint and Access Violation

Bent Normann Olsen bent at earmaster.com
Mon Jun 16 14:09:58 CEST 2008


Thanks Tom, but it called CheckDC each time with no errors, at least after
my initial tests. I can't reproduce the crash on a test application, so the
crash occurs on some conditions I can't recreate.

I did find out that the DC is the hints form canvas handle, and its
CustomForm.PaintWindow is called, where its canvas handle is set to 0, and
soon after that Dispatch(LM_PAINT msg) is called causing a crash?

The controls are ToolButtons on a ToolBar, and only one specific button
(with a hint string 'User overview (CTRL+U)') causes the crash, if it's the
first to show a hint. The hint form gets visible on screen before crash.

But my biggest problem is, as mentioned, that I can't reproduce the crash on
a smaller test application, which could have been a big help isolating the
problem.

Any clues or ideas? I'll try to come up with some ways to locate the problem
more precisely.

Normann

-----Original Message-----
From: lazarus-bounces at lazarus.freepascal.org
[mailto:lazarus-bounces at lazarus.freepascal.org] On Behalf Of Tom Gregorovic
Sent: 16. juni 2008 11:36
To: General mailing list
Subject: Re: [Lazarus] Carbon: GetTextExtentPoint and Access Violation

On Mon, Jun 16, 2008 at 10:53 AM, Bent Normann Olsen <bent at earmaster.com>
wrote:
[snip]

Message type is LM_PAINT.
Try to debug the CheckDC. Maybe the DC is not valid object.

Tom




More information about the Lazarus mailing list