Recent

Author Topic: Running program with debug gets EXC_BAD_ACCESS when it terminates (OSX)  (Read 262 times)

ahnz

  • Jr. Member
  • **
  • Posts: 57
Heres what I have ...

OS: OSX High Sierra 10.13.6
Lazarus: 2.0.2 rev.61074

Widgetset: Cocoa
Target: 64bit OSX

Compiler:
FPC 3.0.4 [2017/11/26] for x86_64

Debug:
LLDB  (with fpdebug)(Beta)
Path: /usr/bin/lldb
Version: lldb-1000.11.38.2



Every time I run my program with debugging, when it terminates as part of normal behaviour, I get the attached error and call_stack

Step #8 of the call stack refers to cocoa buttons line 217. That section of code appears to be releasing a button with a Glyph ...

Quote
procedure TCocoaButton.dealloc;
begin
  if Assigned(Glyph) then
    FreeAndNil(Glyph);

  inherited dealloc;
end;

My main form has  a number of TBitBtn's with glyphs, but they all seem to be setup correctly, all done in the form editor with no parameters being set in code

Does anyone have any ideas on what could be causing this or where I should be looking next?


Cheers

PS: This appears unrelated to another issue I have poster about the use of heaptrc
OS: OSX High Sierra 10.13.6
Lazarus: 2.1.0, r61162

Widgetset: Cocoa
Target: 64bit OSX

Compiler:
FPC 3.0.4 [2017/11/26] for x86_64

Debug:
LLDB  (with fpdebug)(Beta)
Path: /usr/bin/lldb
Version: lldb-1000.11.38.2

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5515
    • wiki
There are a few cocoa/bitbtn fixes in svn trunk.
I do not know if all of them are merged for the fixes branch. You can check with "svn log" and via the wiki merges page.

For any info why/what/when is merged you need to ask on the mail list, to get an answer from the cocoa maintainer.

ahnz

  • Jr. Member
  • **
  • Posts: 57
Thanks Martin_fr

A bit more experimenting and it's definitely a problem with TBitBtn.. remove the Glyph in form editor and the issue goes away. I've been unable to clear the Glyph in code so replaced the buttons with TSpeedButton and all is fine.

I'll go check the mailing etc

Cheers
OS: OSX High Sierra 10.13.6
Lazarus: 2.1.0, r61162

Widgetset: Cocoa
Target: 64bit OSX

Compiler:
FPC 3.0.4 [2017/11/26] for x86_64

Debug:
LLDB  (with fpdebug)(Beta)
Path: /usr/bin/lldb
Version: lldb-1000.11.38.2