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 647731 - Singleton objects are constructed using g_object_new even though they should not be
Singleton objects are constructed using g_object_new even though they should...
Status: RESOLVED DUPLICATE of bug 675581
Product: pygobject
Classification: Bindings
Component: gio
3.2.x
Other Linux
: Normal major
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
: 680202 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-14 01:20 UTC by Pedro Fragoso
Modified: 2012-07-24 14:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
segfault get_mounts (1.14 KB, text/x-python)
2011-04-14 01:20 UTC, Pedro Fragoso
Details

Description Pedro Fragoso 2011-04-14 01:20:58 UTC
Created attachment 185920 [details]
segfault get_mounts

While porting a pygtk app i've found that get_mounts is segfaulting.

I've attached a test that reproduces the error.
Comment 1 johnp 2011-04-14 15:40:12 UTC
Use Gio.VolumeMonitor.get().  The VolumeMonitor is a singleton which doesn't have a constructor.  Unfortunately we don't currently check for that and allocate the object with g_object_new.  Since there is no backing class it crashes when trying to call the get_mounts vfunc which is NULL.  Leave this bug open.  We should probably return an error if you try to construct a class that has no constuctors.
Comment 2 Sebastian Pölsterl 2012-04-21 13:30:23 UTC
This bug is still present with pygobject 3.2.0:

No symbol table info available.
  • #0 ??
  • #1 g_volume_monitor_get_mounts
    at gvolumemonitor.c line 342
  • #2 ffi_call_unix64
    at ../src/x86/unix64.S line 75
  • #3 ffi_call
    at ../src/x86/ffi64.c line 486
  • #4 g_callable_info_invoke
    at girepository/gicallableinfo.c line 610
  • #5 g_function_info_invoke
    at girepository/gifunctioninfo.c line 274
  • #6 _invoke_callable
    at pygi-invoke.c line 52
  • #7 _wrap_g_callable_info_invoke
  • #8 ext_do_call
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 4400
  • #9 PyEval_EvalFrameEx
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 2779
  • #10 PyEval_EvalCodeEx
  • #11 fast_function
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 4186
  • #12 call_function
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 4111
  • #13 PyEval_EvalFrameEx
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 2740
  • #14 fast_function
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 4176
  • #15 call_function
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 4111
  • #16 PyEval_EvalFrameEx
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 2740
  • #17 fast_function
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 4176
  • #18 call_function
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 4111
  • #19 PyEval_EvalFrameEx
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 2740
  • #20 PyEval_EvalCodeEx
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 3330
  • #21 function_call
    at remote 0x7fffef5ee710>) at remote 0x7fffef5f6cf8>,), kw=0x0) at /usr/src/debug/Python-2.7.2/Objects/funcobject.c line 526
  • #22 PyObject_Call
    at /usr/src/debug/Python-2.7.2/Objects/abstract.c line 2529
  • #23 instancemethod_call
    at remote 0x7fffef5ee710>) at remote 0x7fffef5f6cf8>,), kw=0x0) at /usr/src/debug/Python-2.7.2/Objects/classobject.c line 2578
  • #24 PyObject_Call
    at /usr/src/debug/Python-2.7.2/Objects/abstract.c line 2529
  • #25 PyEval_CallObjectWithKeywords
  • #26 PyInstance_New
  • #27 PyObject_Call
    at /usr/src/debug/Python-2.7.2/Objects/abstract.c line 2529
  • #28 do_call
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 4308
  • #29 call_function
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 4113
  • #30 PyEval_EvalFrameEx
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 2740
  • #31 PyEval_EvalCodeEx
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 3330
  • #32 PyEval_EvalCode
    at /usr/src/debug/Python-2.7.2/Python/ceval.c line 689
  • #33 run_mod
  • #34 PyRun_FileExFlags
  • #35 PyRun_SimpleFileExFlags
    at /usr/src/debug/Python-2.7.2/Python/pythonrun.c line 944
  • #36 Py_Main
    at /usr/src/debug/Python-2.7.2/Modules/main.c line 599
  • #37 __libc_start_main
    at libc-start.c line 226
  • #38 _start

Comment 3 Martin Pitt 2012-07-19 04:12:03 UTC
*** Bug 680202 has been marked as a duplicate of this bug. ***
Comment 4 Martin Pitt 2012-07-24 14:15:13 UTC

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