Archive for the ‘Desktop’ Category
How msn-pecan fixed a 6 year old bug, how Pidgin didn’t, and stole the fix
The bug we are talking about is the infamous switchboard timeout error which was very elusive, it happened randomly, and very often for some users in unknown conditions. Essentially you send a message, and after one minute you receive a notification telling you the message never arrived, after which you need to resend the message, and hope it will arrive this time.
Let’s see how the two projects approached this bug.
Pidgin
There have probably been many bug reports regarding this issue, but it’s very difficult to find old historic bugs in Pidgin’s new and old tracker. The modern version is reported in Pidgin’s tracker as #3330. There you can see people saying it happens a lot, that the priority should be increased, and many tickets were marked as duplicate. Developers however stayed in denial mode: they say it doesn’t happen to them, and then turn to the usual strategy: ask for irrelevant information such as a valgrind log, and to try again as it might have been magically fixed.
Then they try a simplistic workaround; re-send the message on failure. This doesn’t work on most cases, and even when it does, the message arrives more than 1 minute late. As usual, no developer did much else about the bug.
In the mean-time, Adium had many reports (2475, 2395, 6316, 6708, 6952, 7288, 9978, 11045, 11398, 11478) of the same bug. At this point something was very clear: it happens more often in OS X.
The interesting point is when Rasmus Hummelmose, an Adium user, logged to IRC to rant about the problem. He received the same response on both #adium and #pidgin; it’s a server problem, or it’s your slow connection, there’s nothing we can do. That didn’t convince him (it wasn’t true) and he effusively tried to explain that the issue was real and was affecting many users. He didn’t achieve anything more than upsetting the developers.
This is not the way to solve an important bug.
msn-pecan
The msn-pecan team on the other hand thought: hey, there’s a bug, and this guy can reproduce it, let’s fix it. I invited him to #msn-pecan. Rasmus was a bit reluctant; Why loose time with msn-pecan developers? Surely Pidgin developers must be capable enough to do the job. He changed his mind when I explained that the core parts of libpurple’s (Pidgin) msn were either developed or refined by me anyway, and therefore, Pidgin devs probably didn’t have the expertise required to identify this problem.
With that we started an endeavour to fix the problem through the weekend. I started by providing some infrastructure changes in order to visualize what was actually happening, Devid Antonio Filoni created Adium builds, and Rasmus tested, and provided feedback. We made some conjectures and discarded them with further testing and fixed some bugs along the way until we found a reliable way to reproduce: send a message, wait for 15 minutes of inactivity, and send another message.
After this is was clear that something bogus was happening with the network connection, but since we cannot fix all the elements involved, we implemented a simple fix: close the connection after 1 minute. That worked perfectly. Rasmus was happy, and we were too
That’s how you do it.
The stealing
Logically after our success, Rasmus decided to rub the fix on the face of Pidgin and Adium developers, after all, they were the ones that said it was not a bug. But they were not impressed.
However, Daniel Ljungborg (aka Dimmuxx) was interested in the fix, and in good faith I pointed the commit message that explains the issue in detail.
Then I find out Ka-Hing Cheung, a Pidgin developer, implemented the fix as I described, but thought it was OK to not thank anybody, explain where the fix came from, or mention the msn-pecan project, or any external source at all. We (Rasmus, Devid and I) spent a weekend of our free time working hard to identify, fix, and verify the issue, and if you read the commit message you would think they came out with the solution:
Author: khc@pidgin.im
Timeout switchboard connections at 60 seconds, should Fixes #3330 for most people.
That is plagiarism, pure and simple, and unfortunately, it’s not the first time.
Don’t underestimate Google Chrome OS, or Google for that matter
This is somewhat a response to the post “Let’s all take a deep breath and get some perspective” which criticizes Google mostly on the basis of the “failures” of Android and Chrome. But also, everyone is talking these days about Google Chrome OS, and how it is a silly idea. Is that so?
libmtag-0.3.0: moved to git
I finally managed some time to make another libmtag release. This is mostly tiding up the code, cleanups, new codestyle, building improvements and moved to github
Also some handy features:
- strip tag: now you can remove say id3v1 tags while keeping id3v2 intact
- get specific tag: similarly, you can retrieve only id3v2 information
- get all: this function might is useful for some UIs, specify some callback, and get all the tags
I wonder why not so many people are using this, is there a better tagging library?
Any packagers interested?
Grab it while it’s hot
msn-pecan 0.0.19 released, more stability and “now playing” support
This is mostly a bugfix release that should make msn-pecan much more stable. Bug also brings some nice features such as “now playing” support.
Everyone is encouraged to update.
I’ve been busy with other projects so I have not been able to work as
much as I would have wanted, but all in all, this is a good release.
The features (thanks to Devid) include support for “now
playing” (ported from libpurple), and a new way to be notified when a
contact has deleted you (you’ll see on the conversation window). Also,
some issues in Adium were fixed, so we will probably roll an Adium
build with msn-pecan enabled.
I’ve updated my system so it might take a while before the win32
binaries are uploaded, anyone willing to take this one?
Download from the usual place at googe code.
Bugs fixed
- 99 Unable to retrieve display pictures when invisible or logged as invisible
- 109 Protocol priority
- 120 Aliases not cleared properly
- 133 pidgin crashed with SIGSEGV in msn_message_destroy()
- 154 Pidgin Randomly Crashes
- 135 russian translation doesn’t work
Enhancements
- 140 Support for “Now Playing” status field
- 129 Can’t verify installation, or uninstall
- 124 Notify when deleted by a contact
Taks
- 121 Make dbg package for the launchpad repo
Diffstat
105 files changed, 1295 insertions(+), 749 deletions(-)
Contributors to this release
Albert Cervin (1):
po: update Swedish translation
Devid Antonio Filoni (14):
Fix use_userdisplay option using Adium.
Change PACKAGE to GETTEXT_PACKAGE.
Translate msn-pecan also using Adium.
Fix use server alias option
Move utils/msgplustags.{c,h} to pecan_util.{c,h}.
Update COPYRIGHT.
Add PURPLE_STATUS_TUNE support and parse contacts's CurrentMedia.
Update MsnClientCaps in msn.h.
Add "Has Space" to get_info.
Show "You are not in A's contact list" message opening a conv
window if needed.
Set the passport also to session->user.
ab/pecan_contact.c: cleanup.
slp: destroy object at the right time
po: update Italian translation
Elias Julkunen (1):
po: update Finnish translation
Felipe Contreras (44):
Cleanup login steps.
Show up 'connecting' state.
session: Cleanups.
Trivial cleanups.
Cleanup configuration stuff.
session: Random cleanups.
Remove bad Russian translation.
cmdproc: trivial cleanup
slpcall: avoid extra error cb call
status: trivial cleanups
status: improve "available" state mapping
Trivial cleanups
userdisplay: report failure
Log general server notifications
Makefile: add debugging symbols by default
session: destroy ud manager after freeing slplinks
contact: store pecan status instead of pidgin one
Reorganize how bad statuses are handled
notification: store user state
contaclist: add function foreach_contact
Get user displays when returning from 'hidden' state
status: trivial cleanup
contact: use "invisible" for the HIDDEN status
Use pidgin mobile status only when offline
Update copyright notices
command: trivial cleanups
command: remove unused refcount
command: general cleanups
contact: enable workaround for server aliases
fix_purple: trivial cleanups
fix_purple: rename purple_buddy_set functions
Reorganize switchboard handling.
Close the http node when not needed.
Make sure the switchboard is not freed when it's still used by slplink.
transaction: trivial cleanup
transaction: add ref/unref
Properly ref/unref transactions
transaction: fix initial ref_count
sb: set error properly
Fix wrong memory access
Optimize GType retrieval
Fix SLP DATA message creation
po: general translation updates
Bump version to 0.0.19
Geoffrey Antos (1):
slplink: fix buffer overflow vulnerability
Luís Neto (1):
po: update Portuguese translation
Wei Hsiang Hung (1):
po: update Traditional Chinese translation
Pidgin brainstorm back to life
Thanks to Nicolas Deschildre, the Pidgin brainstorm is now back to life. He provided the infraestructure and ideatorrent setup. There’s some work needed to have a fancier theme, but for now it should work.
The next step is to spread the word so as many Pidgin users as possible hear about this, since it’s not officially supported by Pidgin developers (won’t be on the Pidgin site), although they are OK with it in “unofficial” form.
I strongly believe an active brainstorm would be very useful for the Pidgin community. We can for example link trac tickets to brainstorm ideas, in order to make them more visible so they are not forgotten to oblivion. Or we could suggest a pack of ideas for a Google SoC student. This could open the doors to many things.
So let’s organize and spread the word! Digg it, slashdot it, or whatever
gst-openmax demo on the beagleboard
Here is a video showing off gst-openmax on the beagleboard.
It’s a 720×400 MPEG-4 video at 24 fps. Essentially gst-openmax is using TI’s OpenMAX IL implementation, which is using the DSP on the OMAP 3530 to decode the video.
The CPU usage on the ARM side is about 10% which leaves plenty of room to decode audio or anything else. When debugging is turned off on the dsp-bridge kernel driver, the CPU usage is less, but it’s more unstable.
So, if you want to try this out on your beagleboard, just follow these instructions. If you don’t have one, what are you waiting for?!
Everything is open source, ready for eager hackers, except the DSP software, which is provided as binaries and you need to run an installer that extracts them after you agree with the “free for non-commerical”-use license. Texas Instruments is also providing all the tools to write DSP software publicly, so you can write your own open source codecs if you want
There’s one minor “but”. Texas Instruments uploaded the wrong DSP socket nodes for MPEG-4 video, so it doesn’t really work out of the box, but they are working on that.
This is what we are going to use on the Maemo 5 devices so if you want to get your hands dirty early on, you just need a beagleboard, which is not expensive. This is a lot of improvement since previous Maemo releases, where Nokia developed custom DSP software which unfortunately wasn’t picked up by other parties, so it was pretty hard to develop on top of it, even if was more open.
Or you can try on x86 with STMicro’s OpenMAX IL implementation, bellagio, which can use FFmpeg, as well as other open-source codec libraries.
Since bellagio is pretty extensible, that’s what will be used on Maemo 5 to run the audio codecs. More details on that later.
OpenMAX IL on x86 is not so much fun yet because you’ll not get much advantage, unless your graphic card somehow provides hardware acceleration through the OpenMAX IL interface (hint to ATI and NVIDIA).
You can find more information about gst-openmax on the freedesktop wiki. My personal repo is at github, where there’s the latest stuff and branches for things to come like tunneling support that NXP developed in collaboration with us.
So there’s many things you can help with. If you only have x86 you can help improve gst-openmax, or the core of bellagio. If you have an OMAP3 device then you can help with TI’s openmax, or dsp-bridge which needs a lot of cleanups before its merged into the Linux kernel.
If you happen to like git you can find my personal repos for all these technologies at github:
I even have an example DSP socket node (with instructions) that you can use for reference, or to test the dsp-bridge. The patches for the dsp-bridge are on a branch on the linux-omap tree here.
Needles to say, comments and patches are welcome
libmsn-api plan
Ok,
This is a response to my previous post, since Tiago (libmsn’s author) replied and I think I should explain in more detail.
I think there should be a libmsn-api, in C, which is basically a bunch of .h files. Several things could implement this API, for example pymsn, which is written in Python, but with C bindings that implement this API it could be used by both telepathy-msn and pidgin-msn effortlessly. Of course, there’s already telepathy-butterfly, but there’s nothing that allows libpurple to use pymsn.
In a similar way libmsn could implement the exact same API. The only problem is that libmsn AFAIK doesn’t handle the connection stuff (sockets, proxy, ssl), some something else would need to handle that. In order to write a telepathy CM effortlessly in C, somebody should handle this connection stuff. That would be libim-util, which could be shared by libmsn-pecan and libmsn, and actually other protocols libraries could use the same library, like Skype.
One option which I’m depicting in the diagram, is to wrap libmsn and libim-util together and provide this connection functionality through the libmsn-api. This connection stuff is not required by libpurple since it already provides this connections stuff, however, it’s far from ideal, so it would be nice to have the option to use libim-util for that. This approach also has the advantage of making it easy to write standalone applications, like bots
The other option would be to use libim-util directly from telepathy-msn, and remove that connection stuff from the libmsn-api.
Keep in mind that this is not just theoretical stuff, I’ve actually implemented simplified versions of many of these pieces, including the pymsn’s c wrapper.
The purpose is to give more options to the users, more users to the msn backends, and avoid the current situation where each msn application has it’s own msn implementation.
msn-pecan 0.0.16 released
This is mostly a bugfixing release, and not a very good one at that.
However, there are some new features too, like handwritten messages support (thanks Devid!).
Also, now you can try direct connections (receive only), just enable the option in the account properties. And regarding options, now there’s the option to disable user displays, for the ones that keep having crashes (not the right solution, but worth having it for testing purposes).
Obligatory diffstat:
48 files changed, 1367 insertions(+), 879 deletions(-)
Not exactly with all the features planed, but hey, release early, release often, right?
Ah, and on the bad news Adium has decided to go for the official MSN code now they’ve moved to msnp15; in the appropriate words of Evan Schoenberg; known devil is better then unknown angel. Hopefully they will see the light
Download from the usual place at googe code.
Global Instant Messaging Market Share
Ever gone looking for instant messaging market share data?
It seems almost unfathomable that there can be networks with active accounts numbering in the 100 MMs to billions and total accounts certainly in the billions for which there is no detailed public market share data.
Hell yeah!
msn-pecan 0.0.15 released
This release has many changes.
The most important is offline messaging support (read-only), but there are many, many bug-fixes thanks to the Adium guys that helped to track them down.
The diffstat is quite big:
70 files changed, 7603 insertions(+), 1023 deletions(-)
So there might be regressions, but the target is to fix most of nasty issues on 0.0.15. There will be a redesign on the code that handles the switchboards and notification servers, which basically means everything. Hopefully this will make it easier to track the bugs and squash them.
Also, one of the objectives is to have support for Empathy, which is going to be the official IM client for GNOME.
The rest of the issues would have to wait for 0.0.16.
Oh, there’s also translations and packagin for Debian, Gentoo, FreeBSD and a win32 installer
Special thanks to the Adium team, Evan Schoenberg, Devid Antonio Filoni, Eion Robb, Bernard Cafarelli, Henrik Friedrichsen, Marco de Moulin, Simo Mattila, Alexandre André, Jovan Turanjanin, Edgardo Fredz, and Erik Fredriksen. Sorry if I missed someone.
Download from the usual place at googe code.
Cheers.
