KDE: Codename "Destiny"
Serenity must be cursed --- or maybe it's me --- because it looks like I can't make any major release without having to make another one a few days later because of a big bug that escapes my vigilance.
And this time, it wasn't even fun to debug. Nothing exploded under my nose. Somebody (Hello Luis!) reported that Serenity crashes KDM at login time. So I tried.
I got not much to see. A black screen and only the activity light of the screen blinking from green to orange. All I could do was a reset, restart in runlevel 3 and edit kdmrc to use another style, to finally be able to switch back to runlevel 5, login and try to find what I did wrong.
So far, I haven't found any log reporting the reason of the crash. Of course, I found what caused the problem but I had to adopt the painfully slow trial-and-error approach. I had to guess what could crash KDM, remove it from Serenity's sources one way or another, make install and test.
Unfortunately I was able to look at KDM sources to see what widgets it uses. That gave me the wrong idea the KDM didn't like the way Serenity intercepts all QFrame drawings. I went two times through the build-test-crash-reboot process to realize that the SereneFrames pose no problem to KDM.
So here I found myself at the very beginning of serenity.cpp, checking every line. I saw nothing until I got around the 1100th line.
There! Something really strange.
I put a temporary patch, build, log out... and back in! The login dialog was using Serenity style. Victory!
I changed my patch into definitive code and made some extensive --totally useless-- tests to check that I didn't provoke any undesired side-effects. There were --of course-- none so I could leave Serenity alone until today.
Today, I took care of some cosmetic things. I didn't like the default settings Serenity used. I changed two of them: now, by default, the global style is Zen and the textbox focus highlight is activated. I did this because although KDM is launched by root, the style doesn't use his settings during login.
I will investigate on this matter because I don't like the idea of imposing my preferences to everybody. And I also need to find where root stores his serenityrc because it's not in $HOME/.qt/ as expected.
Oh yeah, why was I mocking myself and my code? That's because when I looked in Serenity's sources around which line the bug was, I just realized that all I did was for nothing! Apparently I was distracted or interrupted while I was implementing my "super-killing optimization" because it does nothing or close to nothing. It just wastes 8 bytes (I think) for two QColors that aren't used... anywhere! I'm like this squirrel that stores nuts for the winter and forgets where it put them once it turns its back.
(I feel so ashamed that I'm going to hide for a while...) ;-)
Labels: development, KDE, Serenity
0 Comments:
Post a Comment
<< Home