[Lazarus] SVN - SIGSEGV in external C lib when Lazarus in Debug mode (Qt)

Zeljko zeljko at holobit.net
Wed Mar 23 09:08:25 CET 2016



On 03/22/2016 09:58 PM, Krzysztof wrote:
> Hi,
>
> I have music player based on Bass library. It can play online radio and
> signal (metadata) if song in radio has changed. Code is quite old and
> Bass binary is not changed. Recently I updated SVN source (I need to use
> it because it has important bug fixes), rebuild Lazarus and receive
> metadata stopped worked but only in Debug mode, Release is working fine.
>
> This is output in debug mode:
>
> TApplication.HandleException Unknown Run-Time error : 202
>    Stack trace:
>    $0000000000437E5F
>    $00007F38A2AF6634
> QObject: Cannot create children for a parent that is in a different thread.
> (Parent is Oxygen::WidgetStateEngine(0x2812a90), parent's thread is
> QThread(0x272ddb0), current thread is QThread(0x7f3870000d20)
> QObject: Cannot create children for a parent that is in a different thread.
> (Parent is Oxygen::WidgetStateEngine(0x28161e0), parent's thread is
> QThread(0x272ddb0), current thread is QThread(0x7f3870000d20)
> QObject: Cannot create children for a parent that is in a different thread.
> (Parent is Oxygen::WidgetStateEngine(0x28161e0), parent's thread is
> QThread(0x272ddb0), current thread is QThread(0x7f3870000d20)
> QObject: Cannot create children for a parent that is in a different thread.
> (Parent is Oxygen::WidgetStateEngine(0x2812a90), parent's thread is
> QThread(0x272ddb0), current thread is QThread(0x7f3870000d20)
> QObject: Cannot create children for a parent that is in a different thread.
> (Parent is Oxygen::WidgetStateEngine(0x28161e0), parent's thread is
> QThread(0x272ddb0), current thread is QThread(0x7f3870000d20)
> QObject: Cannot create children for a parent that is in a different thread.
> (Parent is Oxygen::WidgetStateEngine(0x28161e0), parent's thread is
> QThread(0x272ddb0), current thread is QThread(0x7f3870000d20)
> QPixmap: It is not safe to use pixmaps outside the GUI thread
> QPixmap: It is not safe to use pixmaps outside the GUI thread
> QPixmap: It is not safe to use pixmaps outside the GUI thread
> QPixmap: It is not safe to use pixmaps outside the GUI thread
> QPixmap: It is not safe to use pixmaps outside the GUI thread
> QPainter::begin: Paint device returned engine == 0, type: 2
> QPixmap: It is not safe to use pixmaps outside the GUI thread

1. Try to run your application with another style. eg myapplication 
-styke plastique and see if you have same problem with children creation.

2.Using QPixmap outside of main thread is a big no-no, for that purpose 
you must use QImage.

zeljko




More information about the Lazarus mailing list