Bootloader burn fails. Segmentation fault

PLEASE HELP!
this is driving me nuts.
I managed to get the arduino FTDI bitbang ISP programmer working over osx (i'll write a tutorial latter), I was able to successfully burn the diecimila bootloader into an Atmega 168 some time ago but now I bought some blank Atmega168 but I cant burn the boot loader.
The FTDI works fine, as well as avrdude. I'm able to change the fuse settings but when I try to burn the bootloader i get this:

roy-macdonalds-mac-pro:~ roy$ avrdude -c diecimila -P /dev/tty.usbserial-A4000TEB -p m168 -U flash:w:/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_ng.hex
avrdude: BitBang OK 
avrdude: pin assign miso 3 sck 5 mosi 6 reset 7
avrdude: drain OK 

 ft245r:  bitclk 230400 -> ft baud 115200
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9406
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
 ft245r:  bitclk 230400 -> ft baud 115200
avrdude: reading input file "/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_ng.hex"
avrdude: input file /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_ng.hex auto detected as Intel Hex
avrdude: writing flash (16038 bytes):

Writing | ##########                                         | 19% 1.72sSegmentation fault

The strange thing is that segmentation fault occurs at a random percentage that can span from 0% to 60%. It has never gone beyond 60%.

What is causing this Segmentation fault?
fuse settings are:
lock : 0x3F
efuse: 0x00
hfuse: 0xDD
lfuse: 0xFF

PLEASE HELP!

What is causing this Segmentation fault?

I would say it is bad chip.

What's the version of avrdude you were using?

It looks like this could be some kind of software issue. I have been using the bitbang method for burning bootloaders for quite a while now and have seen such error messages but not segment faults.

I pseudo solved it.
I was doing this on mi MacPro with OSX 10.5.8 and avrdude 5.3.1 and 5.10
but I grabbed my macbookpro with OSX 10.5.8 and avrdude 5.10 and at the seccond attempt it worked, yet the verification process threw a segmentation fault. I asume it went ok because im able to write to the arduino with the arduino IDE.
I did this process before in mi macpro with no problems at all. This weird problem arose just now.
I used 3 different brand new blank chips. all of them gave me the same error.
The weird thing is the randomness of the fault.
any ideas?

Well, the system I use is Ubuntu 10.04 64 bit and prior to that I used Ubuntu 9.10 64 bit and this might be a problem unique to OS X, but I am not sure. Googling it (avrdude segmentation fault - Google Search) seems to get many hits which could suggest there's some issue with AVR dude...

I'm having the same problem!!! I have absolutely no clue why it doesn't work!!!

I DID get this error sometimes though...

2010-09-11 16:07:46.869 avrdude[18280:2003] In '__CFRunLoopLock', file /SourceCache/CF/CF-550.29/RunLoop.subproj/CFRunLoop.c, line 438, during lock, spin lock 0x7fff85236ce1 has value 0x97c3521d, which is neither locked nor unlocked.  The memory has been smashed.
Bus error