Recent

Author Topic: Lazarus Cocoa trunk arithmetic error and access violations in IDE  (Read 6773 times)

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Lazarus Cocoa trunk arithmetic error and access violations in IDE
« Reply #15 on: September 02, 2018, 12:38:04 am »
I'm currently getting SIGSEV error when closing a complex application in Cocoa. This does not happen on other platforms, and was not happening a few days ago (I'm now on 58796). I can't figure out where it is happening, setting breakpoints I oddly end up in "carbonprivate.pp".  %)

I traced this down to calls to ExtractRelativePath. I'm getting paths like '../../../Volumes/XXX' which cause errors. A workaround so far is to strip this to '/Volumes/XXX'. The application no longer fails, but I'm not clear why this is.

EDIT: I was concatenating basepath + datapath instead of using ConcatPaths. No more SIGSEV when closing the Cocoa application (and workaround is not needed).
« Last Edit: September 02, 2018, 04:55:51 pm by VTwin »
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

 

TinyPortal © 2005-2018