| Summary: | Crash when call QDBusConnection::disconnectFromBus | ||
|---|---|---|---|
| Product: | [Unmaintained] kdelibs | Reporter: | Huang Peng <shawn.p.huang> |
| Component: | qt | Assignee: | kdelibs bugs <kdelibs-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Huang Peng
2008-06-16 09:48:13 UTC
Did you report the bug to Trolltech? For example, using qt-bugs@trolltech.com #include <QtDBus/QDBusConnection>
#include <QtCore/QCoreApplication>
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
{
QDBusConnection conn =
QDBusConnection::connectToBus(QDBusConnection::SessionBus,
"myconnection");
}
QDBusConnection::disconnectFromBus("myconnection");
}
No crash. If you have a testcase, please send to trolltech.
No. I will sent a mail to it. FYI: QDBusConnection::connectToBus (type, name) uses dbus_bus_get_private to create a private dbus connection (it works fine), but QDBusConnection::connectToBus (address, name) does not use dbus_connection_open_private to create a private connection. So calling disconnectFromBus will cause the crash. I think it's the reason of this bug. The problem will happens, if connection is created by QDBusConnection::connectToBus (address, name). Test Case:
QDBusConnection *connection = new QDBusConnection (QDBusConnection::connectToBus (getenv ("DBUS_SESSION_BUS_ADDRESS"), "dbus"));
delete connection;
QDBusConnection::disconnectFromBus ("dbus");
Report to trolltech. |