<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><span class="tab">    <br></span><div><span class="tab">    </span>Hi,</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">    I can reproduce the error, too. Thanks for the report. About advice on fixing it, you need to look at </span><span style=" color:#000000;">marshall_ItemList in marshal_macros.h. This is the method used to marshal lists. Also, on 8.5.2012</span><span class="tab"> I made a great change in handlers.cpp (you can check the git log). The problem I was having
 was that calling QPrinterInfo.PrinterName on any printer contained in the list returned by </span><span class="tab">QPrinterInfo.AvailablePrinters caused a crash. I resolved that by removing any marshalling of list elements by value and always using pointers instead - with the reasoning that in C# class instances are always pointers. It worked great and I haven't had any problems since. However, there is a chance that same change broke the marshalling of other lists (such as lists of QUrl). What you could try is remove those changes and see if the list is OK with the old code.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">    I am working on other issues right now and will give a hand as soon as I'm done. Good luck.</span><br><span class="tab">    <br></span></div><div style="color: rgb(0,
 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">    Best regards,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">    Dimitar</span><span class="tab"><br></span></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> David Lechner <david@lechnology.com><br> <b><span style="font-weight: bold;">To:</span></b> kde-bindings@kde.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, February 19, 2013 8:21 AM<br> <b><span
 style="font-weight: bold;">Subject:</span></b> [Kde-bindings] [Qyoto] crash when using QList returned by QMimeData.Urls<br> </font> </div> <br>
<br>I am getting a crash when trying to access the QUrl objects returned by QMimeData.Urls.<br><br>Here is the stack trace of the crash<br><br>> Program received signal SIGSEGV, Segmentation fault.<br>> QMutex::lockInline (this=0x82) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:187<br><br>> #0  QMutex::lockInline (this=0x82) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:187<br>> #1  0x00007fffef6fcc38 in QMutexLocker (m=<optimized out>, this=0x7fffffffde40) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:109<br>> #2  QUrl::isLocalFile (this=0xc2f050) at io/qurl.cpp:6332<br>> #3  0x00007fffefcf63f4 in __smokeqtcore::x_QUrl::x_73 (this=0xc2f050, x=0xc82c10) at /home/david/obj/smokeqt/qtcore/x_18.cpp:2318<br>> #4  0x00007fffefcee128 in __smokeqtcore::xcall_QUrl (xi=73, obj=0xc2f050, args=0xc82c10) at /home/david/obj/smokeqt/qtcore/x_18.cpp:2594<br>> #5 
 0x00007ffff47162db in Qyoto::MethodCall::callMethod (this=0x7fffffffe060) at /home/david/dev/assemblygen/assemblies/qyoto-qtcore/native/methodcall.cpp:93<br>> #6  0x00007ffff47165a6 in Qyoto::MethodCall::next (this=0x7fffffffe060) at /home/david/dev/assemblygen/assemblies/qyoto-qtcore/native/methodcall.cpp:123<br>> #7  0x00007ffff471f739 in CallSmokeMethod (smoke=0xa46120, methodId=5374, obj=0x2b, sp=0x7ffff7fd6160, items=0, typeIDs=0x7ffff7fd6138) at /home/david/dev/assemblygen/assemblies/qyoto-qtcore/native/qyoto.cpp:318<br>> #8  0x0000000040046429 in ?? ()<br><br><br>From using gdb, I have determined that the QUrl reference is getting messed up somewhere in the QList. In the stack trace below, a QUrl was created at the address of 0xc2f050, but when it is returned through the QList<QUrl> we are getting the address 0x7fffffffdce0. But if you look, QUrl->d is 0xc2f050, which should the the QUrl itself. So, I am guessing
 that something is getting a bit off in the casting somewhere.<br><br>> #0  0x00007fffef6f6ece in ref (this=0xc2f050) at ../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:121<br>> #1  QUrl::QUrl (this=0x7fffffffdce0, other=...) at io/qurl.cpp:4263<br>> #2  0x00007fffef75445c in QMimeData::setUrls (this=<optimized out>, urls=...) at kernel/qmimedata.cpp:336<br>> #3  0x00007fffefcba25e in __smokeqtcore::x_QMimeData::x_10 (this=0xc28980, x=0xc45740) at /home/david/obj/smokeqt/qtcore/x_11.cpp:725<br>> #4  0x00007fffefcb7420 in __smokeqtcore::xcall_QMimeData (xi=10, obj=0xc28980, args=0xc45740) at /home/david/obj/smokeqt/qtcore/x_11.cpp:962<br>> #5  0x00007ffff47162db in Qyoto::MethodCall::callMethod (this=0x7fffffffe040) at /home/david/dev/assemblygen/assemblies/qyoto-qtcore/native/methodcall.cpp:93<br>> #6  0x00007ffff47165a6 in Qyoto::MethodCall::next (this=0x7fffffffe040) at
 /home/david/dev/assemblygen/assemblies/qyoto-qtcore/native/methodcall.cpp:123<br>> #7  0x00007ffff47086d5 in marshall_ItemList<QUrl, QList<QUrl*>, ((const char*)((char*)(& {anonymous}::QUrlListSTR)))>(Marshall *) (m=0x7fffffffe040) at /home/david/dev/assemblygen/assemblies/qyoto-qtcore/native/marshall_macros.h:52<br>> #8  0x00007ffff4716558 in Qyoto::MethodCall::next (this=0x7fffffffe040) at /home/david/dev/assemblygen/assemblies/qyoto-qtcore/native/methodcall.cpp:120<br>> #9  0x00007ffff471f739 in CallSmokeMethod (smoke=0xa46120, methodId=3722, obj=0x33, sp=0x7ffff7f6d770, items=1, typeIDs=0x7ffff7fd6390) at /home/david/dev/assemblygen/assemblies/qyoto-qtcore/native/qyoto.cpp:318<br>> #10 0x0000000040046429 in ?? ()<br><br>I am stuck on where to go from here to fix this. Any advice?<br><br>I have attached the program I am using to reproduce the
 bug.<br><br>_______________________________________________<br>Kde-bindings mailing list<br><a ymailto="mailto:Kde-bindings@kde.org" href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a><br><a href="https://mail.kde.org/mailman/listinfo/kde-bindings" target="_blank">https://mail.kde.org/mailman/listinfo/kde-bindings</a><br><br><br> </div> </div>  </div></body></html>