Runtime error when include cthreads lib lazarus / 32-Linux ---------------------------------------------------------------------- guiwunsch · 2021-07-25 23:23 Hi. I'm trying to code a multithread application in Lazarus, but I've noticed that when I include the "cthreads" lib (always the first line of my project.lpr file), on some Linux distros, I get a runtime error when running the application. I believe it's some broken library. However, I don't know how to identify it. Could you help me? project1.lpr: Code: [Select]program project1; uses   cthreads,   cmem; begin   writeln('test'); end. error: Code: [Select][root@dockerinaja /]# ./project1 Runtime error 203 at $0000000000418D5C   $0000000000418D5C   $000000000040086D ldd ./project1: Code: [Select][root@dockerinaja /]# ldd /project1         linux-vdso.so.1 (0x00007ffc43fbd000)         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f359ff5e000)         libdl.so.2 => /lib64/libdl.so.2 (0x00007f359ff58000)         libc.so.6 => /lib64/libc.so.6 (0x00007f359fd92000)         /lib64/ld-linux-x86-64.so.2 (0x00007f359ff8b000) ---------------------------------------------------------------------- Handoko · 2021-07-26 02:13 This is the default uses clause generated by Lazarus, maybe you can try: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses  {$IFDEF UNIX}{$IFDEF UseCThreads}  cthreads,  {$ENDIF}{$ENDIF}  Interfaces, // this includes the LCL widgetset  Forms, unit1  { you can add units after this }; ---------------------------------------------------------------------- guiwunsch · 2021-07-26 02:22 I've tried it that way. I just removed it to simplify the code in my sample to show that even codding very "clean" it presents the same error. I believe it is nothing in the code, but in the Linux distribution, as the same code works in other distributions. However, I would like some tips, as I don't know where to start debugging this problem. ---------------------------------------------------------------------- ccrause · 2021-07-26 06:14 Quote from: guiwunsch on July 26, 2021, 04:22:05 am However, I would like some tips, as I don't know where to start debugging this problem. Runtime error 203 means heap overflow. Perhaps remove cmem, or put it before cthreads. ---------------------------------------------------------------------- guiwunsch · 2021-07-31 22:54 I noticed that I had a very old version of Free Pascal. I just updated to version 3.2.0 and it fixed my problem. Thanks.