<div>Hi.<br></div><div><br></div><div>Yes, I am quite new to QT. I have done some small things with QTDeigner in the past, but that is about it.</div><div><br></div><div>I have tried to get a backtrace using gdb, but many of the libraries I am trying to use do not have debug symbols. So I mostly get unresolved symbols in the trace. I unfortunately cannot rebuild the libraries myself to add these. </div>
<div>Is there a way in QT to get a stacktrace? Something I can put just after the thread Check (Where the ASSERT happens)? </div><div><br></div><div>Thanks,</div><div>Harry</div><br><div class="gmail_quote">2009/7/22 Thiago Macieira <span dir="ltr"><<a href="mailto:thiago@kde.org">thiago@kde.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Harry Liebel wrote:<br>
>Hi.<br>
><br>
>I am trying to create a new backend. I have a set of multimedia<br>
> libraries that I am trying to wrap up in a plugin. I have had some<br>
> success and some problems.<br>
><br>
>I am more of a C driver person so I may be making bad assumptions and<br>
>obvious mistakes :-)<br>
<br>
</div>Hi Harry<br>
<br>
Does this mean you're rather unfamiliar with Qt?<br>
<div class="im"><br>
>What happens:<br>
>I can start the mediaplayer app and select a media file to play. It<br>
> starts playing full screen. If I move<br>
>the mouse the app crashes and I get :<br>
><br>
>---<br>
>ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to<br>
>objects owned by a different thread. Current thread 84f2ee0. Receiver ''<br>
> (of type 'QSocketNotifier') was created in thread 805e6b8"<br>
>---<br>
<br>
</div>Look at the backtrace when this failed assertion happens to find out what<br>
caused it.<br>
<br>
I doubt you're using sendEvent directly, so it's more likely you're<br>
accessing a QObject outside its creation thread. Please understand that<br>
any and every QObject is attached to the thread it is created in (unless<br>
you move it), and that's the only thread you can call Qt functions in.<br>
<br>
More importantly, objects derived from QWidget can only be created in the<br>
GUI thread.<br>
<div class="im"><br>
>Currently I use the 'setsource' call to call the library<br>
>init(<path-to-file>). When I do not call init() the mediaplayer app does<br>
> not crash. It looks like the init() spawns a seperate thread in the<br>
> background. I have tried to put the library init() in a Qthread, but it<br>
> crashes in the same way.<br>
><br>
>I have read that QT does not like to send/receive events from threads<br>
> that are not under its control. This I can understand. Is there a easy<br>
> way to wrap up a 'library thread' so QT does not try to send/receive<br>
> events? Do I need to wrap the library up in a Qprocess?<br>
<br>
</div>Sending from threads not created with QThread should not be a problem.<br>
<br>
Can you post your backtrace?<br>
<font color="#888888">--<br>
  Thiago Macieira  -  thiago (AT) <a href="http://macieira.info" target="_blank">macieira.info</a> - thiago (AT) <a href="http://kde.org" target="_blank">kde.org</a><br>
    PGP/GPG: 0x6EF45358; fingerprint:<br>
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358<br>
</font><br>_______________________________________________<br>
kde-multimedia mailing list<br>
<a href="mailto:kde-multimedia@kde.org">kde-multimedia@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-multimedia" target="_blank">https://mail.kde.org/mailman/listinfo/kde-multimedia</a><br>
<br></blockquote></div><br>