Giter VIP home page Giter VIP logo

gatotray's People

Contributors

gatopeich avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

gatotray's Issues

Segfault when trying to change command string in preferences on fresh install

When running gatotray without a configuration file, it tries to free a string that has not been allocated on the first change in the text field of the preferences dialog. Playing around with the code, the following patch fixed it for me, but I don't know if that is a correct fix:

diff --git a/settings.c b/settings.c
index 7eb0e30..7e84c95 100644
--- a/settings.c
+++ b/settings.c
@@ -144,9 +144,12 @@ void pref_init()
     for(PrefString* s=pref_strings; s < pref_strings+G_N_ELEMENTS(pref_strings); s++)
     {
         GError* gerror = NULL;
-        *s->value = s->default_value;
+        *s->value = g_strdup(s->default_value);
         gchar* value = g_key_file_get_string(pref_file, "Options", s->description, &gerror);
-        if(!gerror) *s->value = value;
+        if(!gerror) {
+          g_free(*s->value);
+          *s->value = value;
+        }
     }
     preferences_changed();
 }
-- 
2.25.4

Warn about continuously crashing processes

E.g. today mate-session's cumulative CPU time kept growing fast because its window-manager (marco) was crashing repeatedly. Standard top just displayed 5% CPU usage for mate-session and was not capturing the crashing children because they were dying in less than 3 seconds.

In this case, gatotray correctly shows mate-session taking >50% CPU while default top shows a meager 5% because it does not count dead subprocesses.

It would be nice to produce a user notification on such scenarios. It could be detected with the new process-tracking code, and also comparing cumulative versus non-cumulative times.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.