【发布时间】:2019-02-28 15:06:24
【问题描述】:
我在 DBUS 初始化时随机收到一个 dbus 断言和应用程序崩溃。
下面是我获取dbus的代码sn-p。
px_sess_ctxt->px_bus = dbus_g_bus_get (DBUS_BUS_SESSION, &ppx_error);
if (NULL == px_sess_ctxt->px_bus)
{
return ERROR_1;
}
px_bus_proxy = dbus_g_proxy_new_for_name (px_sess_ctxt->px_bus,
PROXY_NAME, PROXY_PATH,PROXY_INTERFACE_NAME);
if (NULL == px_bus_proxy)
{
return ERROR_2;
}
dbus_g_proxy_call (px_bus_proxy, "pingMethod", &ppx_error,
G_TYPE_STRING, svc_name,G_TYPE_UINT, 0, G_TYPE_INVALID, G_TYPE_UINT, &ui_ret, G_TYPE_INVALID);
随机我得到分段现金,然后 dbus_g_proxy_call() 失败。 以下是代理调用失败时出现的错误。
process 1559: arguments to dbus_pending_call_steal_reply() were incorrect, assertion "pending->reply != NULL" failed in file dbus-pending-call.c line 715.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtrace
请告知用户在 dbus-glib 库中遇到的任何问题。这将非常有帮助。
谢谢
【问题讨论】:
-
pingMethod方法是否真的返回了回复?dbus-monitor显示为总线上的流量是什么?断言失败的回溯是什么? (在gdb下运行。) -
1.没有测试过 pingMethod 和 dbus-monitor。我会测试和更新。 2.尝试取core-dump并分析。最后一个函数 gdb coredump 点来自 dbus。之后没有堆栈跟踪。 (gdb) bt full #0 0x215082a4 in kill () from /lib/libc.so.0 #1 0x2152e852 in abort () from /lib/libc.so.0 #2 0x2015b646 in ?? () from /lib/libdbus-1.so.3.7.6 回溯停止:前一帧与本帧相同(损坏的堆栈?)
标签: embedded-linux glib dbus