[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] PyQt. How to shoot yourself in the foot.
From:       Andrei Kopats <hlamer () tut ! by>
Date:       2014-08-24 16:10:25
Message-ID: CAMpovgGdmgnbbYOMd0gKqBhT3_YykWYzJRo0fm+Xni06geOFVg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Sun, Aug 24, 2014 at 5:47 PM, Yuya Nishihara <yuya@tcha.org> wrote:

> I can't tell you why this example raises "C++ object deleted" error.  It
> worked
> as expected with old-style connection:
>
>    QTimer.singleShot(1000, lineEdit, SLOT('selectAll()'))
>
> But I guess real-world cases of "C++ object deleted" error are caused by
> different reason than this example.
>

Of course I can't be absolutely sure what causes the crashes. But on real
word Enki Editor I had a few situations when application either crashed or
generated RuntimeError. If an exception were generated, a backtrace was
just like in my small example. And after I forced signals disconnection
either crashes and exceptions disappeared.

Yuya, thank you for information about old style signals and slots. I
checked it and found that I don't have any exceptions either on PyQt and
PySide. So I updated the article and mentioned you in the text. I hope you
don't mind.

Andrei

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 24, \
2014 at 5:47 PM, Yuya Nishihara <span dir="ltr">&lt;<a href="mailto:yuya@tcha.org" \
target="_blank">yuya@tcha.org</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="">I can&#39;t tell you why this example raises \
&quot;C++ object deleted&quot; error.   It worked<br></div> as expected with \
old-style connection:<br> <br>
     QTimer.singleShot(1000, lineEdit, SLOT(&#39;selectAll()&#39;))<br>
<br>
But I guess real-world cases of &quot;C++ object deleted&quot; error are caused \
by<br> different reason than this example.<br></blockquote><div><br></div><div>Of \
course I can&#39;t be absolutely sure what causes the crashes. But on real word Enki \
Editor I had a few situations when application either crashed or generated \
RuntimeError. If an exception were generated, a backtrace was just like in my small \
example. And after I forced signals disconnection either crashes and exceptions \
disappeared.</div> <div><br></div><div>Yuya, thank you for information about old \
style signals and slots. I checked it and found that I don&#39;t have any exceptions \
either on PyQt and PySide. So I updated the article and mentioned you in the text. I \
hope you don&#39;t mind.</div> <div><br></div><div>Andrei</div></div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic