Thursday, 25 August 2011

fixing random EXC_BAD_ACCESS with SMC/PRAM resets.

a while after I got this Mac from work, I started getting plagued with all manner of crashes. they mostly seemed to be caused by (what seemed to be) really strange low-level issues, suggested by messages warning of EXC_BAD_ACCESS, and either SIGBUS or SIGSEGV. an example crash is below, from System Preferences of all things! I have only included the first part, for brevity.

Process:         System Preferences [83284]
Path:            /Users/USER/Desktop/System Preferences.app/Contents/MacOS/System Preferences
Identifier:      com.apple.systempreferences
Version:         11.0 (11.0)
Build Info:      SystemPrefsApp-211000000000000~1
Code Type:       X86 (Native)
Parent Process:  launchd [208]

Date/Time:       2011-08-17 00:01:09.361 +0100
OS Version:      Mac OS X 10.7 (11A511)
Report Version:  9

Anonymous UUID:  5B3D93D7-29CB-4BE8-8762-265108DC7684

Crashed Thread:  4  Dispatch queue: com.apple.root.default-priority

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000d0000020

the problems even persisted after my Lion upgrade. it was starting to get extremely annoying, as I was losing work and context. I tried changing the RAM, uninstalling and reinstalling as many of the offending apps as possible, all sorts. I was absolutely loath to reinstall the entire machine, as I am sure many people are, when someone at work mentioned resetting the SMC and PRAM.

being a Mac newbie, I had no idea what these were, but this tip really did the trick. so if you are experiencing random EXC_BAD_ACCESS issues affecting just about every application on your Mac, give the above resets a try.

Monday, 15 August 2011

Mac App Store mysteriously not updating…

recently, the App Store suddenly stopped letting me update existing apps to a newer version, and stopped allowing me to install any new software whatsoever. no crash was occurring, and the program wouldn’t hang, but a progress spinner would appear in the title bar and simply stay there.

switching away from the Updates section would make the spinner go away, so apparently nothing was really happening. after a lot of messing around, including clearing out caches and preferences, and even contacting the (ultimately unhelpful) Apple support, I finally poked around in Console and saw some logged messages:

2011-08-12 17:02:27.839 App Store: ### Error trying to unarchive data. *** file inconsistency: read 'q', expecting 'i'
2011-08-12 17:02:29.504 App Store: ### Error trying to unarchive data. *** file inconsistency: read 'q', expecting 'i'
2011-08-12 17:02:32.287 App Store: *** file inconsistency: read 'q', expecting 'i'
2011-08-12 17:02:32.289 App Store: (
	0   CoreFoundation      0x9210ee77 __raiseError + 231
	1   libobjc.A.dylib     0x92d54149 objc_exception_throw + 155
	2   CoreFoundation      0x92076e89 +[NSException raise:format:arguments:] + 137
	3   CoreFoundation      0x92076df9 +[NSException raise:format:] + 57
	4   Foundation          0x959f14f8 checkExpected + 294
	5   Foundation          0x959f2004 -[NSUnarchiver decodeValueOfObjCType:at:] + 55
	6   CommerceKit         0x0009d377 -[ISAccount initWithCoder:] + 635
	7   Foundation          0x959f1635 _decodeObject_old + 309
	8   Foundation          0x959f24cd _decodeValueOfObjCType + 1125
	9   Foundation          0x959f2013 -[NSUnarchiver decodeValueOfObjCType:at:] + 70
	10  Foundation          0x959f1ca8 -[NSArray(NSArray) initWithCoder:] + 382
	11  Foundation          0x959f1635 _decodeObject_old + 309
	12  Foundation          0x959f09fd +[NSUnarchiver unarchiveObjectWithData:] + 89
	13  CommerceKit         0x00072963 SSGetUnarchivedValueForKey + 122
	14  CommerceKit         0x0009f99d -[ISAccountStore _accountsChangedNotification:] + 56
	15  Foundation          0x959f8470 __-[NSDistributedNotificationCenter addObserver:selector:name:object:suspensionBehavior:]_block_invoke_1 + 49
	16  CoreFoundation      0x920599c0 ____CFXNotificationPostToken_block_invoke_1 + 352
	17  CoreFoundation      0x92027830 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
	18  CoreFoundation      0x91fdacb1 __CFRunLoopDoBlocks + 337
	19  CoreFoundation      0x920059c8 __CFRunLoopRun + 1096
	20  CoreFoundation      0x920051ec CFRunLoopRunSpecific + 332
	21  CoreFoundation      0x92005098 CFRunLoopRunInMode + 120
	22  HIToolbox           0x9086b487 RunCurrentEventLoopInMode + 318
	23  HIToolbox           0x90872cee ReceiveNextEventCommon + 168
	24  HIToolbox           0x90872c32 BlockUntilNextEventMatchingListInMode + 88
	25  AppKit              0x97da08ec _DPSNextEvent + 678
	26  AppKit              0x97da0159 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
	27  AppKit              0x97d9c4cb -[NSApplication run] + 904
	28  AppKit              0x9802fb54 NSApplicationMain + 1054
	29  App Store           0x000215d1 App Store + 5585
)

a little research on the file inconsistency error message, and confirmed by the stack trace, showed that the message was coming from NSUnarchiver, and was usually related to a 64-bit app trying to unpack 32-bit data, or something along those lines anyway.

it is at that point that I realised I had used XSlimmer on the Mac recently, and, while everything else had been fine, I must have stripped the 32-bit code from the App Store. restoring from backup made everything work again. I reported the problem to the XSlimmer blacklist, so hopefully this won’t affect many other people.

but I suppose the moral of the story is either that you shouldn’t waste time screwing around with “efficiency” apps, or that you should actually look at the logs once in a while when you have a problem!

Sunday, 3 July 2011

an anti-recommendation.

a demonstration of not only the farce of LinkedIn recommendations, but also the sickening insincerity of my idiotic previous manager.

“It was a pleasure to work with Andrew, he is a very dedicated IT professional and is committed to the delivery high quality work all the time. He has an excellent technical expertise that helps him deliver projects that have value to the business units.” — Recommendation from Xavier Romanet to Andrew Lindsay, Nov 16 2010

I just love the term “business units.” it evokes images of a gaggling cacophony of soulless, suited automatons, warbling corporate platitudes at the office house plants. but I digress. poking around, I then find:

“It was a pleasure to work with Xavier, he is a very dedicated IT professional and is committed to the delivery high quality work all the time. He has a good balance of technical expertise and business awareness that helps him deliver projects that have value to the business units.” — Recommendation from Stephen M. to Xavier Romanet, Jul 31 2010

meep meep, bzzt crackle, recommendation-generation business-unit adjunct alpha 3 activated.

I implore anyone who stumbles across this post, googling Xavier for recruitment purposes, to exercise great caution in hiring him. his inauthenticity extends to his professional work. he drove the entire project into the ground upon joining, by forcing surviving developers, who had already been paid irregularly and made to do vicious amounts of irrelevant busy-work, to do even more overtime for abstract and irrelevant business-imposed deadlines that, ultimately, had zero market effect whatsoever.

we, as engineers, have come to expect stupidity from the “business units,” but we expect our technical management to grow a pair (of tits or of balls, as appropriate for your sexual identity) and fight our case.

I mean, for fuck’s sake, he even reproduced the grammatical error in the above recommendation!

Sunday, 19 June 2011

cyanide and plagiarism.

why is the weakly funny Cyanide & Happiness so popular? maybe because it “borrows” and ruins ideas from the truly excellent Perry Bible Fellowship.

Exhibit A:


Exhibit B:


Exhibit C:


too close for comfort, and too poorly credited not to call it plagiarism.


Wednesday, 18 May 2011

kind of switch, or how I learned to put up with a Mac.

so, having recently got a MacBook Pro from work, I thought I would do as countless others have and write about my experience. however, in the general spirit of this blog, whose raison d’être is to provide that information I found difficult to simply Google, I have limited this post to what I installed to tone down OS X’s “bubbly” personality and streamline my workflow.

this list is not exhaustive. I would welcome any further suggestions to improve my OS X life.


things I changed.

RightZoom: I really don’t understand the reasoning behind the default + button behaviour. install this to turn it into a Maximize/Restore button.

Dock unfucking: everything is run via Spotlight (Cmd+Space) for me. so I unpin everything from the dock, and use it to track what is actually open, which also saves me a load of clutter in the menu bar up above. I also turn off the over-cute magnification, and force applications to minimize into their dock icon, because the little dock previews are generally useless and Exposé does a much better job.

Remove useless menu bar icons: you can get rid of these by Cmd-dragging them off the menu bar. after a while, it all gets too much and starts obscuring your real menus, which is pure shit. use the dock for open apps; that is what it is for.

Keyboard shortcut for opening Finder: sorry, it doesn’t seem to exist. use Cmd+Opt+Space to cheat.

Google Chrome: install AdBlock, keyboard navigation, set up your search engine keywords, and the three-finger down Exposé style tab switching, and you have a far more efficacious experience than Safari.

Growl: unifies all your notifications and almost everything supports it. without this, you get everyone’s idiosyncratic notification UI polluting your desktop, and no centralized control.

The Unarchiver: unpack everything ever. that is all.

Twitter: the latest version lets you set a global hotkey for tweeting. I bound mine to Ctrl+Cmd+Opt+N.

QuickCursor: opens the contents of any edit field in your favourite editor with Ctrl+Cmd+Opt+Enter. I use MacVim, reserving Aquamacs for Lisp stuff.

Terminal: for the love of God, make the Pro theme default, unless you want your favourite ncurses apps to look like total shit, and any colorized command-line output to be nigh-on unreadable.

unDock: if you are on a laptop, this is essential for when you need to close the laptop and move, but you have a lot of peripherals and external drives connected. plays well with Time Machine.

Perian: install. play every movie format ever through QuickTime. easy peasy.

Macfusion: I use this to mount remote SSH drives as local volumes. really essential for working with remote servers.

Tuxera (payware): if you ever have to connect external drives that use NTFS, you need this.

VMWare Fusion (payware): this is really the best way to run Windows apps on Mac. I tried using Wine to run MyLife Organized, my task manager of choice, and it was painful and really a poor experience. the Unity feature in VMWare Fusion makes Windows apps look integrated into the rest of the environment, which is something that they should roll out to every OS ever.

it’s kind of expensive, though, if you are on a budget. get work to buy you a licence.

Fluid: lets you create “real” apps based on web apps, which has the benefit of reducing the zillions of tabs stuffed into one browser window, visibility in the dock, and separate controllability of sessions. I used this for my internet banking, Google Docs, and Google Reader.

Transmission: best ever torrent client. just get it.

TinkerTool: lots of stuff to mess around with here. use with case. I turn off the irritating quarantine warnings for downloaded files.

Google Contact sync: you can sync Address Book with Google Contacts, if you go to Address Book preferences. how do you force a sync though? click the sync icon in the menu bar, and do Sync Now. great for Android users.

Xcode: install this or you will be able to compile approximately nothing without a load of headache. cheapest from the App Store.

Terminal keyboard shortcuts: not so much a change, but a bunch of tips. Cmd+Shift+Double Click will open a URL in Terminal. Fn+Shift+Up/Down will scroll up and down when you are screened. useful for IRC.

gfxCardStatus: tells you whether your MBP is using the integrated graphics or discrete graphics. but more importantly, allows you to force integrated on battery and discrete on power.

GPGTools: makes using GPG less painful by integrating nicely with Mac OS X, offering a reasonable GUI for key signing and retrieval. you might need to forcibly reinstall GPGServices to get the integration just right.

iA Writer: best app ever for writing without frills, especially with the Focus Mode. this has replaced my text editor for general thought dumpage.

Reeder: awesome app for reading Google Reader. things like this convince me that browser-based apps are total shit, and what we really want is integration with online services.

Gitbox: after messing around, I settled on this for a Git GUI. it has a clean interface and good integration with diff tools like Kaleidoscope. it also has nice features like automatically checking the remotes for changes. some people swear by Tower for Git, but I found it a complete eyesore.

Unison: a pretty decent NNTP client. can be a bit messy, but you should see the alternatives.

Google Precipitate: integrates Google Docs with Spotlight.

Soulver: a really nice line-by-line calculator with a dataflow update model (so like a spreadsheet, basically), some unit support and nice percentage handling. I no longer load up the beastly Excel for simple calculations.

Tea Time Widget: a pleasant widget for those arbitrary timer moments.

Loremify Widget: generates Lorem Ipsum text. has a nice button mouse-over thing that lets you pick the amount of text you want, and can do HTML.

Currency Converter Widget: guess.

Mighty Monitor Widget: checks the battery status of whatever Apple Bluetooth devices you use with your Mac.

things I wish I could change.

Scrollbar buttons: they seem pretty pointless, given the multitouch scroll. can I thin the scrollbar and remove the buttons? even better, can I hide the scrollbar except when I’m scrolling?

Closing applications: I just hate that closing the last window on certain non-document-oriented apps doesn’t close the app. why is that?

Cloud Time Machine: I quite like Time Machine. but is there a way to have it backup to a remote service without replacing it altogether? Dolly Drive seems like one way to do this, but I can’t see myself subscribing brashly.

Resource forking: the .DS_Store and __MACOSX or whatever it is folders are just as detestable as Thumbs.db was on Windows. how do I globally disable it, and remove it wherever it is still hanging around?


if you feel like you have developed some idea of my tastes, then I welcome any further suggestions that match.


Sunday, 3 January 2010

Fixed my broken Jack LaLanne Power Juicer!

So I recently bought a second-hand Jack LaLanne Power Juicer on eBay, in an effort to get more fruit and veg into my diet. It is an incredible machine, very quiet and can juice pretty much anything. So, as you might imagine, I was juicing everything I could get my hands on.

My beloved Jack LaLanne Power Juicer

Until recently, when it mysteriously stopped working after being washed by my partner. The damn thing simply stopped turning on, as if the motor was busted. I tried changing the fuse, refitting all the units, cheating the safety switch, you name it. You have never experienced withdrawal symptoms like going cold turkey on fresh juice.

Fortunately, after feelings of nostalgia triggered by a video of lighters in a blender, I finally found someone with the exact same problem on FixYa.

Turns out that if you remove the pulp cup incorrectly, a bit of plastic breaks off that triggers a VERY hard-to-see safety switch! I fixed it with a toothpick temporarily, and then promptly juiced every fruit I could find in the house and guzzled it.

Just wait ’til I hit the fruit market tomorrow.

Sunday, 13 December 2009

Corrupted nVidia driver download problem

So, another strange problem when installing Windows 7 on my partner’s laptop. Every time I downloaded the nVidia drivers, either from the official site or from laptopvideo2go.com, unpacking them yielded an error saying either Non 7-zip archive. or 7-Zip: Data error.

I tried unpacking the archives manually with 7-Zip, and each time a different set of files would fail CRC inside the archive! So, something is probably going wrong with nVidia’s servers, since other things seemed to be downloading fine.

Forum searching yielded that people just kept retrying the download and eventually it worked. I did this, to no avail. Then I shamefully caved in to superstition and tried downloading with IE (where I had previously used Firefox), and it then worked.

I'm not sure whether I just got lucky with the continual re-downloading, or whether using IE had something to do with it.