PyQt Access Violations

G

gregarican

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?
 
P

Phil Thompson

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?

What version of Qt?

Phil
 
G

gregarican

Phil said:
What version of Qt?

Phil

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
 
G

gregarican

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

Phil said:
What version of Qt?

Phil

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
 
G

gregarican

Phil said:
What version of Qt?

Phil

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top