With Qt 4.5-rc1 recently released, we've stumbled over a strange issue with Quassel. A binary compiled against Qt 4.4 would completely freeze when used with Qt 4.5. This problem mostly hit users on binary distros trying out Qt 4.5. As it turned out, recompiling Quassel against Qt 4.5 magically fixed the problem - but of course, this is not an option for distro packagers, as they will have to provide packages built against 4.4 at least until 4.5 hits their distros proper.
So we hunted for that bug, to no avail at first, but then EgS
stumbled over dug into the strange dungeons of his memory, and there found lurking a blog entry by one of the Trolls:
Well if you leave the code as it is then you will either get a crash in your code or it will simply cause the application to hang because the QRegExp object passed into QString::indexOf() is no longer modified. The good news is that there is a solution which you can use now even if you are not switching to Qt 4.5 straight away. What you should do is change the calls from QString::indexOf() to QRegExp::indexIn().
We found one location in our code where we did this, and changed that:
- matches[i] = str.indexOf(regExp[i], qMax(matchEnd[i], idx));
+ matches[i] = regExp[i].indexIn(str, qMax(matchEnd[i], idx));
This seems to fix the issue, and Quassel binaries built against Qt 4.4 now reportedly work with 4.5.
What I don't get: I can see how "not modifying the QRegExp object" causes our code to hang here, and why the above makes it work again. But why the fringle does a mere recompile against Qt 4.5 fix that issue as well? Does the regexp magically become modifiable again? Luck? Karma? Voodoo? Anybody can help me out there? ;-)
Qt has this nice feature that you can embed arbitrary files into your binary, and access these so called Resources via special paths starting with a colon. For the longest time, Quassel has exclusively relied on resources and embedded all its data files, including icons, into the binary. This had the advantage that we could always be sure to find all required files at a certain location and need to provide fallback mechanisms. It also meant that Quassel binaries didn't need to be installed; they were completely standalone and could just be run from any location. Quite nice especially on a platform like Windows that does not have standard locations for all sorts of data files. And on Linux, whose various flavors still do not always agree where stuff should go.
Now, where's the problem with that approach? For once, the binaries get bigger. Maybe not on the file system (having dozens of small files tends to waste a lot of space due to fragmentation and partial blocks), but certainly in RAM. It also increases loading times a bit. Then there was the issue with translations. We would embed all translations into the binary - obviously a waste of space even though each individual language file is surprisingly small. The LINGUAS variable, restricting the languages to be built, helped a bit, but not much. Distros tend to provide language packs, so support for external files would be needed.
But the real killer was KDE integration - KIconLoader, for example, wouldn't look into our binary to find an icon, obviously. So for KDE support, we needed to install the icons separately. Consequently, Quassel gained support for that a while ago, complete with some confusing cmake options. Over time, we got more data files, such as .knotifyrc for KDE's notifications, and networks.ini containing predefined network definitions. As it turned out, our build system installed them in locations that would be re-found at run-time only by pure luck, if at all. And it would fail completely on Mac and Windows.
I have fixed that in the past couple days, and Quassel now has proper data file handling. Read on for more information, in particular if you are a distro packager!
One of the more enduser-confusing issues with Quassel used to be its storage locations for settings and the backlog. The various platforms Quassel supports handle the storage of configuration much differently. Qt helps us there with abstracting this away, and giving us for example QSettings, which allows for the storage of configuration data in the platform's native format without having to bother about platform issues. In particular, this means that settings go into the XDG location on Linux (usually in $HOME/.config/), into .plist files on Mac, and into the Registry on Windows.
All nice and dandy, but what to do with data files, such as the sqlite storage? Well, Mac has a standard location for that, as does Windows (%APPDATA%). On Unixoids, such data traditionally goes into $HOME/.. And that's where the trouble started.
Since people keep asking us what our view is on the usability review seele recently did about Quassel IRC, I thought I should blog a little something.
First of all, it didn't hit us as a surprise. We've been in contact with kubuntu about their plans before, and we've ongoing discussions with seele and other kubuntu devs about how to make Quassel suitable for new users, in particular for kubuntu's main target group. Many things seele mentions in her review have been on our TODO list for a while now, but of course, being developers, we tend to put such issues off in favor of new features... now this whole thing shifts our priorities to focus on usability for a change. Sorry guys, this also means scripting support has to wait again...
Meanwhile, apachelogger is busy making the Quassel packages rock on kubuntu, and now provides nightly Quassel builds via Project Neon. And the Quassel developers, of course, are now busy to convert the review into code :)
Read on for some specific points.
As my XMas present to our faithful community, I have merged my branch named "kde" into git master a few days ago. As the name suggests, this brings you the long-awaited optional KDE4 integration! Mostly this means that Quassel, with KDE integration enabled, will use your KDE icon and color theme, it gives you editable shortcuts, and - finally - full support for knotify (the KDE notification system). Some more things will probably follow soon.
Meanwhile, EgS has been busy pimping the core, adding extended backlog features, query merging, proxy support, SSL authentication (e.g. for OFTC) and more cool stuff. We will now focus on usability issues and general UI polishing, thanks to seele's efforts who gratiously took the time to thoroughly review Quassel's UI.
All this will of course be part of the next release, quassel-0.4.0, due early 2009. So that's definitely something to look forward to in the new year ;-)
Update: Just to avoid confusion: KDE integration is an optional feature, and it will stay an optional feature. We do not intend to enforce a KDE dependency, since many Quassel users don't use it (for some bizarr reason ;-)), and it would be a mess on Windows and MacOSX anyway. This does not mean that our KDE4 users should have to miss out on great features like shiny Plasma bubbles though :)
As many of you probably have noticed by now, we have had some server trouble right in time for christmas. We are currently in the process of restoring all services, but it will probably take us a few days. So far, we have most of the webpage running again The FAQ is still missing, and we will tweak the theme a bit I guess, as this was just a rather quick hack to make the page work at all with the new Drupal version (yes, we took the opportunity to update that). Git is back too, as are the download pages. The bug tracker is still offline and will be for a few more days probably, as we are evaluating switching to a different software.
Anyway, sorry for the inconvenience.
Merry XMas/Chanukka/Season's Greetings/Weekend and a Happy New Year :)
After more than two months, we are finally delivering a shiny new feature release to you! The 0.3.0.x releases were only bugfix releases, based on the "ancient" 0.3.0. In the meantime, we were busy working on new stuff and fixing tons of bugs. In fact, I won't even bother listing all that stuff here, since you can just click on those links and see for yourself :) Among the features users have been waiting for for a long time and now finally get are day change messages and properly clickable URLs with visual feedback. Another highlight certainly are the on-hover previews of linked webpages.
We are quite proud of quassel-0.3.1, as we've put a lot of effort in making it a solid and stable release. So don't hesitate to grab it from our downloads page or get it from a distribution near you!
Well, looks like 0.3.0.2 was not the last 0.3.0 release after all. coekie found an issue with CTCP handling in Quassel Core that allows attackers to send arbitrary IRC messages on your behalf. This issue is present in all versions prior to 0.3.0.3 and Git older than October 26th (rev. d7a0381).
This has been fixed in the quassel-0.3.0.3 release and also in Git and the nightly builds. Gentoo and *buntu already ship the new version, with more distributions hopefully following ASAP. If you still use a 0.2-rc1 core, please consider updating to 0.3.x as soon as possible. Note that we provide unstable, but fixed packages for Debian now, thanks to dileX.
Note that this affects (only) the core, so you'll need to update and restart your core. Clients are not affected. Also, this exploit can not be used to affect anything on your system, including your local account, as it is purely IRC related.
We are sorry for any inconvenience this causes to you, and hope this first will also be our last security fix for a long time to come...
The Quassel development team (yes, in full force) has been at the
Trolltech Qt Developer Days in Munich again. As last year, Trolltech Nokia has generously invited us to the conference in the shiny Hilton hotel. We had a great time, met a lot of interesting people and saw several interesting talks. Our thanks go in particular to Knut Yrvin, Qt Software's community manager, for making this possible.
A few random points I took away from that event: