[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

Computer Trouble

Filed under: General — Thomas @ 18:26

2004-11-26
18:26

Computers and I have not had much love for each other the last two weeks. Last week our office server's hard disk crashed badly. All sorts of sectors lost, and so on. Luckily I had backups of what mattered. Which reminds me, need to prod some employees to mirror the backups. The hard disk was broken so badly that during attempts at getting data off of it, which was very slow by itself already, after some time the kernel code completely gave up on the drive and it wouldn't even mount it anymore.

The easy solution was to buy a gizmo that seems to be all the rage these days: an IDE-to-USB kit that costs only about 25 euros. You put your drive in it, connect it, then attach it through USB, and presto. It's not quite perfect yet: you still need a power adapter for the external drive to work, and you still need to screw the damn thing open. I'd prefer having had some slide-in solution or whatever. Anyway, this is great news for all my old harddisks lying at home collecting dust.

Of course, it would have been nice if the manual had said that the drive needs to be set to master for it to work. But after fixing that, FC3 just automounts all the partitions when I plug in. Which would have been great except for the crappy partition labels that FC always assigns, but I'll save that pet peeve for another day.

Meanwhile at home, while working on the newish home machine, I went for a drink and when I got back, both that machine and the home server had switched off. A short power outage is very regular here in Spain (I should buy a UPS). Only this time the work computer didn't want to start anymore. Started cursing, dismantling the machine, switching to a different power supply, reseating cards, trying a whole bunch of stuff. With a quickly sinking feeling, I spent two hours trying things until I gave up, packed motherboard and processor into a box and started going through my Spanish dictionary to arm myself in the fight with the technician.

Next morning, go to the store, hand in the motherboard, look at the guy trying to find the problem (there's always this small window of time where there's a possibility you'll end up a total loser because the technician manages to get it running or finds obvious signs of maltreatment on the equipment, causing you stress). See him give up after twenty minutes as well, and he replaces the motherboard for me after showing that it works.

At night, come back home, try to put in the motherboard and notice that the riser bits for the motherboard screws to be screwed into were of course left behind attached to the old broken motherboard. And all the risers I scrapped from other machines were all too high. And of course I remember having a whole cup of crap like this at my old place before moving to Spain. *sigh*.

Anyway, some filing, scrapping, and cheating later, my machine was sort-of-working again. Overheating slightly, but it runs.

As for the softer side, I spent a big chunk of yesterday evening fighting with our applet's ant build. I finally realized that behind my back it was actually using gcj to compile in cases where I wanted to try the Sun compiler. The problem we had with gcj and jikes was that the applet compiled nicely, but didn't actually run on Internet Explorer because it complained
about missing sun.audio methods. I tried to get the build to give me reproducable end-user errors, before trying to tackle
the actual problem.

The actual problem was not that hard after all. You see, Wim had written a stubs directory containing "fake" sun.audio classes, with the methods in it that he uses. I was under the impression that this was a standard trick being used by Java people, since Wim is a respected Java hacker, and that I could trust that part to be correct. But thinking it through and thinking about what I learnt up to now about Java from all of my painful debugging, it was actually possible that the class and method signatures were not entirely correct. And Java looks up methods by looking at the full signature.

So in a nutshell, a signature that you infer from a use of the method in a program can of course be different from the actual signature of that method. Or, different signatures still allow the Java applet to compile. So after luring Wim into decompiling the sun.audio class files, we extracted the correct "fake" implementation, and after that it Just Worked. So the applet now compiles with both Jikes and GCJ and runs on the old 1.1 Java implementation in Internet Explorer.

Of course, Johan brought down our good mood the next morning by showing us the source code for Java that he downloaded from somewhere which obviously contains the correct signatures as well...

Odds and Ends

Filed under: General — Thomas @ 21:15

2004-11-22
21:15

Seems I only make time for roundup posts these days. Need to fix that. Anyway, on with the show.

Ubuntu
My violent love affair is now on hiatus. Last weekend I noticed that my music share, which has UTF-8 file naming, didn't get picked up correctly by Ubuntu. Well, at first I thought something terrible had gone wrong, but luckily it was "just" Ubuntu. After trying to debug and fix it for a few hours with the help of some people, I realized a few things:

  • I don't think that the text console can actually DO UTF-8 correctly. (IIRC this is because of the lack of console font size). This means, I could not enter or see a bunch of UTF-8 characters at the same time, and the console got wonky when they were there in files and stuff.
  • I couldn't figure out how to do this properly in Debian for the graphical desktop either (note to debheads: no, reconfiguring locale and chosing only utf-8 and setting that to default and rebooting didn't work)
  • I have no idea how this works in the underlying parts. All those tools and layers implementing utf-8 for me are alien to me.
  • I don't ever want to go back to a distro that doesn't have full UTF-8 support out of the box.

I'm sure I'll revisit Ubuntu often enough, and follow everything, and I hope someone helps me figure this one silly thing out, but for now our little casa has switched back to Fedora Core 3.

Whilst on the
subject ... There is *some* progress on the Extras front. At the same time, there is an incredibly painful situation developing. It was decided that fedora.us would not get updated for FC3 for now, pending a Fedora Extras launch. While this would be a *great* idea if it meant that Extras would launch, say, this week, nobody realistically knows when it's going to launch. Meanwhile users are dropping fedora.us in droves. I just hope Fedora Extras is not the nail in the coffin of decent packaging...

Kernel module packaging
I'm happy with what I have for this - it was a snap getting all my kernel modules updated for FC3. Each time I update packages, I also look at some new functionality. For the webcam modules, I installed the user-space header, and now I can work on some functionality in say, GStreamer. At work we bought the Logitech Sphere webcam which has motor controls. Now I have a gst-launch pwcsrc ! xvimagesink, and if I press left or right the camera rotates :) Soon in a CVS near you.

Java stuff
Had some pains trying to figure out how to build our java applet nicely using only free tools. The stuff available for FC is confusing. It doesn't help that there is no good "getting started" documentation. It also doesn't help that stuff that is in FC2 is not available in FC3 (like, say, ant). And the whole GNU classpath confusion is confusing too.

Anyways, with some help from Tom Tromey (much appreciated) I made some headway and I could finally compile the applet correctly. After that, I started fixing up methods that are not in Java 1.1 to make the applet work again on Explorer. So I made my first steps into the Java programming world. Don't worry, just visiting, not staying long.

Grand Theft Auto
How sad am I ? I bought GTA San Andreas 3 weeks ago, and I think I have logged about 2 hours of play time in total, if it is that much.

Tango
Kristien and I are taking tango classes with some Argentinan guy. The first two classes were private, and apart from the occasional misunderstanding (I only realised that his ¨sjo" is our "yo" or "I" after the twentieth time he said it) that went great. But in his public class I feel like a complete beginner. He has me dancing with everyone else in the class, including the men. And he has me doing the women steps. Which is quite interesting, but makes me start from scratch. Anyway, I hope Kristien holds on for this bumpy ride so we can get somewhere...

GStreamer
One week forced stop due to freedesktop being cracked. Need to pick up slack tomorrow and do a final prerelease...

Libcolorspace
Wim finally extracted his latest working copy of his colorspace conversion library. It's looking good, structure-wise. Took a look at python bindings for it. Hope to have it released soon so I can use it in my own new pet project and in Flumotion's wizard to do device previewing.

More updates later, after dinner.

Randomities

Filed under: General — Thomas @ 19:17

2004-11-13
19:17

Some filler content.

Wedding pictures from my best friend's wedding two weeks ago.

I look sharp
.

My friend Ward living in Boston should have started as an FSF sysadmin by now. Go Ward ! I should check up on how he's doing.

Had the in-laws over for the last three days. I didn't get to spend that much time with them since I was working, but that's ok - Kristien had a good share of activity with them :)

Wim en Christian are on a business mission and they ran into some familiar hackers while they were there. Well, they probably weren't there for the nice weather.

Hacking

While getting fed up over the week again with the state of device probing in general and in GStreamer, I started thinking about what I could do about it. Wim and I had discussed some ideas with David Zeuthen at the last GUADEC, and I wanted to start doing something in that direction that we could use as well.

The first task was writing a header parser to figure out the values of macros from videodev.h, which is trickier than it seems.
In general macros can expand to strings, ints, function calls, function calls with values already filled in, ...
Johan used Linus's sparse and hacked a bit on that code to get what we wanted, while I used a brute-force approach of trying to compile a set of apps where a define is printf'd with a list of formats, one by one. The first program to compile with -Wall and -Werror and return a result on execution is the winner.

We were done at about the same time (though I managed to delete my program on the first try by running

python defines.py /usr/include/linux/videodev.h > defines.py

, pretty stupid), but Johan's was obviously faster and less hacky.

After that, I started writing object wrappers for the structs, and expanding and cleaning up the API as I went. This will be a nice debugging tool in general, and I hope to also be able to use it in Flumotion to give you a snapshot image of the device
based on the current settings.

I'm also thinking of writing a collection of "fake" kernel modules that implement API's like this. And maybe even fake modules that implement the exact same functionality as a set of webcams, so they can be used for GStreamer plugins regression tests and the like.

I also looked at wrapping the pwc-specific stuff. While doing so I noticed that the pwc driver actually supports the Logitech Spire, which is a webcam mounted on a spire and can be controlled to rotate and climb automatically.

Bikes

Finally figured out if it is ok to ride with no lights on your bike at night. I got stopped by a police car telling me to "respect the traffic light" because I ran the red light. But that was their only quibble.

Flumotion hacking spree

Filed under: Fluendo — Thomas @ 01:47

2004-11-10
01:47

So we had some silly bugs in our 0.1.2 release that should have been easy fixes. And to some extent they were. But fixing the easy bits revealed a whole slew of other things that left me unsatisfied. So I dug deeper and deeper, at each step in the way thinking "It's just five more minutes and then it will be perfect". I ended up staying at work until half past midnight. Luckily the big guy stayed with me all the time offering moral support, or I would have gone home earlier.

I added a ton of debugging and error handling, making sure we handle a whole bunch of potential problems correctly. Now you should get a dialog for pretty much everything that can go wrong.

I need to rethink how we test the server, because obviously just trying random things is not going to work. Especially if it's the developer doing the random testing, because everyone knows as a developer you only test the things you know will work.

Anyway, after five hours of spare time hacking I'm pretty happy with the result, so tomorrow we do a release after some extensive testing. And then I think long and hard on how to fix some of the process since that's what I'm supposed to be doing.

Fedora Core 3

Filed under: Fedora,Hacking — Thomas @ 13:30

2004-11-08
13:30

I got a patch from a nice fellow fixing some issues with FC3 (apparently su can now be interactive at any time - the "solution" is a binary called "runuser" that, surprise, behaves exactly like su used to behave. Something tells me making "newsu" was a better solution, but hey. If someone feels like it, please direct me to an explanation of the why and how of this change. Colin tried to explain it to me but there was some cabal knowledge involved that I was not privy to so I failed to grasp the change).

Anyway, the patch also adds yum support. The patch itself is a bit dirty since yax only hacked it enough so he could make it work for himself. But it was the spark that prompted me to revisit mach a little. So a new release is on its way.

Fedora Core 3 itself is pretty nice. Upgrading your distro is like moving into a new apartment though - no lights, no water, no electricity, and you have to bootstrap your way in again. Themes were screwed up, modules need to be rebuilt, and so on.

So I'm going through the motions, tackling item by item. Progress report at the fedora 3 build dir.

GStreamer goodness

I tried totem in FC3 on our streams, and they Just Work. Arguably, the error message when the sound device was blocked was pretty useless, so an upgrade should be done soon. But the streams play back nicely !

Got a poke on IRC yesterday as well:


<someguy_home> dude?
<someguy_home> after not trying it for ~a year, I just wanted to say that nautilus media player rocks
<someguy_home> that is all.
* someguy_home has been using the scanning function to go through a bunch of unknown ogg files
* someguy_home is looking forward to the brave new world of gstreamer goodness

I guess that's why one likes hacking. Even though nautilus-media needs some revisiting, especially now that Bonobo seems to be removed from nautilus.

Next Page »
picture