hakandundar34coding / system-monitoring-center

Multi-featured system monitor
GNU General Public License v3.0
905 stars 83 forks source link

Right-click on processes does not always bring up the context menu in the Process Viewer. #226

Closed MostHated closed 12 months ago

MostHated commented 1 year ago

Hey there, I came across an unfortunately very frustrating issue with the process view. As demonstrated in the video clip below, ever since installing v 2.22.2 (I believe my prior version was not using GTK4?) the right-click context menu does not always work when attempting to right-click on a process in the process view. This unfortunately caused me quite a headache yesterday when I had a process get out of control and I attempted to force it closed, but could not do so in time before it filled up memory/swap and crashed out my PC. I had 0 issues with menus opening in the previous versions, so not sure what is up with this version. It seems to be random, and does not depend on which process I am attempting to right-click on, the same process might work fine with a single click, but then coming back to it, might take anywhere from 2-5 right clicks to get the menu to open.

Below, you will see I right-click on the Rider.Backend process and the context menu opens fine (shown also in the terminal behind, which is running 'showmethekey' for click demonstration purposes). Then I attempt to do the same on the Java process and it takes 4 right-clicks before the context menu opens.

right_click.webm

hakandundar34coding commented 1 year ago

I tested v2.22.2. There was no menu problem. After SMC v2.22.1, there was a few GUI changes for System tab.

Is it Flatpak version?

Can you follow these steps?

MostHated commented 1 year ago

I installed via .deb from the releases tab. I will give that a try though now and report back.

MostHated commented 1 year ago

I had to get a few deps, but was able to get that going.

Interestingly (though, anecdotally), it seems to have a lower success rate of right-click working running in this manner/this version.

I tried it in other parts of the window, ex. the search bar in on the processes tab, the top title bar, the system tab over the selectable text, etc. It works every time without an issue in those places, and every time everywhere else on my system, just not on the processes in the process tab (or the process column title, they have the same issue). Very strange.

I did just notice this. When I click several time and nothing happens, when it finally does open after multiple clicks, these errors appear:

(python3:3655731): Gtk-WARNING **: 21:39:45.630: Broken accounting of active state for widget 0x55d5aa084290(GtkApplicationWindow)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aae21700(GtkLabel)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aadd3640(GtkBox)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aadd37c0(GtkBox)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aae43180(GtkButton)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aae58480(GtkTreeView)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aae4a500(GtkScrolledWindow)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aa0d7980(GtkGrid)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aa0b5770(GtkGrid)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aa136200(GtkStack)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aa0ee4b0(GtkGrid)

(python3:3655731): Gtk-WARNING **: 21:39:48.467: Broken accounting of active state for widget 0x55d5aa084290(GtkApplicationWindow)
hakandundar34coding commented 1 year ago

There may be problems about GTK. These warning are not printed during tests on several distributions (physical machine, virtual machine).

Are there menu problems if your system is not under heavy load? Are there menu problems if you use Flatpak version of the application? Can you share a screenshot of System tab of System Monitoring Center? Process information is updated very frequently. Is the update interval 0.5? Can you select a bigger value (1 or 1.25 seconds) and try again?

hakandundar34coding commented 12 months ago

It has been about 2 weeks since the last comment. I will close this issue. But you can write comments.

Additionally, you can use keyboard shortcuts for ending processes without opening the right click menu. These shortcuts are shown on the right click menu.

MostHated commented 11 months ago

That is my bad, I didn't see there was another comment. I will check these things now and report back shortly.


The right-click issue happens the same no matter the load. I just tested a few times again and I have nothing open really, right now and the behavior is the same.

I just installed the flatpak version, and it seems like the flatpak version does not have this behavior. The context menu, so far, has worked every time as I tested randomly every few seconds over a minute or two timespan.

hakandundar34coding commented 11 months ago

There may be problems on your system. Same code is used for Flatpak and non-Flatpak versions of the application. Flatpak version uses several packages and libraries (such as GTK) of Flatpak environment instead of their versions on host OS.

What is GTK version on your system (for non-Flatpak application)? You can also share System tab of the application.

MostHated commented 11 months ago

Sure, here it is:

image_20231012174434

hakandundar34coding commented 11 months ago

I do not know if it is a GTK bug. You have 4 monitors. Did you checked all monitors for the menu? If there is a bug of the GUI toolkit, menus may be opened in a incorrect place on systems with multiple monitors and complex layout settings. Menu place is controlled by the GUI toolkit. Are there problems when you use a single monitor?

Additionally, some PID numbers (on the video) are very big. They are bigger than 4 million. Your system may be opened for a long time. You can see the time on the CPU tab. Restarting your system may fix this problem.

MostHated commented 11 months ago

Now that I know the flatpak version works fine and doesn't have the issue, I can just use that and all should be well.