[PyQt] segmentation faults common when using QWebView

Hans-Peter Jansen hpj at urpla.net
Tue Nov 30 11:30:48 GMT 2010


On Tuesday 30 November 2010, 10:43:35 Phil Thompson wrote:
> On Mon, 29 Nov 2010 17:05:57 -0500, Brandon Craig Rhodes
>
> <brandon at rhodesmill.org> wrote:
> > "Hans-Peter Jansen" <hpj at 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 one who has the development version of PyQt4 installed gets
> > the chance to try my script, then I should have time on Wednesday
> > to sit down and install the alternate development packages and
> > attempt to produce a traceback.  But before going through all of
> > that I wanted to see if there was something I was obviously doing
> > wrong with pointers or something in my code.
>
> I can confirm the crash with current snapshots, but nothing from the
> traceback suggests a PyQt problem. It smells like a Qt problem
> triggered by unorthodox use.

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 report that as Qt-bug, since even 
unorthodox usage patterns (excluding the "plain wrong camp") should 
never lead to blatant segmentation faults (access to invalid memory 
areas)..

Pete


More information about the PyQt mailing list