Lazarus

Free Pascal => Unix => Topic started by: RastaManKing on December 13, 2018, 10:04:08 am

Title: External SIGSEGV
Post by: RastaManKing on December 13, 2018, 10:04:08 am
Hello again xD
another problem with my multi-threading,
im taking baby steps but slowly advancing.
now im getting a different external exception:
External: SIGSEGV
This external exceptions are killing me! xD

well following the debbuger this error pops up on here:
Code: Pascal  [Select][+][-]
  1. constructor TMyThread.Create(CreateSuspended: boolean);
  2. begin
  3.   inherited Create(CreateSuspended); //<--Here is the error...
  4.   FreeOnTerminate := True;
  5. end;

any ideas on what might be the trouble? i have -dUseCThreads on compiler custom options and {IFDEF Unix}cthreads{ENDIF} on my main unit...
the type definition is like this(Basically taken straight from the wiki multithreading example):
Code: Pascal  [Select][+][-]
  1. Type
  2.  
  3.     { TMyThread }
  4.  
  5.     TMyThread = class(TThread)
  6.     protected
  7.       procedure Execute; override;
  8.     public
  9.       constructor Create(CreateSuspended : boolean);
  10.     end;

Thanks in advance :)

EDIT: I should mention im trying this on linux x86_64
Title: Re: External SIGSEGV
Post by: MoCityMM on February 20, 2020, 11:47:08 am
Maybe the same issue with fix? https://www.daniweb.com/programming/software-development/threads/463385/thread-problem-error-constructors-destructors-and-class-operators
Title: Re: External SIGSEGV
Post by: rvk on February 20, 2020, 12:48:56 pm
Can you show the code where you create the instance of TMyThread?
TinyPortal © 2005-2018