“Look at it again!”

Do you want a stable and bug-free KDE Workspace? You certainly do. But before I talk about bugs, let me chat a bit about myself.

Being a math teacher is not easy; your students hate you for that fact alone. And I have a habit that makes them hate me even more: When there is something wrong with their math, I usually do not help immediately. Instead, I keep saying “look at it again!”, not even telling them where their mistake is. Only eventually they give up, and I need to guide them to the correct solution.

Okay, to tell the truth, they fully support my “bad habit”, because they learn a lot this way. A good mixture of reasoning, patience, and pedantism cannot be bad.

Now, why am I telling you all this?

Today, I closed three bug reports about crashes inside KDirWatch, all duplicates of the well known inotify crash bug that is happening since 4.0. The backtraces were, however, a bit different, and so I asked David Faure (our KIO maintainer) what could be the reason for this.

The whole inotify handling in kdelibs is really low level, nothing a casual C++ programmer wants to look at. I did, however, look at the code some months ago, when I had the (self-imposed) mission to resolve all kdelibs crashers (I miserably failed at that, though). There was nothing wrong with the code. I swear, nothing.

Said bug often happens with updates from package managers. I was thinking about some updated libraries having a different binary layout and with all the latest fuzz about inotify bugs in Linux kernel 2.6.31, which could cause folder views to not refresh on changes, I even feared some incompatibility.

So I “looked at it again”. And guess what? The reason for the crash was obvious, David immediately saw another related bug, and we were able to create a patch in just about two hours. After committing that, I looked at the patch, and found a bug that I introduced. Fixed that, committed that. Guess what? I “looked at it again”, and saw my (hopefully) last mistake.

There is one big difference between us KDE developers and my students. We cannot give up and hope someone guides us to our mistakes. We have to “look at it again” (and again).

PS: The fix is probably too late for the 4.4 beta1 release, but let’s hope the bug is gone for good with the beta2 release.

Advertisements