Re: [PyQt] Crash in sip_api_is_py_method() with PyQt 4.6

2009-12-05 Thread Ville M. Vainio
On Sun, Oct 18, 2009 at 8:01 PM, Ville M. Vainio vivai...@gmail.com wrote:

 On Wed, Oct 14, 2009 at 10:55 PM, Ville M. Vainio vivai...@gmail.com wrote:

 Try also tonight snapshot, Phil wrote that the bug will be fixed.

 I'm seeing several reports of this same crash, so at least it appears
 to be systematic. Great that the fix is out.

 I can confirm that this crash is now fixed by Karmic packages.

A bit of a blast from the past, but...

I apt-get upgraded my Debian Sid installation to the latest status,
but this crash still occurs.

An interim solution (until debian updates python-sip4) is to download
and install the package from Karmic:

http://packages.ubuntu.com/fi/karmic/python-sip4

For reference, this crash is reported e.g. here:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552511

-- 
Ville M. Vainio
http://tinyurl.com/vainio
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Crash in sip_api_is_py_method() with PyQt 4.6

2009-10-18 Thread Ville M. Vainio
On Wed, Oct 14, 2009 at 10:55 PM, Ville M. Vainio vivai...@gmail.com wrote:

 Try also tonight snapshot, Phil wrote that the bug will be fixed.

 I'm seeing several reports of this same crash, so at least it appears
 to be systematic. Great that the fix is out.

I can confirm that this crash is now fixed by Karmic packages.

-- 
Ville M. Vainio
http://tinyurl.com/vainio
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Crash in sip_api_is_py_method() with PyQt 4.6

2009-10-14 Thread Ville M. Vainio
On Tue, Oct 13, 2009 at 10:25 PM, Victor Stinner
victor.stin...@haypocalc.com wrote:
 Hi,

 I'm using Debian Sid, and my program crash since the last upgrade. The last
 upgrade installed PyQt 4.6 with SIP 4.9.

May be unrelated, but I also suddenly started getting systematic
crashes like this on latest Karmic:

http://pastebin.ca/1619543

(yes, my -dbg packages are installed - dunny why all the symbols don't match)

-- 
Ville M. Vainio
http://tinyurl.com/vainio
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Crash in sip_api_is_py_method() with PyQt 4.6

2009-10-14 Thread Ville M. Vainio
On Wed, Oct 14, 2009 at 6:58 PM, Victor Stinner
victor.stin...@haypocalc.com wrote:

 Try also tonight snapshot, Phil wrote that the bug will be fixed.

I'm seeing several reports of this same crash, so at least it appears
to be systematic. Great that the fix is out.

Incidentally, is anyone keeping a ppa for pyqt snapshots?

-- 
Ville M. Vainio
http://tinyurl.com/vainio
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Crash in sip_api_is_py_method() with PyQt 4.6

2009-10-13 Thread Phil Thompson
On Tue, 13 Oct 2009 21:25:34 +0200, Victor Stinner
victor.stin...@haypocalc.com wrote:
 Hi,
 
 I'm using Debian Sid, and my program crash since the last upgrade. The
last
 
 upgrade installed PyQt 4.6 with SIP 4.9.
 
 The crash is in sip_api_is_py_method(): if cls is not a PyTypeObject*,
the 
 dict value is a pointer to something is the memory, but not to a 
 PyDictObject*. Attached patch fixes the crash.

Thanks.

 But the new PyQt/SIP introduces a regression: I replaced contextMenu and 
 mousePressEvent for some objects, and it doesn't work anymore. I don't
know
 if 
 this issue (sip_api_is_py_method() crash) is related.

Should already be fixed.

Test with tonight's snapshots to see if you have any outstanding problems -
there will be new releases in the next couple of days.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Crash in sip_api_is_py_method() with PyQt 4.6

2009-10-13 Thread Victor Stinner
Hi,

A friend told me that there are snapshots. So I tested the last snapshot and 
the sip_api_is_py_method()'s crash is still present. But the other bug 
(methods redefined in Python) is different: I get an error on the number of 
arguments.

So here is a second patch against the snapshot. It fixes both issues: crash 
related to PyClassObject and the number of arguments for the redefined 
methods.

-- 
Victor Stinner
http://www.haypocalc.com/
--- siplib/siplib.c.orig	2009-10-13 21:54:05.0 +0200
+++ siplib/siplib.c	2009-10-13 22:10:45.0 +0200
@@ -6029,8 +6029,12 @@
  */
 
 if (sipSelf-dict != NULL)
+{
 /* Check the instance dictionary in case it has been monkey patched. */
 reimp = PyDict_GetItem(sipSelf-dict, mname_obj);
+if (reimp != NULL)
+return reimp;
+}
 else
 reimp = NULL;
 
@@ -6046,11 +6050,19 @@
 
 for (i = 0; i  PyTuple_GET_SIZE(mro); ++i)
 {
+PyObject *dict;
+
 cls = (PyTypeObject *)PyTuple_GET_ITEM(mro, i);
 
-if (cls-tp_dict != NULL)
+if (PyClass_Check(cls))
+dict = ((PyClassObject *)cls)-cl_dict;
+else
+dict = ((PyTypeObject *)cls)-tp_dict;
+
+
+if (dict != NULL)
 {
-PyObject *this_reimp = PyDict_GetItem(cls-tp_dict, mname_obj);
+PyObject *this_reimp = PyDict_GetItem(dict, mname_obj);
 
 /*
  * Check any reimplementation is Python code and is not the
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Crash in sip_api_is_py_method() with PyQt 4.6

2009-10-13 Thread Phil Thompson
On Tue, 13 Oct 2009 23:10:32 +0200, Victor Stinner
victor.stin...@haypocalc.com wrote:
 Hi,
 
 A friend told me that there are snapshots. So I tested the last snapshot
 and 
 the sip_api_is_py_method()'s crash is still present. But the other bug 
 (methods redefined in Python) is different: I get an error on the number
of
 
 arguments.

It depends on what your application is doing. Is it monkey patching a bound
method or an unbound method?

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Crash in sip_api_is_py_method() with PyQt 4.6

2009-10-13 Thread Christian Caron

I get these errors as well, when patching a bound customEvent.

On Oct 13, 2009, at 2:35 PM, Phil Thompson wrote:


On Tue, 13 Oct 2009 23:10:32 +0200, Victor Stinner
victor.stin...@haypocalc.com wrote:

Hi,

A friend told me that there are snapshots. So I tested the last  
snapshot

and
the sip_api_is_py_method()'s crash is still present. But the other  
bug
(methods redefined in Python) is different: I get an error on the  
number

of


arguments.


It depends on what your application is doing. Is it monkey patching  
a bound

method or an unbound method?

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt