Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-11

EXC_BAD_ACCESS on i386-darwin

6 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders

Hi,

I am looking at http://www.freepascal.org/mantis/view.php?id=7723

When the exception is risen the following error is given: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x0000004f 0x0019409e in GTKAPIWIDGETCLIENT_DRAWCARET (CLIENT=0x4d38e00, CALLEDBYTIMER=false) at gtkwinapiwindow.pp:730
730 gtkwinapiwindow.pp: No such file or directory. in gtkwinapiwindow.pp

What kind of exception is this?

Line 730 contains:
if Visible and Blinking and (Timer = 0)

The same variables are used earlier in the procedure, so I don't think the pointer to the complete record is wrong (e.g. nil).

The variables accessed are fields in a TCaretInfo record acessed within a with block

   TCaretInfo = record
     X: Integer;
     Y: Integer;
     Width: Integer;
     Height: Integer;
     Visible: Boolean;  // Caret is on
     IsDrawn: Boolean;  // Caret is visible at the moment
     Blinking: Boolean; // Caret should blink
     Pixmap: PGDKPixMap;
     BackPixmap: PGDKPixMap;
     Timer: guint;
     ShowHideOnFocus: boolean; // true = hide on loose focus, show on get focus
   end;

Vincent

Reply by email

Jonas Maebe
to Vincent Snijders
Vincent Snijders wrote 11 lines
I am looking at http://www.freepascal.org/mantis/view.php?id=7723 When the exception is risen the following error is given: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x0000004f 0x0019409e in GTKAPIWIDGETCLIENT_DRAWCARET (CLIENT=0x4d38e00, CALLEDBYTIMER=false) at gtkwinapiwindow.pp:730 730 gtkwinapiwindow.pp: No such file or directory. in gtkwinapiwindow.pp What kind of exception is this?

The Mach equivalent of SIGSEGV. You can see the accessed address is 0x0000004f, which is clearly wrong.

Show quoted text 5 lines
Line 730 contains: if Visible and Blinking and (Timer = 0) The same variables are used earlier in the procedure, so I don't think the pointer to the complete record is wrong (e.g. nil).

It seems it nevertheless is nil at that point (potentially due to a wrong optimization).

Jonas

Reply by email

Vincent Snijders
to Jonas Maebe: Can you move that issue to FPC? It's an SSU bug (for which I'm currently testing the fix).
Jonas Maebe wrote 9 lines
On 02 Nov 2006, at 14:37, Vincent Snijders wrote: > I am looking at http://www.freepascal.org/mantis/view.php?id=7723 Can you move that issue to FPC? It's an SSU bug (for which I'm currently testing the fix).

Thanks with the correct link:
http://www.lazarus.freepascal.org/index.php?name=PNphpBB2&file=viewtopic&p=14028#14028

Vincent

Reply by email