Oct 31

Bug hunting : malloc failed :-(

I’ve been tracking down an elusive bug which was causing one of my devices to occasionally start mis-behaving. The device would respond slowly (if at all) to some commands, and respond normally to others.

It was pretty obvious what the issue was when I attached the debugger and started single-stepping through the code while it was misbehaving.

I landed on the ‘return’ in this code:

prevLen = sizeof(LIST_ITEM)+32;
 pWorkItem = malloc(prevLen);
if(pWorkItem == 0)
 return 0;

so it was obvious I was getting a malloc fail, which meant I had ran out of memory somewhere along the line. The ‘return 0’ meant that the command silently failed, without any feedback to the user.

Continue reading

iOS 7 Tech Talks – Apple Developer


Guess who is not going to Apple’s Tech Talk in London this year?
Yip – I just got an email saying I wasn’t successful at getting a place this year. Places on these seminars are like hens teeth!

iOS 7 Tech Talks – Apple Developer.

Oct 25

Apples and Oranges

I Watched the Apple Keynote speech in which Tim Cook and others gushed about the latest devices and software to come from Cupertino.

There is new iPad Air, iPad Mini with retina display and, very interestingly, some more details about the new Mac Pro including for the first time, pricing. At over $3000 dollars, I don’t think I’ll be standing in line to buy one on launch day. If only….

Of course there is the release of the new Apple desktop operating system, called OS X Mavericks. I’ve been playing with Mavericks for a while, as I was lucky enough to be on the beta project, as well it being available to all registered Apple developers for a while too. Mavericks is good, but most of the big changes are under the hood. There is not much to read about the hidden changes on the Apple website, but the keynote speech (linked in the first paragraph, above) gives a few details, and the Keynote from the WWDC 2013 Developer’s conference gives a few details too.

On the surface there is some nice new touches, like iBooks and Maps updates, and better integration between apps, and of course better integration with iCloud. Simple things like ‘tags’ in the finder may not sound much, but it’s surprising how much they add to productivity. Best of all, the update to OS X Mavericks is completely free, just get it from the Mac App Store.

Speaking of ‘surfaces’ I see that Frank Shaw, VeeP Of Communications at Microsoft was none to impressed with Apple’s keynote speech. Of course not, he couldn’t see green cheese. You can read his somewhat missing the point Blog over here.

Anyway, best regards,


Oct 22

Update: Issues with ICD3 on Mac OS X

Just a brief update on the issue I had using ICD3 on Mac OS X.

Having removed all traces of Java 1.7 (aka JRE 7) from the Mac, the ICD3 still wouldn’t work.

I un-installed MPLAB X and re-installed it again and I’m happy to report that it is working again now.

Oct 21

Issues with ICD3 in Mac OS X

I’ve been using Microchip’s MPLAB X on Mac OS X for some time now, and really getting along nicely with it.

I use it for various projects and with a range of different hardware targets and programmers.

I’m using MPLAB X v1.90 with PicKIT2, PicKIT3 and ICD3 and until recently I’ve had little or no trouble.

Last week, however, I allowed the 2013-005 Java Software Update from Apple to install. This updated my VM from JRE 6 to JRE7 (aka Java version 1.7).

Everything seemed fine until I tried to program a device using my ICD3 debugger/programmer.

Continue reading