FeralInteractive / gamemode

Optimise Linux system performance on demand
BSD 3-Clause "New" or "Revised" License
4.67k stars 184 forks source link

Fixed crash if dbus is not accesible #458

Closed Trial97 closed 7 months ago

Trial97 commented 8 months ago

When running an application without dbus connection I get the following crash:

GameMode ERROR: Could not connect to bus: Failed to connect to socket /run/firejail/mnt/dbus/user: Permission denied
dbus[5]: arguments to dbus_connection_unref() were incorrect, assertion "connection != NULL" failed in file ../../../dbus/dbus-connection.c line 2832.
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

I'm well aware that gamemode will not run without dbus but for the calling real_gamemode_query_status function I would expect the function to just return the fact that it's not accessible( by returning -1) and not just close the app if failed.