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 666677 - Getting an int64 property incorrectly calls g_value_get_int()
Getting an int64 property incorrectly calls g_value_get_int()
Status: RESOLVED DUPLICATE of bug 664150
Product: pygobject
Classification: Bindings
Component: gobject
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2011-12-21 17:54 UTC by P.D. McCormick
Modified: 2012-02-05 11:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description P.D. McCormick 2011-12-21 17:54:33 UTC
1. Launch Totem from a shell.
2. Enable and open the Python console.
3. Enter 'totem_object.props.current_time' in the console, which always returns 0 (regardless of the current actual play time), and prints to the shell something like the following:

(totem:11594): GLib-GObject-CRITICAL **: g_value_get_int: assertion `G_VALUE_HOLDS_INT (value)' failed

OS: Ubuntu 11.10 "Oneiric Ocelot"
Totem version: 3.0.1-0ubuntu7
Comment 1 Philip Withnall 2011-12-21 18:38:34 UTC
Here's a backtrace. Looks like PyGObject is calling the wrong g_value_get_*() function.

Breakpoint 2, g_value_get_int (value=0x7fffffffbc20) at gvaluetypes.c:796
796	  g_return_val_if_fail (G_VALUE_HOLDS_INT (value), 0);
(gdb) bt
  • #0 g_value_get_int
    at gvaluetypes.c line 796
  • #1 pygi_get_property_value_real
    at pygi-property.c line 127
  • #2 pygi_get_property_value
    at ../../gi/pygi.h line 122
  • #3 PyGProps_getattro
    at pygobject.c line 240
  • #4 PyEval_EvalFrameEx
    from /usr/lib64/libpython2.7.so.1.0
  • #5 PyEval_EvalCodeEx
    from /usr/lib64/libpython2.7.so.1.0
  • #6 PyEval_EvalCode
    from /usr/lib64/libpython2.7.so.1.0
  • #7 ??
    from /usr/lib64/libpython2.7.so.1.0
  • #8 PyRun_StringFlags
    from /usr/lib64/libpython2.7.so.1.0
  • #9 PyEval_EvalFrameEx
    from /usr/lib64/libpython2.7.so.1.0
  • #10 PyEval_EvalCodeEx
    from /usr/lib64/libpython2.7.so.1.0
  • #11 PyEval_EvalFrameEx
    from /usr/lib64/libpython2.7.so.1.0
  • #12 PyEval_EvalCodeEx
  • #0 g_value_get_int
    at gvaluetypes.c line 796
  • #1 pygi_get_property_value_real
    at pygi-property.c line 127
  • #2 pygi_get_property_value
    at ../../gi/pygi.h line 122
  • #3 PyGProps_getattro
    at pygobject.c line 240
  • #4 PyEval_EvalFrameEx
    from /usr/lib64/libpython2.7.so.1.0
  • #5 PyEval_EvalCodeEx
    from /usr/lib64/libpython2.7.so.1.0
  • #6 PyEval_EvalCode
  • #7 ??
    from /usr/lib64/libpython2.7.so.1.0
  • #8 PyRun_StringFlags
    from /usr/lib64/libpython2.7.so.1.0
  • #9 PyEval_EvalFrameEx
    from /usr/lib64/libpython2.7.so.1.0
  • #10 PyEval_EvalCodeEx
    from /usr/lib64/libpython2.7.so.1.0
  • #11 PyEval_EvalFrameEx
    from /usr/lib64/libpython2.7.so.1.0
  • #12 PyEval_EvalCodeEx
    from /usr/lib64/libpython2.7.so.1.0
  • #13 ??
    from /usr/lib64/libpython2.7.so.1.0
  • #14 PyObject_Call
    from /usr/lib64/libpython2.7.so.1.0
  • #15 ??
    from /usr/lib64/libpython2.7.so.1.0
  • #16 PyObject_Call
    from /usr/lib64/libpython2.7.so.1.0
  • #17 PyEval_CallObjectWithKeywords
    from /usr/lib64/libpython2.7.so.1.0
  • #18 pygi_signal_closure_marshal
    at pygi-signal-closure.c line 168
  • #19 g_closure_invoke
    at gclosure.c line 774
  • #20 signal_emit_unlocked_R
    at gsignal.c line 3302
  • #21 g_signal_emit_valist
    at gsignal.c line 3043
  • #22 g_signal_emit
    at gsignal.c line 3090
  • #23 gtk_widget_event_internal
    at gtkwidget.c line 6132
  • #24 gtk_widget_event
    at gtkwidget.c line 5848
  • #25 gtk_window_propagate_key_event
    at gtkwindow.c line 5832
  • #26 gtk_window_key_press_event
    at gtkwindow.c line 5862
  • #27 _gtk_marshal_BOOLEAN__BOXED
  • #28 g_type_class_meta_marshal
    at gclosure.c line 885
  • #29 g_closure_invoke
    at gclosure.c line 774
  • #30 signal_emit_unlocked_R
    at gsignal.c line 3340
  • #31 g_signal_emit_valist
    at gsignal.c line 3043
  • #32 g_signal_emit
    at gsignal.c line 3090
  • #33 gtk_widget_event_internal
    at gtkwidget.c line 6132
  • #34 gtk_widget_event
    at gtkwidget.c line 5848
  • #35 gtk_propagate_event
  • #36 gtk_main_do_event
    at gtkmain.c line 1889
  • #37 _gdk_event_emit
    at gdkevents.c line 71
  • #38 gdk_event_source_dispatch
    at gdkeventsource.c line 360
  • #39 g_main_dispatch
    at gmain.c line 2513
  • #40 g_main_context_dispatch
    at gmain.c line 3050
  • #41 g_main_context_iterate
    at gmain.c line 3121
  • #42 g_main_context_iteration
    at gmain.c line 3182
  • #43 g_application_run
  • #44 main
    at totem.c line 282

Comment 2 Sebastian Pölsterl 2012-02-04 15:47:43 UTC
gimarshallingtests.c from gobject-introspection should cover this case and then we can add a test to pygobject test suite.
Comment 3 Sebastian Pölsterl 2012-02-05 11:00:53 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 664150 ***