Re: [PyQt] Bug of PyQt 4.9.1?
In data venerdì 2 marzo 2012 17:45:26, zw g ha scritto: I made a screenshot of the crashing window, and it was enclosed. Anyone help me? You might try first by using ipython's native support for PyQt: run it with the --gui qt switch. signature.asc Description: This is a digitally signed message part. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Bug of PyQt 4.9.1?
Thanks for your reply. Same result with the --gui qt switch. Still Segmentation fault: 11. On Fri, Mar 2, 2012 at 5:50 PM, Luca Beltrame ei...@heavensinferno.netwrote: In data venerdì 2 marzo 2012 17:45:26, zw g ha scritto: I made a screenshot of the crashing window, and it was enclosed. Anyone help me? You might try first by using ipython's native support for PyQt: run it with the --gui qt switch. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Bug of PyQt 4.9.1?
On Fri, 2 Mar 2012 18:19:40 +0800, zw g pekingmas...@gmail.com wrote: Thanks for your reply. Same result with the --gui qt switch. Still Segmentation fault: 11. On Fri, Mar 2, 2012 at 5:50 PM, Luca Beltrame ei...@heavensinferno.netwrote: In data venerdì 2 marzo 2012 17:45:26, zw g ha scritto: I made a screenshot of the crashing window, and it was enclosed. Anyone help me? You might try first by using ipython's native support for PyQt: run it with the --gui qt switch. Works fine for me using regular Python (ie. not ipython). Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Bug of PyQt 4.9.1?
Same result using regular Python. (not ipython) Any clue? On Fri, Mar 2, 2012 at 6:44 PM, Phil Thompson p...@riverbankcomputing.comwrote: On Fri, 2 Mar 2012 18:19:40 +0800, zw g pekingmas...@gmail.com wrote: Thanks for your reply. Same result with the --gui qt switch. Still Segmentation fault: 11. On Fri, Mar 2, 2012 at 5:50 PM, Luca Beltrame ei...@heavensinferno.netwrote: In data venerdì 2 marzo 2012 17:45:26, zw g ha scritto: I made a screenshot of the crashing window, and it was enclosed. Anyone help me? You might try first by using ipython's native support for PyQt: run it with the --gui qt switch. Works fine for me using regular Python (ie. not ipython). Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Problem with passing QString
Hi, I have a library in C++ which use opencv-2.3.1. There is a function that open image using path to file (I am using QString because it is easier than converting to char*). Then I use some functions to manipulate image. Finally I want to show image in GUI, so I implemented function which convert IplImage* to QImage (again, I think it is the easiest way for me). Everything worked fine, until I tried to build and run this project under Debian. When I try to call constructor with path to an image I get following error: python: /build/buildd-sip4_4.13.2-1-amd64-oTGNAQ/sip4-4.13.2/siplib/siplib.c:7915: sip_api_can_convert_to_type: Assertion `(((td)-td_flags 0x0007) == 0x) || (((td)-td_flags 0x0007) == 0x0002)' failed. Then I cut off all functions except constructor: my_class(QString), which is empty. Problem still occures. On 1st machine (Arch Linux x86_64) I have: PyQt-4.9.1-1 Qt-4.8.0-5 SIP-4.13.2-1 On 2nd (Debian x86_64): PyQt-4.9.1-1 Qt-4.7.4-2 SIP-4.13.2-1 Is this a bug or I should rather convert QString to char* and IplImage to ... something? -- Jarek ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Fwd: Bug#661854: python-qt4: segfault calling family() on QFontInfo object
This is a user reported bug. I get the same segmentation fault. I tried the sample program with 4.8.5 and 4.9.1 (both python and python3) on Debian and Ubuntu with the same results. Scott K -- Forwarded Message -- Subject: Bug#661854: python-qt4: segfault calling family() on QFontInfo object Date: Friday, March 02, 2012, 12:06:17 AM From: Yann Dirson ydir...@free.fr To: Debian Bug Tracking System sub...@bugs.debian.org Package: python-qt4 Version: 4.9.1-1 Severity: normal $ python Python 2.7.2+ (default, Nov 30 2011, 19:22:03) [GCC 4.6.2] on linux2 Type help, copyright, credits or license for more information. from PyQt4 import QtCore, QtGui, QtSvg fi = QtGui.QFontInfo(QtGui.QFont()) fi PyQt4.QtGui.QFontInfo object at 0x7fbf89211b40 fi.family() Segmentation fault -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (101, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages python-qt4 depends on: ii libc6 2.13-26 ii libgcc1 1:4.6.2-12 ii libpython2.7 2.7.2-8 ii libqt4-dbus 4:4.7.4-2 ii libqt4-declarative4:4.7.4-2 ii libqt4-designer 4:4.7.4-2 ii libqt4-help 4:4.7.4-2 ii libqt4-network4:4.7.4-2 ii libqt4-script 4:4.7.4-2 ii libqt4-scripttools4:4.7.4-2 ii libqt4-svg4:4.7.4-2 ii libqt4-test 4:4.7.4-2 ii libqt4-xml4:4.7.4-2 ii libqt4-xmlpatterns4:4.7.4-2 ii libqtassistantclient4 4.6.3-3 ii libqtcore44:4.7.4-2 ii libqtgui4 4:4.7.4-2 ii libqtwebkit4 2.2.0-3 ii libstdc++64.6.2-12 ii python2.7.2-10 ii python-sip [sip-api-8.1] 4.13.2-1 ii python2.6 2.6.7-4 ii python2.7 2.7.2-8 - ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Problem with passing QString
On Fri, 2 Mar 2012 13:59:30 +0100, Jarosław Białas jarekbialas.bi...@gmail.com wrote: Hi, I have a library in C++ which use opencv-2.3.1. There is a function that open image using path to file (I am using QString because it is easier than converting to char*). Then I use some functions to manipulate image. Finally I want to show image in GUI, so I implemented function which convert IplImage* to QImage (again, I think it is the easiest way for me). Everything worked fine, until I tried to build and run this project under Debian. When I try to call constructor with path to an image I get following error: python: /build/buildd-sip4_4.13.2-1-amd64-oTGNAQ/sip4-4.13.2/siplib/siplib.c:7915: sip_api_can_convert_to_type: Assertion `(((td)-td_flags 0x0007) == 0x) || (((td)-td_flags 0x0007) == 0x0002)' failed. Then I cut off all functions except constructor: my_class(QString), which is empty. Problem still occures. On 1st machine (Arch Linux x86_64) I have: PyQt-4.9.1-1 Qt-4.8.0-5 SIP-4.13.2-1 On 2nd (Debian x86_64): PyQt-4.9.1-1 Qt-4.7.4-2 SIP-4.13.2-1 Is this a bug or I should rather convert QString to char* and IplImage to ... something? Can you provide a short script that demonstrates the problem? Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Fwd: Bug#661854: python-qt4: segfault calling family() on QFontInfo object
On Fri, 02 Mar 2012 08:30:39 -0500, Scott Kitterman deb...@kitterman.com wrote: This is a user reported bug. I get the same segmentation fault. I tried the sample program with 4.8.5 and 4.9.1 (both python and python3) on Debian and Ubuntu with the same results. Scott K It's a bug in the test - create a QApplication instance first. Phil -- Forwarded Message -- Subject: Bug#661854: python-qt4: segfault calling family() on QFontInfo object Date: Friday, March 02, 2012, 12:06:17 AM From: Yann Dirson ydir...@free.fr To: Debian Bug Tracking System sub...@bugs.debian.org Package: python-qt4 Version: 4.9.1-1 Severity: normal $ python Python 2.7.2+ (default, Nov 30 2011, 19:22:03) [GCC 4.6.2] on linux2 Type help, copyright, credits or license for more information. from PyQt4 import QtCore, QtGui, QtSvg fi = QtGui.QFontInfo(QtGui.QFont()) fi PyQt4.QtGui.QFontInfo object at 0x7fbf89211b40 fi.family() Segmentation fault -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (101, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages python-qt4 depends on: ii libc6 2.13-26 ii libgcc1 1:4.6.2-12 ii libpython2.7 2.7.2-8 ii libqt4-dbus 4:4.7.4-2 ii libqt4-declarative4:4.7.4-2 ii libqt4-designer 4:4.7.4-2 ii libqt4-help 4:4.7.4-2 ii libqt4-network4:4.7.4-2 ii libqt4-script 4:4.7.4-2 ii libqt4-scripttools4:4.7.4-2 ii libqt4-svg4:4.7.4-2 ii libqt4-test 4:4.7.4-2 ii libqt4-xml4:4.7.4-2 ii libqt4-xmlpatterns4:4.7.4-2 ii libqtassistantclient4 4.6.3-3 ii libqtcore44:4.7.4-2 ii libqtgui4 4:4.7.4-2 ii libqtwebkit4 2.2.0-3 ii libstdc++64.6.2-12 ii python2.7.2-10 ii python-sip [sip-api-8.1] 4.13.2-1 ii python2.6 2.6.7-4 ii python2.7 2.7.2-8 - ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Problem with passing QString
I found out what the problem was. In configure.py I have: # Run SIP to generate the code. os.system( .join([config.sip_bin, -c, ., -I/usr/share/sip -I/usr/include/QtGui/ -I/usr/include/QtCore/ -t WS_X11 -t Qt_4_6_0 , -b, I changed Qt_4_6_0 to Qt_4_7_4 and now it works. Thanks for help and have a nice day:) -- Jarek On Fri, 2 Mar 2012 13:59:30 +0100, Jarosław Białas jarekbialas.bi...@gmail.com wrote: Hi, I have a library in C++ which use opencv-2.3.1. There is a function that open image using path to file (I am using QString because it is easier than converting to char*). Then I use some functions to manipulate image. Finally I want to show image in GUI, so I implemented function which convert IplImage* to QImage (again, I think it is the easiest way for me). Everything worked fine, until I tried to build and run this project under Debian. When I try to call constructor with path to an image I get following error: python: /build/buildd-sip4_4.13.2-1-amd64-oTGNAQ/sip4-4.13.2/siplib/siplib.c:7915: sip_api_can_convert_to_type: Assertion `(((td)-td_flags 0x0007) == 0x) || (((td)-td_flags 0x0007) == 0x0002)' failed. Then I cut off all functions except constructor: my_class(QString), which is empty. Problem still occures. On 1st machine (Arch Linux x86_64) I have: PyQt-4.9.1-1 Qt-4.8.0-5 SIP-4.13.2-1 On 2nd (Debian x86_64): PyQt-4.9.1-1 Qt-4.7.4-2 SIP-4.13.2-1 Is this a bug or I should rather convert QString to char* and IplImage to ... something? Can you provide a short script that demonstrates the problem? Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] QThread not forcibly terminating as expected
Hello all, Apologies for the lengthy mail. The last paragraph is the important one, but everything else helps explain. I'm writing a PyQt interface for a networking system (3rd party application) via its API. The 3rd party API calls don't have a configurable timeout. So that my interface doesn't block, I've made those API calls run in a QThread. I've attached a timer to the thread after a certain period of time (10 seconds in this case), I make the thread terminate itself using the very forceful terminate() function (I would happily use another if it would accomplish my goal of stopping execution NOW). I expect this would kill the API call, but it doesn't seem to. This happens when the API thinks a host is up, when, in fact, it is not, so it's locked waiting for socket connection/communication, but gets none - until it eventually times itself out some 60 seconds later. In my thread class, I log when the run() function starts and when it stops. I also log when a timeout is reached the terminate function is called. What I'm seeing is the run start, the timeout happen (which calls self.terminate()), and a good while later, the end of the run function is logged - which I wouldn't expect. I would expect the run function to cease doing anything when terminate() is called. I have the thread set to update the UI upon completion. When my app gets into this state, the UI widget this thread is trying to update is no longer updatable. The app is still responsive other widgets will happily update themselves, but this one is locked until the thread finally ends.. at which point it can be updated again, so long as the API returns valid data. I have set setTerminationEnabled to True (if that matters). I'm happy to post the code to my very generic worker thread class if needed I wonder if the problem is that the thread is blocked on a function call (the API call that uses sockets)... Does the API call need to unwind before the thread can terminate? If that's the case, any suggestions for how to get around this? I wouldn't much mind the lack of expected termination if it didn't lock up the widget, but it seems to (which is also surprising). At the end of the day, that's the important bit. Terminating the thread is only a way to get the widget to be responsive again sooner. Thanks, -Brian ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt