不能请有人告诉我为什么下面的代码在执行时崩溃,(编译正常)它在旋转的 X 环境中向左旋转 90。
DBusGConnection *connection;
DBusGProxy *proxy;
GError *error = NULL;
gchar *name = NULL;
g_type_init ();
//Get the connection and ensure the name is not used yet
connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (connection == NULL) {
g_warning ("Failed to make connection to system bus: %s",
error->message);
g_error_free (error);
exit(1);
}
proxy = dbus_g_proxy_new_for_name (connection,
"to.some.Service",
"/to/some/Object",
"to.some.Interface" );
dbus_g_proxy_call(proxy, "getStatus", &error, G_TYPE_INVALID, G_TYPE_STRING, &name, G_TYPE_INVALID);
printf("Name is: %s\n", name);
return 0;