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 Once I saw error refere to TLoggerLazBase(or something like that). And this is the code: procedure SyncMetaProc(handle: HSYNC; channel, data: DWORD; user: Pointer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; begin // Synchronize with main thread Application.QueueAsyncCall(@MusicPlayer.AsyncMetaChanged, 0); end; procedure TPlayer.AsyncMetaChanged(Data: PtrInt); var m: PAnsiChar; sDef: String; begin m := BASS_ChannelGetTags(FMusic, BASS_TAG_META); if (m<>nil) and Assigned(FOnMeta) then FOnMeta(Self, ) if (MusicPlayer.FPlaylist<>nil) and (MusicPlayer.FPlaylist.Indicator<>nil) then sDef := MusicPlayer.FPlaylist.Indicator^.Title else sDef := 'Unknown'; FTitle := MusicPlayer.ExtractStreamTitle(BASS_ChannelGetTags(FMusic, BASS_TAG_META), sdef); DoStatus; end; begin if FSyncMeta=0 then FSyncMeta := BASS_ChannelSetSync(FMusic, BASS_SYNC_META, 0, @SyncMetaProc, nil); end; Note that even if I comment Application.QueueAsyncCall.... then I get same error and output. Should I report this with Qt widgetset category? Tested on Kubuntu 14.04 64bit, FPC 2.6.4
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus