On 2020-09-01 23:44, Bo Berglund via fpc-pascal wrote:
On Tue, 01 Sep 2020 22:46:55 +0200, Bo Berglund via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:
Hi,
Further to this mystery: If I remove LazSerialPort from the dependencies and instead put SdpoSerialLaz there instead it also solves the problem: - Program builds fine - Program does not crash when the read thread is created. But remove this so the only dependency is LCL then the program builds but crashes when the read thread is created after the serial port has been opened.
Well, I believe that this supposed mystery may be resolved easily. ;-) First of all - have you tried to find out what does the displayed error number (232) mean? Quick searching reveals that runtime error 232 may signalize that you try to use threads without having a thread manager included in your application. Under Linux/Unix, you can add a thread manager by adding unit cthreads to the uses section of your program. That also provides explanation of your "mystery" - the other dependencies tried by you included this unit by themselves and thus you didn't need to do so in your program.
Hope this helps Tomas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal