Recent

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

VTwin

  • Hero Member
  • *****
  • Posts: 787
  • 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

macOS 10.13.6: Lazarus 2.0 (2.0.7) fixes svn 62148 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)
fpc 3.0.4