GNOME Bugzilla – Bug 455468
New release makes some application crash
Last modified: 2008-07-16 10:12:24 UTC
Hi, Since pygtk 2.10.5, some applications such as gnome-sudoku or deskbar-applet crash. (deskbar-applet crashes as soon as you type something in the search bar, gnome-sudoku crashes on startup). One sees in the console or backtrace: TypeError: function takes exactly 0 arguments (1 given) (Nothing more) I reverted the codegen/reversewrapper.py changes between 2.10.4 and .5 and it fixed the problem for me. Marking this as a blocker as it's a serious regression in the stable branch. Bye,
This is the particular hunk that needs reverting: Index: codegen/reversewrapper.py =================================================================== --- codegen/reversewrapper.py (révision 2836) +++ codegen/reversewrapper.py (copie de travail) @@ -426,7 +426,10 @@ class VoidReturn(ReturnType): self.wrapper.write_code("return;") def write_conversion(self): - self.wrapper.add_pyret_parse_item("", "", prepend=True) + self.wrapper.write_code( + code=None, + failure_expression="py_retval != Py_None", + failure_exception='PyErr_SetString(PyExc_TypeError, "retval should be None");') argtypes.matcher.register_reverse_ret('void', VoidReturn) argtypes.matcher.register_reverse_ret('none', VoidReturn)
It comes r2822 which addresses bug #440059: 2007-05-23 Gustavo J. A. M. Carneiro <gjc@inescporto.pt> * codegen/reversewrapper.py (ReverseWrapper.generate): Refactor to allow add_pyret_parse_item("", ""), which is used for 'void' return type. (VoidReturn.write_conversion): Fix bug #440059: Bad check for direction "out" parameters with return-type "none".
I still don't find anything wrong with the patch; generated code looks fine. Are you sure it's not a bug in deskbar-applet?
I can't tell whether it's a bug in one or the other; perhaps it's pygtk being stricter: how can I tell?
Oh, I see, this change was backported from trunk into pygtk-2-10: 2007-05-23 Gustavo J. A. M. Carneiro <gjc@inescporto.pt> * codegen/reversewrapper.py (ReverseWrapper.generate): Refactor to allow add_pyret_parse_item("", ""), which is used for 'void' return type. (VoidReturn.write_conversion): Fix bug #440059: Bad check for direction "out" parameters with return-type "none". But not this one: 2007-06-11 Gustavo J. A. M. Carneiro <gjc@inescporto.pt> * codegen/reversewrapper.py (ReverseWrapper.generate): Special case when only a single void return value exists; fix the return value type checking in this case. which fixed a bug in the previous patch.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
*** Bug 453902 has been marked as a duplicate of this bug. ***
Given that this appears to cause crashes in a variety of code, in a stable branch, when will that next release be?
Actually I released 2.10.6 a few hours ago but was too lazy to announce it.
*** Bug 453825 has been marked as a duplicate of this bug. ***
*** Bug 455251 has been marked as a duplicate of this bug. ***
*** Bug 455255 has been marked as a duplicate of this bug. ***
*** Bug 455264 has been marked as a duplicate of this bug. ***
*** Bug 455269 has been marked as a duplicate of this bug. ***
*** Bug 455281 has been marked as a duplicate of this bug. ***
*** Bug 455294 has been marked as a duplicate of this bug. ***
*** Bug 455340 has been marked as a duplicate of this bug. ***
*** Bug 455368 has been marked as a duplicate of this bug. ***
*** Bug 455393 has been marked as a duplicate of this bug. ***
*** Bug 455451 has been marked as a duplicate of this bug. ***
*** Bug 455465 has been marked as a duplicate of this bug. ***
*** Bug 455475 has been marked as a duplicate of this bug. ***
*** Bug 455684 has been marked as a duplicate of this bug. ***
*** Bug 455809 has been marked as a duplicate of this bug. ***
*** Bug 455818 has been marked as a duplicate of this bug. ***
*** Bug 455843 has been marked as a duplicate of this bug. ***
*** Bug 455880 has been marked as a duplicate of this bug. ***
*** Bug 453999 has been marked as a duplicate of this bug. ***
*** Bug 455551 has been marked as a duplicate of this bug. ***
*** Bug 455606 has been marked as a duplicate of this bug. ***
*** Bug 456459 has been marked as a duplicate of this bug. ***
*** Bug 456458 has been marked as a duplicate of this bug. ***
*** Bug 456256 has been marked as a duplicate of this bug. ***
*** Bug 456197 has been marked as a duplicate of this bug. ***
*** Bug 456161 has been marked as a duplicate of this bug. ***
*** Bug 456083 has been marked as a duplicate of this bug. ***
*** Bug 456080 has been marked as a duplicate of this bug. ***
*** Bug 456078 has been marked as a duplicate of this bug. ***
*** Bug 456008 has been marked as a duplicate of this bug. ***
*** Bug 455948 has been marked as a duplicate of this bug. ***
*** Bug 469678 has been marked as a duplicate of this bug. ***