Recent

Author Topic: [SOLVED]Linux External Sigabrt Help  (Read 4187 times)

RastaManKing

  • New Member
  • *
  • Posts: 14
[SOLVED]Linux External Sigabrt Help
« on: December 10, 2018, 07:18:17 am »
I am trying to implement multi-threading in my application(Linux x86_64)
for this i added -dUseCThreads to my custom compiler options
also added:

Code: Pascal  [Select][+][-]
  1. {$ifdef unix}
  2.     cthreads, cmem,
  3.   {$endif}

got error so i tried with:

Code: Pascal  [Select][+][-]
  1. {$ifdef unix}{$ifdef UseCThreads}
  2.     cthreads, cmem,
  3.   {$endif}{$endif}

but i keep getting same error:

Quote
Project project1 raised exception class 'External: SIGABRT'.

 At address 7FFFF6F43D7F

assembler marks:

Code: Pascal  [Select][+][-]
  1. 00007FFFF6F43D7F 488b8c2408010000         mov    0x108(%rsp),%rcx

and GDB is not being nice to me :'(
any ideas? if i need to debug this further, can someone point me in the right GDB documentation?

Thank You  :-[
« Last Edit: December 12, 2018, 02:34:23 am by RastaManKing »

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Linux External Sigabrt Help
« Reply #1 on: December 10, 2018, 07:56:05 am »
Try to put cmem first, then cthreads after it.

RastaManKing

  • New Member
  • *
  • Posts: 14
Re: Linux External Sigabrt Help
« Reply #2 on: December 10, 2018, 08:49:14 am »
Try to put cmem first, then cthreads after it.

i get the same error still :(

i should add that there is still NO multithreading code, i just added cthreads, cmem and the error came up.

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Linux External Sigabrt Help
« Reply #3 on: December 10, 2018, 10:39:11 am »
Are you adding those units in the main program source?
Can you test that does simple console/terminal program crash?

RastaManKing

  • New Member
  • *
  • Posts: 14
Re: Linux External Sigabrt Help
« Reply #4 on: December 10, 2018, 05:56:02 pm »
Are you adding those units in the main program source?
Can you test that does simple console/terminal program crash?
yes, this uses are in the main program's unit,
i will try to add this refs to a new console project and report back...

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: Linux External Sigabrt Help
« Reply #5 on: December 10, 2018, 06:15:38 pm »
Well, Linux + console app + debugger (+ threads) is not currently very strong feature of Lazarus, however, my threaded console apps works ok with such lpr header:

Code: Pascal  [Select][+][-]
  1. program progxxx;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5.   {$IFDEF UNIX}cthreads, cmem, {$ENDIF} Classes, ...;
  6.  
  7. begin
  8.  
  9.  

Try to tweak Run parameters -> launching application.
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

RastaManKing

  • New Member
  • *
  • Posts: 14
Re: Linux External Sigabrt Help
« Reply #6 on: December 10, 2018, 06:26:09 pm »
Well, Linux + console app + debugger (+ threads) is not currently very strong feature of Lazarus, however, my threaded console apps works ok with such lpr header:

Code: Pascal  [Select][+][-]
  1. program progxxx;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5.   {$IFDEF UNIX}cthreads, cmem, {$ENDIF} Classes, ...;
  6.  
  7. begin
  8.  
  9.  

Try to tweak Run parameters -> launching application.

Well i just started a new console application and it had cthreads refference added already and compiled just fine, i noticed that cmem was missing, so i went to my project and removed cmem from the refferences and now the problem is gone, so i guess cmem was causing the external sigabtr exception,
will i have a real problem for not using cmem? should i keep looking into a way to be able to use cmem?
« Last Edit: December 10, 2018, 06:28:01 pm by RastaManKing »

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: Linux External Sigabrt Help
« Reply #7 on: December 11, 2018, 10:08:03 am »
Quote
will i have a real problem for not using cmem? should i keep looking into a way to be able to use cmem?

Generally no, but please search wiki and forum about cmem.
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

RastaManKing

  • New Member
  • *
  • Posts: 14
Re: Linux External Sigabrt Help
« Reply #8 on: December 12, 2018, 02:33:42 am »
Quote
will i have a real problem for not using cmem? should i keep looking into a way to be able to use cmem?

Generally no, but please search wiki and forum about cmem.

Thank you, i will mark as solved.

 

TinyPortal © 2005-2018