After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 455468 - New release makes some application crash
New release makes some application crash
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: codegen
unspecified
Other Linux
: High critical
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
: 453825 453902 453999 455251 455255 455264 455269 455281 455294 455340 455368 455393 455451 455465 455475 455551 455606 455684 455809 455818 455843 455880 455948 456008 456078 456080 456083 456161 456197 456256 456458 456459 469678 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-07-10 09:08 UTC by Loïc Minier
Modified: 2008-07-16 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Loïc Minier 2007-07-10 09:08:01 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,
Comment 1 Loïc Minier 2007-07-10 09:12:07 UTC
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)
Comment 2 Loïc Minier 2007-07-10 09:14:05 UTC
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".
Comment 3 Gustavo Carneiro 2007-07-10 09:59:08 UTC
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?
Comment 4 Loïc Minier 2007-07-10 10:05:30 UTC
I can't tell whether it's a bug in one or the other; perhaps it's pygtk being stricter: how can I tell?
Comment 5 Gustavo Carneiro 2007-07-10 10:16:31 UTC
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.
Comment 6 Gustavo Carneiro 2007-07-10 10:24:58 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 7 Sebastien Bacher 2007-07-10 13:43:20 UTC
*** Bug 453902 has been marked as a duplicate of this bug. ***
Comment 8 Luis Villa 2007-07-10 16:57:05 UTC
Given that this appears to cause crashes in a variety of code, in a stable branch, when will that next release be?
Comment 9 Gustavo Carneiro 2007-07-10 17:07:36 UTC
Actually I released 2.10.6 a few hours ago but was too lazy to announce it.
Comment 10 Thomas Andersen 2007-07-10 20:08:18 UTC
*** Bug 453825 has been marked as a duplicate of this bug. ***
Comment 11 palfrey 2007-07-11 12:30:45 UTC
*** Bug 455251 has been marked as a duplicate of this bug. ***
Comment 12 palfrey 2007-07-11 12:30:51 UTC
*** Bug 455255 has been marked as a duplicate of this bug. ***
Comment 13 palfrey 2007-07-11 12:30:56 UTC
*** Bug 455264 has been marked as a duplicate of this bug. ***
Comment 14 palfrey 2007-07-11 12:31:09 UTC
*** Bug 455269 has been marked as a duplicate of this bug. ***
Comment 15 palfrey 2007-07-11 12:31:12 UTC
*** Bug 455281 has been marked as a duplicate of this bug. ***
Comment 16 palfrey 2007-07-11 12:31:15 UTC
*** Bug 455294 has been marked as a duplicate of this bug. ***
Comment 17 palfrey 2007-07-11 12:31:17 UTC
*** Bug 455340 has been marked as a duplicate of this bug. ***
Comment 18 palfrey 2007-07-11 12:31:21 UTC
*** Bug 455368 has been marked as a duplicate of this bug. ***
Comment 19 palfrey 2007-07-11 12:31:26 UTC
*** Bug 455393 has been marked as a duplicate of this bug. ***
Comment 20 palfrey 2007-07-11 12:31:29 UTC
*** Bug 455451 has been marked as a duplicate of this bug. ***
Comment 21 palfrey 2007-07-11 12:31:32 UTC
*** Bug 455465 has been marked as a duplicate of this bug. ***
Comment 22 palfrey 2007-07-11 12:31:35 UTC
*** Bug 455475 has been marked as a duplicate of this bug. ***
Comment 23 palfrey 2007-07-11 12:31:40 UTC
*** Bug 455684 has been marked as a duplicate of this bug. ***
Comment 24 palfrey 2007-07-11 12:31:43 UTC
*** Bug 455809 has been marked as a duplicate of this bug. ***
Comment 25 palfrey 2007-07-11 12:31:47 UTC
*** Bug 455818 has been marked as a duplicate of this bug. ***
Comment 26 palfrey 2007-07-11 12:31:50 UTC
*** Bug 455843 has been marked as a duplicate of this bug. ***
Comment 27 palfrey 2007-07-11 12:31:52 UTC
*** Bug 455880 has been marked as a duplicate of this bug. ***
Comment 28 palfrey 2007-07-11 12:31:59 UTC
*** Bug 453999 has been marked as a duplicate of this bug. ***
Comment 29 palfrey 2007-07-11 12:32:04 UTC
*** Bug 455551 has been marked as a duplicate of this bug. ***
Comment 30 palfrey 2007-07-11 12:32:07 UTC
*** Bug 455606 has been marked as a duplicate of this bug. ***
Comment 31 Susana 2007-07-13 19:29:01 UTC
*** Bug 456459 has been marked as a duplicate of this bug. ***
Comment 32 Susana 2007-07-13 19:29:27 UTC
*** Bug 456458 has been marked as a duplicate of this bug. ***
Comment 33 Susana 2007-07-13 19:29:40 UTC
*** Bug 456256 has been marked as a duplicate of this bug. ***
Comment 34 Susana 2007-07-13 19:29:48 UTC
*** Bug 456197 has been marked as a duplicate of this bug. ***
Comment 35 Susana 2007-07-13 19:29:59 UTC
*** Bug 456161 has been marked as a duplicate of this bug. ***
Comment 36 Susana 2007-07-13 19:30:09 UTC
*** Bug 456083 has been marked as a duplicate of this bug. ***
Comment 37 Susana 2007-07-13 19:30:20 UTC
*** Bug 456080 has been marked as a duplicate of this bug. ***
Comment 38 Susana 2007-07-13 19:30:28 UTC
*** Bug 456078 has been marked as a duplicate of this bug. ***
Comment 39 Susana 2007-07-13 19:30:37 UTC
*** Bug 456008 has been marked as a duplicate of this bug. ***
Comment 40 Susana 2007-07-13 19:30:52 UTC
*** Bug 455948 has been marked as a duplicate of this bug. ***
Comment 41 palfrey 2007-09-03 18:15:35 UTC
*** Bug 469678 has been marked as a duplicate of this bug. ***