PyQt Access Violations

Discussion in 'Python' started by gregarican, Jan 7, 2006.

  1. gregarican

    gregarican Guest

    I noticed that when I invoked the setCentralWidget() method using PyQt
    3.13 on Python 2.3.5 opening and closing a widget associated with a
    main window would result in a Win32 access violation crash after a
    couple of times. Here's a generic snippet:

    class Application_Window(QMainWindow):
    def __init__(self):
    QMainWindow.__init__(self,None,'application main
    window',Qt.WDestructiveClose)

    def other_widget(self):
    self.this_widget=QWidget()
    self.setCentralWidget(self.this_widget)


    The only way I could avoid the crashes was to replace the
    setCentralWidget() method with:

    self.this_widget.show()

    Is there some fundamental error I was making in this, or is this a
    known bug?
     
    gregarican, Jan 7, 2006
    #1
    1. Advertisements

  2. What version of Qt?

    Phil
     
    Phil Thompson, Jan 7, 2006
    #2
    1. Advertisements

  3. gregarican

    gregarican Guest

    It's version 2.3.0 non-commerical for Windows. My OS is Windows 2000
    Professional SP4. Using this same version of Qt for a Ruby-based
    implementation of a similar app I didn't experience the access
    violation crashes when invoking the setCentralWidget() method. It's
    sporadic, as the crashes sometimes take 2-3 widget opens/closes to
    happen. Other times it takes more. Trying to debug the crashes the
    script never makes it past this method. Here's an excerpt from the Dr.
    Watson error log:

    function: QGList::findRef
    39d2dd42 807c240800 cmp byte ptr [esp+0x8],0x0
    ss:00c09513=00
    39d2dd47 7407 jz QString::fromUtf8+0x8a
    (39d36850)
    FAULT ->39d2dd49 8b4108 mov eax,[ecx+0x8]
    ds:00cd9f51=48001500
    39d2dd4c 33d2 xor edx,edx
    39d2dd4e eb06 jmp QString::fromUtf8+0x90
    (39d36856)
    39d2dd50 8b4110 mov eax,[ecx+0x10]
    ds:00cd9f51=48001500
    39d2dd53 8b5114 mov edx,[ecx+0x14]
    ds:00cd9f51=48001500
    39d2dd56 56 push esi
    39d2dd57 85c0 test eax,eax
    39d2dd59 740e jz QString::fromLatin1+0xb
    (39d36869)
    39d2dd5b 8b30 mov esi,[eax]
    ds:007ad4d8=00858340
    39d2dd5d 3b742408 cmp esi,[esp+0x8]
    ss:00c09513=00000000
    39d2dd61 7406 jz QString::fromLatin1+0xb
    (39d36869)
    39d2dd63 8b4008 mov eax,[eax+0x8]
    ds:012873be=00000000

    *----> Stack Back Trace <----*

    FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name
    0012F664 1E057D56 089FE908 00857948 00000001 088FAAD0 !QGList::findRef
    0012F6C8 00000001 00000000 00000000 007A5234 00779288 !PyCFunction_Call
     
    gregarican, Jan 8, 2006
    #3
  4. gregarican

    gregarican Guest

    Hope this post doesn't duplicate, as a Google Groups error happened
    last attempt...

    It's version 2.3.0 non-commerical for Windows. My OS is Windows 2000
    Professional SP4. Using this same version of Qt for a Ruby-based
    implementation of a similar app I didn't experience the access
    violation crashes when invoking the setCentralWidget() method. It's
    sporadic, as the crashes sometimes take 2-3 widget opens/closes to
    happen. Other times it takes more. Trying to debug the crashes the
    script never makes it past this method. Here's an excerpt from the Dr.
    Watson error log:

    function: QGList::findRef
    39d2dd42 807c240800 cmp byte ptr [esp+0x8],0x0
    ss:00c09513=00
    39d2dd47 7407 jz QString::fromUtf8+0x8a
    (39d36850)
    FAULT ->39d2dd49 8b4108 mov eax,[ecx+0x8]
    ds:00cd9f51=48001500
    39d2dd4c 33d2 xor edx,edx
    39d2dd4e eb06 jmp QString::fromUtf8+0x90
    (39d36856)
    39d2dd50 8b4110 mov eax,[ecx+0x10]
    ds:00cd9f51=48001500
    39d2dd53 8b5114 mov edx,[ecx+0x14]
    ds:00cd9f51=48001500
    39d2dd56 56 push esi
    39d2dd57 85c0 test eax,eax
    39d2dd59 740e jz QString::fromLatin1+0xb
    (39d36869)
    39d2dd5b 8b30 mov esi,[eax]
    ds:007ad4d8=00858340
    39d2dd5d 3b742408 cmp esi,[esp+0x8]
    ss:00c09513=00000000
    39d2dd61 7406 jz QString::fromLatin1+0xb
    (39d36869)
    39d2dd63 8b4008 mov eax,[eax+0x8]
    ds:012873be=00000000

    *----> Stack Back Trace <----*

    FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name
    0012F664 1E057D56 089FE908 00857948 00000001 088FAAD0 !QGList::findRef
    0012F6C8 00000001 00000000 00000000 007A5234 00779288 !PyCFunction_Call
     
    gregarican, Jan 9, 2006
    #4
  5. gregarican

    gregarican Guest

    It's version 2.3.0 non-commerical for Windows. My OS is Windows 2000
    Professional SP4. Using this same version of Qt for a Ruby-based
    implementation of a similar app I didn't experience the access
    violation crashes when invoking the setCentralWidget() method. It's
    sporadic, as the crashes sometimes take 2-3 widget opens/closes to
    happen. Other times it takes more. Trying to debug the crashes the
    script never makes it past this method. Here's an excerpt from the Dr.
    Watson error log:

    function: QGList::findRef
    39d2dd42 807c240800 cmp byte ptr [esp+0x8],0x0
    ss:00c09513=00
    39d2dd47 7407 jz QString::fromUtf8+0x8a
    (39d36850)
    FAULT ->39d2dd49 8b4108 mov eax,[ecx+0x8]
    ds:00cd9f51=48001500
    39d2dd4c 33d2 xor edx,edx
    39d2dd4e eb06 jmp QString::fromUtf8+0x90
    (39d36856)
    39d2dd50 8b4110 mov eax,[ecx+0x10]
    ds:00cd9f51=48001500
    39d2dd53 8b5114 mov edx,[ecx+0x14]
    ds:00cd9f51=48001500
    39d2dd56 56 push esi
    39d2dd57 85c0 test eax,eax
    39d2dd59 740e jz QString::fromLatin1+0xb
    (39d36869)
    39d2dd5b 8b30 mov esi,[eax]
    ds:007ad4d8=00858340
    39d2dd5d 3b742408 cmp esi,[esp+0x8]
    ss:00c09513=00000000
    39d2dd61 7406 jz QString::fromLatin1+0xb
    (39d36869)
    39d2dd63 8b4008 mov eax,[eax+0x8]
    ds:012873be=00000000

    *----> Stack Back Trace <----*

    FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name
    0012F664 1E057D56 089FE908 00857948 00000001 088FAAD0 !QGList::findRef
    0012F6C8 00000001 00000000 00000000 007A5234 00779288 !PyCFunction_Call
     
    gregarican, Jan 9, 2006
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.