Re: NMClient g-i bindings unusable



On Wed, Aug 10, 2011 at 5:31 PM, Daniel Drake <dsd laptop org> wrote:
> I can still reproduce the same crash. Here are more details:
>
> Python 2.7.1 (r271:86832, Apr 12 2011, 16:16:18)
> [GCC 4.6.0 20110331 (Red Hat 4.6.0-2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from gi.repository import NMClient
>>>> client = NMClient.Client(dbus_path='/org/freedesktop/NetworkManager')
>>>> devs = client.get_devices()
>
> Program received signal SIGSEGV, Segmentation fault.

Great, this is fixed with pygobject git master.

But, after trying just a few more things, I have found a non-crash bug
and a crasher:

>>> from gi.repository import NMClient
>>> client = NMClient.Client(dbus_path='/org/freedesktop/NetworkManager')
>>> devs = client.get_devices()
>>> devs
[<DeviceWifi object at 0xb74d2bbc (NMDeviceWifi at 0x9b77020)>,
<DeviceEthernet object at 0xb74dd234 (NMDeviceEthernet at 0x9b79820)>]
>>> wifi = devs[0]
>>> aps = wifi.get_access_points()
>>> aps[0].get_frequency()
2412L
>>> aps[0].get_flags()
/usr/lib/python2.7/site-packages/gi/module.py:117: Warning: type name
`80211ApFlags' contains invalid characters
  wrapper = flags_register_new_gtype_and_add(info)

** (process:21363): CRITICAL **: pyg_flags_add: assertion `typename !=
NULL' failed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/gi/types.py", line 44, in function
    return info.invoke(*args)
SystemError: error return without exception set


and now the crasher...
interestingly pygobject2 does not come up at all in the stack trace.

>>> aps[0].get_ssid()


Program received signal SIGSEGV, Segmentation fault.
0x430a534b in internal_print (op=<unknown at remote 0x9b7d454>, fp=0x41f23500,
    flags=0, nesting=0) at /usr/src/debug/Python-2.7.1/Objects/object.c:300
300	        else if (Py_TYPE(op)->tp_print == NULL) {
#0  0x430a534b in internal_print (op=<unknown at remote 0x9b7d454>, fp=
    0x41f23500, flags=0, nesting=0)
    at /usr/src/debug/Python-2.7.1/Objects/object.c:300
#1  0x43094a58 in list_print (fp=0x41f23500, op=0xb74dce2c,
    flags=<optimized out>)
    at /usr/src/debug/Python-2.7.1/Objects/listobject.c:347
#2  list_print (op=0xb74dce2c, fp=0x41f23500, flags=0)
    at /usr/src/debug/Python-2.7.1/Objects/listobject.c:321
#3  0x430a5363 in internal_print (op=
    [<unknown at remote 0x9b7d454>, <unknown at remote 0x9b7d441>,
<unknown at remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown
at remote 0x9b7d454>, <unknown at remote 0x9b7d441>, <unknown at
remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown at remote
0x9b7d42d>, <unknown at remote 0x9b7d436>, <unknown at remote
0x9b7d436>, <unknown at remote 0x9b7d431>, <unknown at remote
0x9b7d443>, <unknown at remote 0x9b7d430>, <unknown at remote
0x9b7d438>], fp=
    0x41f23500, flags=0, nesting=0)
    at /usr/src/debug/Python-2.7.1/Objects/object.c:315
#4  0x43086c38 in file_PyObject_Print (flags=0, f=0xb77d0078, op=
    [<unknown at remote 0x9b7d454>, <unknown at remote 0x9b7d441>,
<unknown at remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown
at remote 0x9b7d454>, <unknown at remote 0x9b7d441>, <unknown at
remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown at remote
0x9b7d42d>, <unknown at remote 0x9b7d436>, <unknown at remote
0x9b7d436>, <unknown at remote 0x9b7d431>, <unknown at remote 0x9b
7d443>, <unknown at remote 0x9b7d430>, <unknown at remote 0x9b7d438>])
    at /usr/src/debug/Python-2.7.1/Objects/fileobject.c:110
#5  PyFile_WriteObject (v=
    [<unknown at remote 0x9b7d454>, <unknown at remote 0x9b7d441>,
<unknown at remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown
at remote 0x9b7d454>, <unknown at remote 0x9b7d441>, <unknown at
remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown at remote
0x9b7d42d>, <unknown at remote 0x9b7d436>, <unknown at remote
0x9b7d436>, <unknown at remote 0x9b7d431>, <unknown at remote
0x9b7d443>, <unknown at remote 0x9b7d430>, <unknown at remote
0x9b7d438>], f=
    <file at remote 0xb77d0078>, flags=0)
    at /usr/src/debug/Python-2.7.1/Objects/fileobject.c:2512
#6  0x43126a04 in sys_displayhook (self=0x0, o=
    [<unknown at remote 0x9b7d454>, <unknown at remote 0x9b7d441>,
<unknown at remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown
at remote 0x9b7d454>, <unknown at remote 0x9b7d441>, <unknown at
remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown at remote
0x9b7d42d>, <unknown at remote 0x9b7d436>, <unknown at remote
0x9b7d436>, <unknown at remote 0x9b7d431>, <unknown at remote
0x9b7d443>, <unknown at remote 0x9b7d430>, <unknown at remote
0x9b7d438>])
    at /usr/src/debug/Python-2.7.1/Python/sysmodule.c:115
#7  0x430a39b0 in PyCFunction_Call (func=<built-in function displayhook>, arg=
    ([<unknown at remote 0x9b7d454>, <unknown at remote 0x9b7d441>,
<unknown at remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown
at remote 0x9b7d454>, <unknown at remote 0x9b7d441>, <unknown at
remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown at remote
0x9b7d42d>, <unknown at remote 0x9b7d436>, <unknown at remote
0x9b7d436>, <unknown at remote 0x9b7d431>, <unknown at remote
0x9b7d443>, <unknown at remote 0x9b7d430>, <unknown at remote
0x9b7d438>],), kw=
    0x0) at /usr/src/debug/Python-2.7.1/Objects/methodobject.c:101
#8  0x43067095 in PyObject_Call (func=<built-in function displayhook>, arg=
    ([<unknown at remote 0x9b7d454>, <unknown at remote 0x9b7d441>,
<unknown at remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown
at remote 0x9b7d454>, <unknown at remote 0x9b7d441>, <unknown at
remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown at remote
0x9b7d42d>, <unknown at remote 0x9b7d436>, <unknown at remote
0x9b7d436>, <unknown at remote 0x9b7d431>, <unknown at remote
0x9b7d443>, <unknown at remote 0x9b7d430>, <unknown at remote
0x9b7d438>],), kw=
    0x0) at /usr/src/debug/Python-2.7.1/Objects/abstract.c:2529
#9  0x430fd67c in PyEval_CallObjectWithKeywords (func=
    <built-in function displayhook>, arg=
    ([<unknown at remote 0x9b7d454>, <unknown at remote 0x9b7d441>,
<unknown at remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown
at remote 0x9b7d454>, <unknown at remote 0x9b7d441>, <unknown at
remote 0x9b7d44c>, <unknown at remote 0x9b7d44b>, <unknown at remote
0x9b7d42d>, <unknown at remote 0x9b7d436>, <unknown at remote
0x9b7d436>, <unknown at remote 0x9b7d431>, <unknown at remote
0x9b7d443>, <unknown at remote 0x9b7d430>, <unknown at remote
0x9b7d438>],), kw=
    0x0) at /usr/src/debug/Python-2.7.1/Python/ceval.c:3941
#10 0x43102743 in PyEval_EvalFrameEx (f=
    Frame 0x9b0b8dc, for file <stdin>, line 1, in <module> (), throwflag=0)
    at /usr/src/debug/Python-2.7.1/Python/ceval.c:1795
#11 0x431048a2 in PyEval_EvalCodeEx (co=0xb74d5b60, globals=
    {'NMClient': <DynamicModule(_overrides_module=None,
_namespace='NMClient',
_introspection_module=<IntrospectionModule(_namespace='NMClient',
DeviceWifi=<GObjectMeta(do_access_point_removed=<function at remote
0xb74d9764>, __module__='gi.repository.NMClient',
get_hw_address=<function at remote 0xb74d9684>,
get_permanent_hw_address=<function at remote 0xb74d96f4>,
parent=<property at remote 0xb74dd144>,
get_active_access_point=<function at remote 0xb74d95dc>,
get_mode=<function at remote 0xb74d96bc>, get_access_points=<function
at remote 0xb74d95a4>, get_capabilities=<function at remote
0xb74d964c>, do_access_point_added=<function at remote 0xb74d972c>,
get_access_point_by_path=<function at remote 0xb74d956c>,
get_bitrate=<function at remote 0xb74d9614>, new=<staticmethod at
remote 0xb74db23c>, __gtype__=<gobject.GType at remote 0xb77df350>,
__info__=<ObjectInfo at remote 0xb74dc86c>, __doc__=None) at remote
0x9b7b44c>, DeviceEthernet=<GObjectMeta(__module__='gi.repository.NMClient',
get_hw_address=<function at...(truncated), locals=
    {'NMClient': <DynamicModule(_overrides_module=None,
_namespace='NMClient',
_introspection_module=<IntrospectionModule(_namespace='NMClient',
DeviceWifi=<GObjectMeta(do_access_point_removed=<function at remote
0xb74d9764>, __module__='gi.repository.NMClient',
get_hw_address=<function at remote 0xb74d9684>,
get_permanent_hw_address=<function at remote 0xb74d96f4>,
parent=<property at remote 0xb74dd144>,
get_active_access_point=<function at remote 0xb74d95dc>,
get_mode=<function at remote 0xb74d96bc>, get_access_points=<function
at remote 0xb74d95a4>, get_capabilities=<function at remote
0xb74d964c>, do_access_point_added=<function at remote 0xb74d972c>,
get_access_point_by_path=<function at remote 0xb74d956c>,
get_bitrate=<function at remote 0xb74d9614>, new=<staticmethod at
remote 0xb74db23c>, __gtype__=<gobject.GType at remote 0xb77df350>,
__info__=<ObjectInfo at remote 0xb74dc86c>, __doc__=None) at remote
0x9b7b44c>, DeviceEthernet=<GObjectMeta(__module__='gi.repository.NMClient',
get_hw_address=<function at...(truncated), args=0x0, argcount=0,
kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=
    0x0) at /usr/src/debug/Python-2.7.1/Python/ceval.c:3312

it goes on further, but hopefully that is enough...

Any ideas?

Thanks,
Daniel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]