…although I am willing to entertain the idea that they are a necessary
evil.
Themes in GTK+ land are, simplified, arbitrary pieces of dynamically
loaded code that is hooked into the drawing layers of widgets. There
is no fault isolation, so when (not if) a theme does something naughty,
the application crashes. Then the user curses a few times and blames
the usual suspects: the screen/keyboard and the application.
Have a look at bug 438456. Theme code used in, for example, the industrial theme released various
kind of memory allocated by GTK+ using the wrong function, in this case g_free
. Result: instant memory corruption in all GTK+ applications! Not good.
I do not think it is realistic to redesign the theming of GTK+ at
this point in time, but we really need to do something about
stability.
- Theme authors need to be extremely careful with their coding.
- Theme authors should use the full range of automated testing
at our disposal: running under Valgrind and separately withG_SLICE=debug-blocks
during some kind of theme torture test is a bare minimum. For every release.
I realize that I am asking other people to do some work. I do not feel too bad about that, though, because it is theme code that is causing my application to crash, causing people to lose data, and the blame is sent my way.
Ok, go ahead and tell me how wrong I am.