Blogger Actions: New Post Edit Posts Edit Template Edit Settings

Games and Holidays

I got in three 4-hour sessions (ie. about 12 hours) of Oblivion over the weekend (thanks to the kids staying with the grandparents). Mind you, I haven't played for weeks so it does balance out.

We go on holidays tomorrow. If all goes like it usually does I'll be getting in about 3-4 hours of gaming each day. A lack of power during the day (the place we stay at does not have mains power and the generator normally only runs at night) means I only get what my battery can give. I'll probably read a whole book too. I suppose I could go outside but that's not really my thing ;)

I want a new laptop

So I want a Pre (even more now that it's proving to be so hackable) but Apple's recent laptop update has got me wanting a new laptop too.

My MacBook Pro is a first gen and while it still performs the duties I ask of it without complaint I can't help but look in envy at the new machines.

First there's the new tech. Newer, more efficient CPU with 64-bit capability and VT instructions. The SD slot will come in more useful than the ExpressCard slot ever did.

Next is the battery life. Thanks to the LED backlight, new battery tech and more efficient parts these things get up to 8 hours of battery life.

The graphics are interesting. From what I can find, the 9400M GPU performs about on par with the X1600 I have now (possibly better since my first-gen machine uses an underclocked X1600). One of the reasons I could never consider moving to the MacBook was because of the drop in GPU performance that would bring. I've been enjoying playing games on my machine and while the X1600 isn't extraordinary, it's a world away from the Intel GPU performance the MacBooks were saddled with.

There is an option to get a 9600M GT on the 15" models but I can't really see the point when that model is $500 more than the model without the 9600M GT. The 9400M isn't going to be a downgrade and that's good enough for me.

Given my preferences, I'm actually faced with a choice I didn't expect to get from Apple. My target machine has a 2.53Ghz C2D CPU, 4GB RAM, 250GB HD and 9400M GPU. The choice I get is screen size. It's amazing the two product lines have merged this far. I guess that's why they're calling the 13" machine a MacBook Pro now.

So what does a 15" screen cost you these days? $300. Here's the thing though. Previously the MacBook had some advantages over the MacBook Pro (to offset the smaller screen). Battery life was better, wireless reception was better and the price was significantly lower. With the current lineup, the only advantages I can see to the 13" model are 0.5kg weight reduction and $300 cheaper. The downside is the that resolution drops. The physical screen being smaller isn't a problem, just the loss of pixels. It's not like the machine itself is significantly smaller, 2cm less depth and 4cm less width. I'm definitely leaning towards the 15" model.

Will this make a difference to me now? Probably not. Such a machine would be purchased primarily to take advantage of the new capabilities of Snow Leopard.

Labels: computers

Posted from Safari 4

So the final version of Safari 4 is out and it seems to be good. None of that "tabs on top" garbage. I had a few issues with plugins (InputManager "hacks") but then that happens with every major release. Thanks to the presence of the Safari 4 Beta, the plugins that had problems all had updated versions available.

I did have to drop Inquisitor in preference to Glims though since the former has not released an update supporting Safari 4. Glims has even better session restore functionality than Safari Stand does which leaves Safari Stand doing flash blocking only (ClickToFlash doesn't yet have a binary release supporting 10.4 but once it does I'll be able to use that and ditch Safari Stand).

The most important function of Glims (and before it Inquisitor) is to turn the "Google" box into a "Google AU" box. Glims also gives me favicons on tabs. It can do a heap of other things but I like to keep things simple.

Update 11 June 2009

So one of the things I've always liked about Safari was the progress meter in the URL bar. This is now gone although there is still _some_ indication of progress. The new Loading blob (with spinner and stop button) starts out dark grey and seems to become light grey once the page itself has been loaded. It seems like Safari now forces the page to render once the page has loaded and it then continues to re-render as additional elements (images, etc.) come in. For all I know Safari has acted like this before but with the loading blob colour change it becomes obvious that it is doing so.

I have a page that goes and fetches things from the body onload method and this action made the loading blob stay. I wouldn't be surprised if any running JavaScript (or perhaps only user-innitiated JavaScript) causes the loading blob to appear.

Labels: computers

AttnGrab SMS crash bug

Despite reports from users on a crash when receiving SMSes, I could not get this to happen to me and a review of the code didn't reveal any problems.

However a few days ago I got the exact symptoms that one user had complained about. That is, my phone beeped twice then rebooted and the cause of this reboot was an SMS being received. At first I thought perhaps the problem was due to some difference between Australian and US SMSes (the SMS that crashed my phone came from facebook) but by chance, I noticed something odd about my AttnGrab settings that led me to the actual problem.

The problem I noticed is that my seconds value was set to 0 instead of 300. Due to a bug in the SetAlarm code, this meant that AttnGrab would set an alarm for the current time, causing an alert loop. When I used atgdebug to simulate an alert, the phone did not crash but then AlarmTriggered() is run while another app has the stack (it's a pointer handler) so perhaps something about the state when an SMS is received didn't appreciate this alert loop.

So the first thing I fixed was to ensure that the alarm is only ever set for the future or cleared.

What puzzled me though was how my settings got changed in the first place. I stumbled on it almost by accident. The Ringer State checkbox does some processing when you click it. The first thing it does is save the state. However, when this happens the seconds field is emptied (but not redrawn). The field was supposed to be re-initialised but this didn't happen in certain cases. In these cases, pressing Done would save 0 for seconds. Clicking the field is what gave me the clue because when I did that it cleared itself. This has been fixed now so your seconds value should not get eaten by the Ringer State checkbox anymore.

If you've experienced crashes with AttnGrab please try the new version at http://ramsay.webhop.org/attngrab.

Update 10 June 2009

It seems this has not fixed the issue. There seems to be something fundamentally different going on with Centro devices because I'm just not seeing the reported symptoms. I just love coding blind... :(

Labels: programs

Cable Problems

Someone's wireless signal is getting into the local Telstra cable network and causing chaos. There's been connection issues in 3 suburbs for almost a month now. The technician that was at my house today reckons it's a cordless phone sitting next to a Foxtel box with a dodgy (unshielded) connector.

Hmm...

My wireless router sits next to my cable modem and whenever I try to surf the internet it seems that the cable goes down...

I think I'll move the modem away from the wireless router tonight.

Isaac about to lose the night time nappies?

Isaac has been toilet trained for ages now except at night. Despite what we thought were signs of readiness back in September he has proved consistently unable to handle himself at night.

That is until now. He got up yesterday and the day before that to do a wee (a first for him) so his nappy was actually dry when we got him up. I told him he had to go 6 days with a dry nappy before he could have undies on like a big boy. He seems quite determined to make it.

Update 10 April 2009

Nope. Must have been a lucky streak. He's back to wetting the bed again. He does want to get rid of the nappies, he's just not able to wake up before he does a wee at night. Oh well.

Labels: isaac

CodeWarrior vs GCC and sting literals

So one of my favourite Palm games is called Pocket Rogue. Finding the binary on the internets isn't too hard but the source code is another issue altogether. The source is something I've wanted to get access to ever since I got my Treo 650 because there are things the game could do better on this system (eg. high-res bitmaps, better support for the keyboard). I eventually stumbled onto the code one day a while back and re-did the work to make it build under PRC-Tools (I originally did this years ago when I had a Visor Edge).

So anyway, the app randomly crashed on me and I couldn't figure out why.

Thanks to my recent discovery of How to debug apps under POSE I now know the reason. It's because of this:

static char *pos = "\010\007\001\003\004\005\002\006\0";
...
pos[x] = pos[y];

That is, the 'pos' buffer is meant to be initialised to a particular value, is preserved across invocations of this function and may be modified (this 'may be' is why the crashes were random).

The Pocket Rogue source code is a CodeWarrior project so clearly this construct works with the CodeWarrior compiler but it fails in GCC because *foo ends up referring to data in the storage heap and modifying that without using DmSet causes a crash.

WTF?

Actually, it does make sense. You see "some string" is a literal string and modifying a literal string has undefined behaviour (according to the standards). A literal string should be considered a 'const char*' (or for C++ people, char const *). That is, you get a pointer to data that is constant. While some implementations/compilers happen to put string literals into memory that can be overwritten, this is not guaranteed. In the case of GCC for Palm OS, the pointer you get points to the string inside the binary, which of course resides in the data heap (or for NVFS devices, DBCache).

The correct way to initialise this is with code like this:

static char pos[10] = "\010\007\001\003\004\005\002\006\0";

What's the difference?

The bad version said "assign to this pointer the value of this string literal" which gives us an address to read-only memory. The updated version says "copy this string literal into this 10 byte character array" which means a memcpy is done behind the scenes.

I would guess that this is what CodeWarrior was doing implicitly.

Labels: computers

AttnGrab gets a debug log

The problem with trying to debug an app like AttnGrab is that it's really hard to actually use it properly unless you're running on a device bug on-device debugging facilities are basically nil. I tried once before to write a debug log facility for AttnGrab bug I failed miserably. It turns out my understanding of how to write to databases was way off and the recent 3.0 work showed me where I was going wrong.

So now AttnGrab has a debug log. The app itself just has a small routine for writing the debug. You turn the facility on and view the log from a companion app called ATGDebug.

I did all this to try and track down a bug reported by someone. While I haven't been able to track down their bug I did find 2 other bugs as a result of debug messages I inserted. Hooray.

Labels: programs

Using Qt Extended 4.4 with Qt 4.5

My last act as the Qt Extended build system maintainer was to make it possible to use Qt Extended 4.4 with Qt 4.5. I'm happy today to be sharing this work with the community. Perhaps it will enable Qt Extended to stay relevant for a while longer.

I've written up instructions and patches over here.

Enjoy!

Nokia 5800 on the way

So there's a Nokia 5800 on the way here but it's not for me.

This one is for Bree. She really wants it and since it seems like local phones won't be available without "comes with music" we went for an import model. With any luck it'll be here before the official launch.

I did noticed something rather sloppy about the stores selling this phone.

Most listed an incomplete or incorrect description. The phone may be quad-band GSM (which they got right) but it is also a 3G phone and the frequencies it uses are important (since there's 2 models and one works on Telstra/NextG while the other works on the other 3G networks). Most shops failed to mention this and one shop utterly failed to comprehend why I might want to know which model they had (though I think most shops have the "everyone else" version since NextG uses US frequencies and that phone is newer and hence more expensive).

The official phone package comes with an 8GB micro SD card. Most shops failed to mention this. Some even appeared to be removing the card so they could sell you one with the phone!

In the end I went with Mobicity because they actually seem to have a clue about what they are doing. They weren't the cheapest but their shipping was about half the price the other shops were charging so they weren't too far off the mark.

Anyway, Bree says I can play with this phone a bit so I'll definitely be trying out some Qt/S60 development on it.

Labels: 5800

Blogger Actions: New Post Edit Posts Edit Template Edit Settings