Recent

Author Topic: TThread crash on 10.14 Mojave?  (Read 340 times)

rossh_lz

  • New member
  • *
  • Posts: 5
TThread crash on 10.14 Mojave?
« on: July 16, 2019, 05:31:56 pm »
Not sure if this is 10.14 Mojave error, or my specific computer gone wonky.

Now on 10.14, any use of a TThread has a fatal instant crash, both in Cocoa and Carbon.  Project was all OK in older 10.13 OSX.

I only have one iMac to work with here.   I tried the latest svn of FPC... no joy. Attached is a bare bones test app.  Could someone please compile and run this on 10.14 and report back.    press the button - success or crash.

Many thanks


skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2290
    • havefunsoft.com
Re: TThread crash on 10.14 Mojave?
« Reply #1 on: July 16, 2019, 07:11:28 pm »
Project -> View Project Source

replace
Code: Text  [Select]
  1. uses
  2.   {$IFDEF UNIX}{$IFDEF UseCThreads}
  3.   cthreads,
  4.   {$ENDIF}{$ENDIF}
  5.   Interfaces,
  6.  
with
Code: Text  [Select]
  1. uses
  2.   {$IFDEF UNIX}
  3.   cthreads,
  4.   {$ENDIF}
  5.   Interfaces,
  6.  

It should do the trick.

Similar threads:
https://forum.lazarus.freepascal.org/index.php?topic=6437.0
https://forum.lazarus.freepascal.org/index.php/topic=39028
« Last Edit: July 16, 2019, 07:29:20 pm by skalogryz »
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

rossh_lz

  • New member
  • *
  • Posts: 5
Re: TThread crash on 10.14 Mojave?
« Reply #2 on: July 16, 2019, 07:41:35 pm »
Thank you.   Yes, that did the trick.