Public bug reported:

Here is sample code:
#v+
using Qyoto;

class Dupa:QWidget
{
        QGridLayout layout=new QGridLayout();
        public Dupa()
        {
                for(int i=0;i<11;++i)
                {
                        layout.AddWidget(new QLabel(i.ToString()),i,0);
                        layout.AddWidget(new QLineEdit(i.ToString()),i,1);
                }
                SetLayout(layout);
                Show();
        }
        static void Main(string[] args)
        {
                new QApplication(args);
                new Dupa();
                QApplication.Exec();
        }
}
#v-
Compilation method: gmcs -r:/usr/lib/cli/qyoto-1.0/qt-dotnet.dll dupa.cs

And here is the result of executing `mono dupa.exe':
#v+
ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects 
owned by a different thread. Current thread b4e00788. Receiver '' (of type 
'QWidget') was created in thread 8402fe0", file kernel/qcoreapplication.cpp, 
line 269
Stacktrace:

  at (wrapper managed-to-native) Qyoto.SmokeInvocation.CallSmokeMethod 
(int,intptr,intptr,int) <0x00004>
  at (wrapper managed-to-native) Qyoto.SmokeInvocation.CallSmokeMethod 
(int,intptr,intptr,int) <0xffffffff>
  at Qyoto.SmokeInvocation.Invoke (string,string,System.Type,object[]) <0x00895>
  at Qyoto.QLabel.Finalize () <0x00035>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void 
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        /usr/bin/cli [0x8194ca6]
        /usr/bin/cli [0x8177154]
        [0xffffe440]
        /lib/tls/i686/cmov/libc.so.6(abort+0x101) [0xb7d5e201]
        /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0xcf) 
[0xb64fe01d]
        /usr/lib/libQtCore.so.4(_Z6qFatalPKcz+0x7f) [0xb64fe0a1]
        /usr/lib/libQtCore.so.4(_Z11qt_assert_xPKcS0_S0_i+0x3c) [0xb64fe0f8]
        
/usr/lib/libQtCore.so.4(_ZN23QCoreApplicationPrivate19checkReceiverThreadEP7QObject+0x26f)
 [0xb65bd70f]
        /usr/lib/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x7c) 
[0xb5e5c4ea]
        
/usr/lib/libsmokeqt4.so.1(_ZN14x_QApplication6notifyEP7QObjectP6QEvent+0x87) 
[0xb6ad6b73]
        
/usr/lib/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x80)
 [0xb65bc456]
        /usr/lib/libQtGui.so.4 [0xb5e5917f]
        /usr/lib/libQtGui.so.4(_ZN7QWidgetD2Ev+0x3ba) [0xb5eb0c74]
        /usr/lib/libQtGui.so.4(_ZN6QFrameD2Ev+0x3d) [0xb61f8ac3]
        /usr/lib/libQtGui.so.4(_ZN6QLabelD2Ev+0x56) [0xb6200a10]
        /usr/lib/libsmokeqt4.so.1(_ZN8x_QLabelD0Ev+0x72) [0xb6c1555c]
        /usr/lib/libsmokeqt4.so.1(_Z12xcall_QLabelsPvPN5Smoke9StackItemE+0x50c) 
[0xb6be8902]
        /usr/lib/libqyoto.so(_ZN10MethodCall4nextEv+0x143) [0xb7040723]
        /usr/lib/libqyoto.so(CallSmokeMethod+0xdd) [0xb703942d]
        [0xb7072c1c]
        [0xb7071b3e]
        [0xb503603e]
        [0xb79890db]
        /usr/bin/cli [0x8176f50]
        /usr/bin/cli(mono_runtime_invoke+0x27) [0x80b0b2f]
        /usr/bin/cli [0x80cacfe]
        /usr/bin/cli [0x813ff70]
        /usr/bin/cli [0x80ca4c1]
        /usr/bin/cli [0x80caed2]
        /usr/bin/cli [0x80e92fb]
        /usr/bin/cli [0x81316ad]
        /usr/bin/cli [0x814ab16]
        /lib/tls/i686/cmov/libpthread.so.0 [0xb7ea646b]
        /lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0xb7e0573e]
ASSERT: "q->testAttribute(Qt::WA_WState_Created)" in file 
kernel/qwidget_x11.cpp, line 1631
#v-

IMO this isn't normal behaviour and should be repaired in some way.

** Affects: qyoto (Ubuntu)
     Importance: Undecided
         Status: New

-- 
cross-thread access to qt widgets
https://bugs.launchpad.net/bugs/157677
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to