FAQ
Hi,

I have a QWebview application, which segfaults rather often,
but not all the time.

I assume it is some kind of race condition when loading a certain web
page with quite some built in AJax.



How can I debug it?

The application crashes under Windows and under Linux.


I enabled already core dumps and am able to

start

gdb python.exe core

I guess the command "bt"
will be able to give m a backtrace of the C program


Is there any way to obtain the related backtrace of the python script?


I'm at a complete loss of what I am doing wrong in my script and would
hope to get at least some indication.

Search Discussions

  • Marco Bizzarri at Mar 4, 2011 at 8:53 am
    This applies to debugging a spinning Zope server, but I think you can adapt
    the suggestions to your core dump:

    http://www.upfrontsystems.co.za/Members/jean/zope-notes/debug-spinning-zope

    Regards
    Marco
    On Thu, Mar 3, 2011 at 10:40 AM, Gelonida wrote:

    Hi,

    I have a QWebview application, which segfaults rather often,
    but not all the time.

    I assume it is some kind of race condition when loading a certain web
    page with quite some built in AJax.



    How can I debug it?

    The application crashes under Windows and under Linux.


    I enabled already core dumps and am able to

    start

    gdb python.exe core

    I guess the command "bt"
    will be able to give m a backtrace of the C program


    Is there any way to obtain the related backtrace of the python script?


    I'm at a complete loss of what I am doing wrong in my script and would
    hope to get at least some indication.


    --
    http://mail.python.org/mailman/listinfo/python-list


    --
    Marco Bizzarri
    http://code.google.com/p/qt-asterisk/
    http://notenotturne.blogspot.com/
    http://iliveinpisa.blogspot.com/
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20110304/52537604/attachment.html>
  • Hans-Peter Jansen at Mar 4, 2011 at 3:58 pm

    On Thursday 03 March 2011, 10:40:20 Gelonida wrote:
    Hi,

    I have a QWebview application, which segfaults rather often,
    but not all the time.

    I assume it is some kind of race condition when loading a certain web
    page with quite some built in AJax. [...]
    The application crashes under Windows and under Linux. [...]
    Is there any way to obtain the related backtrace of the python
    script?
    [...]

    Before you're able to track your issue back into python, you will have
    to prepare a debuggable environment. In Linux, there's usually a way to
    install the debug symbols of the packages in question. In your case,
    you might want to install debug symbols (and probably debug sources) of
    (package names differ from distro to distro, of course):
    - libqt4
    - libwebkit
    - python
    - python-sip
    - python-qt4

    Next, you run your script:

    gdb python -ex "set args script.py" -ex run

    Now, get it to crash and type bt at the gdb prompt.

    Paste all info before and after bt into a mail, and send it to
    pyqt at riverbankcomputing.com ML (at least). That's the proper place for
    such issues, and chances are high, that you will get further help over
    there. It's a good idea to subscribe that (low traffic) list, even if
    you hack PyQt only occasionly. It has an astonishing high S/R ratio,
    btw (compared to the 50 other lists, that I'm subscribed at).

    Don't forget to specify your environment as detailed as possible (arch,
    package versions, etc..). A perfect report includes a minimum runnable
    example script.

    Good luck,
    Pete

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 3, '11 at 9:40a
activeMar 4, '11 at 3:58p
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase