Re: [PyQt] Disturbing evidence of garbage collection error
Dear Andrew, Am Sunday 29 April 2012 17:21:34 schrieb Andrew Suffield: On Sun, Apr 29, 2012 at 03:51:43PM +0100, Phil Thompson wrote: You might try keeping explicit references to any objects involved in the query where you might be expecting PyQt to keep the reference for you. At the point when it gets collected, it's still in scope as a local variable of the python function that's currently executing on that thread. This is as horribly wrong as it sounds. I keep thinking it should be memory corruption, but valgrind says it's clean. (After spending most of yesterday trying to figure it out, I gave up and rewrote the database code to use multiprocessing instead of QThreads. Trying to get them to work has resulted in me spending entirely too much time using gdb and valgrind to find bugs in python and Qt; it's not worth the trouble when neither of them are very reliable in the presence of threads. If only QtSql was asynchronous like everything else...) following Eriks suggestion of disabling the GC altogether would have given a valuable data point for your issue. Vanishing still referenced local variables in a thread context is more than a disturbing evidence, that deserves some deep examination. Pete ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Disturbing evidence of garbage collection error
On Mon, Apr 30, 2012 at 09:25:52AM +0200, Hans-Peter Jansen wrote: following Eriks suggestion of disabling the GC altogether would have given a valuable data point for your issue. Oh, I did try that. Everything works fine when GC is disabled. Vanishing still referenced local variables in a thread context is more than a disturbing evidence, that deserves some deep examination. Indeed, but I spent a couple days on it and didn't get a lot of traction. Pesky thing was so timing-sensitive that adding debugging instrumentation to Qt, or using a debugging build of python, threw it off enough not to trigger the bug. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] ANN: New eric 5.3 snapshot released
Hi, I'd like to inform all of you about the immediate availability of a new eric 5.3 snapshot. It fixes a few bugs and adds these new features. - Editor -- added capability to change the colours of the edit area independant from the colours of the system style - Project -- added capability to save project tasks automatically (configurable on project configuration page of configuration dialog) - Tasks -- changed the tasks handling to allow for more fine grained task designations - Tools -- added a tool to take screenshots (fullscreen, selected screen, rectangular selection, elliptical selection or freehand selection) - Version Control System Interfaces -- Mercurial --- added support for the graft command as of Mercurial 2.0 --- added support for Phases as of Mercurial 2.1 -- Subversion --- changed code to make the subversion plug-ins compatible with the new generation working copy meta-data format - Web Browser -- extended the check for acceptable SSL certificates for indication via the URL entry field -- extended the web page context menu by several entries to send links or the selected text, handling the clicked frame, translate the selected text with Google Translate and search it in Wictionary -- extended the User Agent handling to be able to set the string on a host basis (next to the global user agent string) -- added code to save the current page as a screen shot -- added capability to synchronize bookmarks, history, passwords and user agent settings via an FTP server or a shared directory -- added the ClickToFlash plug-in to (temporarily) block Flash and related content -- added capability to suppress Referer Headers (configurable via eric4 Web Browser configuration page) -- added capability to select the first nine tabs by pressing Alt+1 to Alt+9 and to switch to the last tab by pressing Alt+0 -- added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0 -- added a history sub-menu showing the most visited sites -- added the capability to restore closed tabs -- added a bookmarks importer to get them directly from other browsers files -- extended bookmarks to hold a description and various timestamps -- added capability to manage the QtHelp filter attributes -- added a page to the site info dialog to show web databases of the site - Wizards -- QRegExp --- added support for the various pattern syntaxes - Third Party packages -- updated to Pygments 1.5 It is available via http://sourceforge.net/projects/eric-ide/files/eric5/unstable/5.3-20120430 Regards Detlev -- Detlev Offenbach det...@die-offenbachs.de ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] SIP fails with syntax error on simple class inheritance
Why does the attached sip-file always fail to be sipped with the following error message: sip: my_dialog.sip:15: syntax error (line 15 is class MyDialog : public QDialog {) I tried to use a configure.py or directly call sip command line, but it always fails with the same error message. What am I doing wrong? Is there a tutorial out there that's a bit easier to understand than the official documentation (http://www.riverbankcomputing.co.uk/static/Docs/sip4/using.html)? The documentation is rather useless when using SIP for bigger or more complex libraries. ## Code of my_dialog.sip ### %Module myDialog %Import QtGui/QtGuimod.sip %If (Qt_4_2_0 -) namespace ui { %TypeHeaderCode #include my/ui/buttons.h #include my/ui/label.h #include my/ui/soft_shadow.h %End class MyDialog : public QDialog { public: MyDialog(QWidget *parent, bool show_shadow = true); ~MyDialog(void); void updateTitle(const QString message); public Q_SLOTS: virtual void done(int); }; %End }; ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] SIP fails with syntax error on simple class inheritance
On Mon, 30 Apr 2012 12:27:03 +0200, tuxor1...@web.de wrote: Why does the attached sip-file always fail to be sipped with the following error message: sip: my_dialog.sip:15: syntax error (line 15 is class MyDialog : public QDialog {) I tried to use a configure.py or directly call sip command line, but it always fails with the same error message. What am I doing wrong? Is there a tutorial out there that's a bit easier to understand than the official documentation (http://www.riverbankcomputing.co.uk/static/Docs/sip4/using.html)? The documentation is rather useless when using SIP for bigger or more complex libraries. What version of SIP are you using? Assuming it's older than v4.13.1 then you need to remove the public (as it says in the documentation for your version). Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] SIP fails with syntax error on simple class inheritance
Thanks for your quick response! What version of SIP are you using? Assuming it's older than v4.13.1 then you need to remove the public (as it says in the documentation for your version). Yes, you are right. I'm using 4.12.2, so next time I'm going to refer to the documentation provided with my source tarball. There it's mentioned in the chapter Using SIP. But to be honest, I'm still a bit puzzled by the usage of SIP. For example, where do I learn what to do with such an excerpt from a header file: enum WaitMode { WAIT_NONE = 0, WAIT_BEFORE_UPDATE = 0x01, WAIT_COMMAND_FINISH = 0x02, WAIT_NORMAL = WAIT_BEFORE_UPDATE, WAIT_ALL= WAIT_BEFORE_UPDATE | WAIT_COMMAND_FINISH }; SIP will complain about the WAIT_ALL line (syntax error). Is this due to the | operator or what's the problem here? And where in the documentation would I find an appropriate answer to this? ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] sip fails with [CLASSNAME] has not been defined
Hi all, maybe somebody can help me with this. I'm using SIP 4.12.2. My configure.py script is executing the following sip command line: /opt/python/bin/sip -c . -b ui/ui.sbf -I /opt/python/share/sip/PyQt4 -x PyQt_Accessibility -x PyQt_Cursor -x PyQt_ImageFormat_JPEG -x PyQt_Picture -x PyQt_PrintDialog -x PyQt_Printer -x PyQt_ProgressDialog -x PyQt_QWS_Cursor -x PyQt_SessionManager -x PyQt_Sound -x VendorID -t WS_QWS -x PyQt_Accessibility -x PyQt_SessionManager -x PyQt_PrintDialog -x PyQt_Printer -x PyQt_PrintPreviewDialog -x PyQt_PrintPreviewWidget -x PyQt_NoPrintRangeBug -x PyQt_qreal_double -t Qt_4_7_2 -x Py_v3 -g ui/uimod.sip ... which looks okay to me. But it fails with this error message: sip: OnyxDialog has not been defined The sip-file ui/uimod.sip looks like this: %Module PyOnyx.ui %Include onyx_dialog.sip %Include message_dialog.sip The error is obviously related to the file message_dialog.sip, because when I leave out that file, everything is fine. ## message_dialog.sip %Import QtGui/QtGuimod.sip namespace ui { class MessageDialog : OnyxDialog { %TypeHeaderCode #include onyx/ui/message_dialog.h %End public: MessageDialog(QMessageBox::Icon icon, const QString title, const QString text, QMessageBox::StandardButtons buttons = QMessageBox::NoButton, QWidget * parent = 0); ~MessageDialog(); public: int exec(); void updateInformation(const QString text); }; }; ## End: message_dialog.sip ## onyx_dialog.sip %Import QtGui/QtGuimod.sip namespace ui { class OnyxDialog : QDialog { %TypeHeaderCode #include onyx/ui/onyx_dialog.h %End public: OnyxDialog(QWidget *parent, bool show_shadow = true); ~OnyxDialog(); }; }; ## End: onyx_dialog.sip ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] PyQwt and PyQt 4.9
Hello, I keep getting errors when trying PyQwt with PyQt 4.9.1 on Snow Leopard. I've tried the PyQwt version 5.2.0 as found on http://pyqwt.sourceforge.net/download.html as well as a 5.2.1 version PyQwt-5.2.1-cvs20100927-101816.tar.bz2 from OpenSuse, but neither seems to produce usable results. Two quick questions... * is there a latest PyQwt 5.2.1 available (e.g. SVN repository) ? * any specific configuration changes required to build PyQwt on Snow Leopard or Lion, to make it work with PyQt 4.9.x? Thank you in advance, -Mitja William Kyngesburye, Tue, 24 Jan 2012 18:48:17 -0800: It doesn't? Works for me. I recompiled PyQwt 5.2.1 (SVN) for PyQt 4.9 with no problems. A plugin for QGIS that uses PyQwt still works. Just wondering if I'm missing something. (OS X 10.7, Python 2.7.1, PyQt 4.9, Qt 4.8.0) On Jan 24, 2012, at 12:22 PM, David Kaufman wrote: Hi there, I'm currently developing with PyQwt. Unfortunately it doesn't support PyQt 4.9 yet. Thus I really need an older PyQt version, to be specific PyQt v4.8.6, but I'm not able to find it anywhere. I need a binary version for Python 2.7 32 bit. If anyone could point me in the right direction? Greetings, David Kaufman ___ PyQt mailing listPyQt at riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt - William Kyngesburye kyngchaos*at*kyngchaos*dot*com http://www.kyngchaos.com/ Earth: Mostly harmless - revised entry in the HitchHiker's Guide to the Galaxy ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] PyQwt and PyQt 4.9
Well, though I seemed to have some initial success with it, it's not working for me now. I think what David Kaufman said is true - PyQwt does not work with PyQt 4.9. On Apr 30, 2012, at 8:42 PM, mitja_mr...@indiana.edu wrote: Hello, I keep getting errors when trying PyQwt with PyQt 4.9.1 on Snow Leopard. I've tried the PyQwt version 5.2.0 as found on http://pyqwt.sourceforge.net/download.html as well as a 5.2.1 version PyQwt-5.2.1-cvs20100927-101816.tar.bz2 from OpenSuse, but neither seems to produce usable results. Two quick questions... * is there a latest PyQwt 5.2.1 available (e.g. SVN repository) ? * any specific configuration changes required to build PyQwt on Snow Leopard or Lion, to make it work with PyQt 4.9.x? Thank you in advance, -Mitja William Kyngesburye, Tue, 24 Jan 2012 18:48:17 -0800: It doesn't? Works for me. I recompiled PyQwt 5.2.1 (SVN) for PyQt 4.9 with no problems. A plugin for QGIS that uses PyQwt still works. Just wondering if I'm missing something. (OS X 10.7, Python 2.7.1, PyQt 4.9, Qt 4.8.0) On Jan 24, 2012, at 12:22 PM, David Kaufman wrote: Hi there, I'm currently developing with PyQwt. Unfortunately it doesn't support PyQt 4.9 yet. Thus I really need an older PyQt version, to be specific PyQt v4.8.6, but I'm not able to find it anywhere. I need a binary version for Python 2.7 32 bit. If anyone could point me in the right direction? Greetings, David Kaufman ___ PyQt mailing listPyQt at riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt - William Kyngesburye kyngchaos*at*kyngchaos*dot*com http://www.kyngchaos.com/ Earth: Mostly harmless - revised entry in the HitchHiker's Guide to the Galaxy ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt - William Kyngesburye kyngchaos*at*kyngchaos*dot*com http://www.kyngchaos.com/ The equator is so long, it could encircle the earth completely once. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt