Re: [PyQt] segmentation faults common when using QWebView

2010-11-30 Thread Phil Thompson
On Mon, 29 Nov 2010 17:05:57 -0500, Brandon Craig Rhodes bran...@rhodesmill.org wrote: Hans-Peter Jansen h...@urpla.net writes: Why not trigger the timer from the loadFinished signal. That way, you get the best of both worlds ;) That's a good idea! I promise to try it, just as soon as I

Re: [PyQt] segmentation faults common when using QWebView

2010-11-30 Thread Hans-Peter Jansen
On Tuesday 30 November 2010, 10:43:35 Phil Thompson wrote: On Mon, 29 Nov 2010 17:05:57 -0500, Brandon Craig Rhodes bran...@rhodesmill.org wrote: Hans-Peter Jansen h...@urpla.net writes: Why not trigger the timer from the loadFinished signal. That way, you get the best of both worlds ;)

Re: [PyQt] segmentation faults common when using QWebView

2010-11-30 Thread Brandon Craig Rhodes
Hans-Peter Jansen h...@urpla.net writes: Brandon, forgot to add: I bet, that the simplest version (just the first webview.load, findAll, and click) as C++ version will also crash in a similar way, pointing to some uncaught race between the operating theads. It would be a very good idea to

Re: [PyQt] segmentation faults common when using QWebView

2010-11-30 Thread Hans-Peter Jansen
On Tuesday 30 November 2010, 16:09:09 Brandon Craig Rhodes wrote: Hans-Peter Jansen h...@urpla.net writes: Brandon, forgot to add: I bet, that the simplest version (just the first webview.load, findAll, and click) as C++ version will also crash in a similar way, pointing to some

[PyQt] segmentation faults common when using QWebView

2010-11-29 Thread Brandon Craig Rhodes
I think that there is a bright future in using PyQt4 with a QWebView object for writing basic web tests, and for web automation. My early experiments suggest that it is a much simpler and faster solution, when one needs web page browsing with JavaScript enabled, than a heavyweight technique like

Re: [PyQt] segmentation faults common when using QWebView

2010-11-29 Thread Hans-Peter Jansen
On Monday 29 November 2010, 16:54:42 Brandon Craig Rhodes wrote: I think that there is a bright future in using PyQt4 with a QWebView object for writing basic web tests, and for web automation. My early experiments suggest that it is a much simpler and faster solution, when one needs web page

Re: [PyQt] segmentation faults common when using QWebView

2010-11-29 Thread Brandon Craig Rhodes
Hans-Peter Jansen h...@urpla.net writes: From what I can see, you're missing fundamental concepts of the asynchronous nature of QtWebView. You should control your test flow with signals, instead of a timer, e.g.: # you need to wait for finishing the load

Re: [PyQt] segmentation faults common when using QWebView

2010-11-29 Thread Hans-Peter Jansen
On Monday 29 November 2010, 18:30:39 Brandon Craig Rhodes wrote: Hans-Peter Jansen h...@urpla.net writes: From what I can see, you're missing fundamental concepts of the asynchronous nature of QtWebView. You should control your test flow with signals, instead of a timer, e.g.: # you

Re: [PyQt] segmentation faults common when using QWebView

2010-11-29 Thread Brandon Craig Rhodes
Hans-Peter Jansen h...@urpla.net writes: Why not trigger the timer from the loadFinished signal. That way, you get the best of both worlds ;) That's a good idea! I promise to try it, just as soon as I can stop the script from giving me a segmentation fault every time that I run it. :-) If no

Re: [PyQt] Segmentation faults

2010-08-06 Thread Mailing List SVR
Il giorno gio, 05/08/2010 alle 03.10 -0400, Luke Campagnola ha scritto: I believe I have run into a class of bugs in PyQt4. I originally found that QSpinBox.lineEdit() returns a QLineEdit instance which does not maintain its reference count properly after the original QSpinBox is deleted.

Re: [PyQt] Segmentation faults

2010-08-06 Thread Luke Campagnola
On Fri, Aug 6, 2010 at 10:53, Mailing List SVR li...@svrinformatica.itwrote: Il giorno gio, 05/08/2010 alle 03.10 -0400, Luke Campagnola ha scritto: $ python from PyQt4.QtGui import * a = QApplication([]) s = QSpinBox() l = s.lineEdit() del s l.text() Segmentation fault

[PyQt] Segmentation faults

2010-08-05 Thread Luke Campagnola
I believe I have run into a class of bugs in PyQt4. I originally found that QSpinBox.lineEdit() returns a QLineEdit instance which does not maintain its reference count properly after the original QSpinBox is deleted. Thus it is possible to either 1) have uncollectable LineEdits lingering in

Re: [PyQt] Segmentation faults

2010-08-05 Thread Phil Thompson
On Thu, 5 Aug 2010 03:10:50 -0400, Luke Campagnola lcamp...@email.unc.edu wrote: I believe I have run into a class of bugs in PyQt4. I originally found that QSpinBox.lineEdit() returns a QLineEdit instance which does not maintain its reference count properly after the original QSpinBox is

Re: [PyQt] Segmentation faults

2010-08-05 Thread Luke Campagnola
On Thu, Aug 5, 2010 at 03:43, Phil Thompson p...@riverbankcomputing.comwrote: On Thu, 5 Aug 2010 03:10:50 -0400, Luke Campagnola lcamp...@email.unc.edu wrote: I believe I have run into a class of bugs in PyQt4. I originally found that QSpinBox.lineEdit() returns a QLineEdit instance which