joyent/node — Issue #2583: Node 0.6.6 crash under Mac OSX
Author: 3rd-Eden
Created: 2012-01-20 20:23:58+00:00
State: open

```
Process: node [52633]
Path: /usr/local/bin/node
Identifier: node
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: sh [52632]

Date/Time: 2012-01-20 21:17:53.221 +0100
OS Version: Mac OS X 10.7.2 (11C74)
Report Version: 9

Interval Since Last Report: 92524 sec
Crashes Since Last Report: 2
Per-App Crashes Since Last Report: 1
Anonymous UUID: B943E82D-F654-4B5E-90C2-818DD901FDE3

Crashed Thread: 0

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/bin/node
Reason: image not found

Binary Images:
0x105618000 - 0x105ab0fff +node (??? - ???) <0DF64566-F167-34D4-B8E3-4322FC128B6E> /usr/local/bin/node
0x105cda000 - 0x105cedfff +libz.1.dylib (1.2.5 - compatibility 1.0.0) /opt/local/lib/libz.1.dylib
0x7fff65218000 - 0x7fff6524cac7 dyld (195.5 - ???) <4A6E2B28-C7A2-3528-ADB7-4076B9836041> /usr/lib/dyld
0x7fff8cc67000 - 0x7fff8cc67fff com.apple.Carbon (153 - 153) <895C2BF2-1666-3A59-A669-311B1F4F368B> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon

Model: iMac10,1, BootROM IM101.00CC.B00, 2 processors, Intel Core 2 Duo, 3.33 GHz, 8 GB, SMC 1.52f9
Graphics: ATI Radeon HD 4670, ATI Radeon HD 4670, PCIe, 256 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142353637334648302D4346382020
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142353637334648302D4346382020
Memory Module: BANK 0/DIMM1, 2 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142353637334648302D4346382020
Memory Module: BANK 1/DIMM1, 2 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142353637334648302D4346382020
AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x8F), Atheros 9280: 4.0.58.4-P2P
Bluetooth: Version 4.0.1f4, 2 service, 18 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Network Service: Wi-Fi 2, AirPort, en1
Serial ATA Device: Hitachi HDE721010SLA330, 1 TB
Serial ATA Device: OPTIARC DVD RW AD-5680H, 6,31 GB
USB Device: Built-in iSight, apple_vendor_id, 0x8502, 0x24400000 / 2
USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0x26500000 / 2
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x04500000 / 2
USB Device: BRCM2046 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x06100000 / 2
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8215, 0x06110000 / 5
```

I'm fairly sure that it was this script that got crashed:

```js
/**
* Convert Jade templates to regular Node.js. It automatically finds the correct
* template in the /views/jade/ folder, so only need to include the name to have
* it building.
*
* @example node transform.js client-ui.jade
* @api public
*/

var jade = require('jade')
, path = require('path')
, fs = require('fs')
, logger = new(require('devnull'))({ timestamp: false });

// for easy string fixes
require('sugar');

/**
* Configuration for the template file. This allows you to modify the output of
* the template without having to further touch the conversion code.
*
* Configuration.dir: Location of the Jade files
* Configuration.template: The output format for the jade template
* Configuration.jade: The Jade configuration, the client option is required
*
* @type {Object}
* @api private
*/

var configuration = {
dir: __dirname + '/'
, template: 'Spectator.Templates.{filename} = {content};'
, jade: {
client: true
, compileDebug: false
}
};

/**
* Make sure that all the required arguments are given, so it's easier to get
* started down the road.
*/

var file = process.argv.slice(2)[0];
if (!file) {
logger.error('Invalid arguments');
logger.error('node transform.js ');
process.exit(0);
}

/**
* Make sure it's a base name, and not a path.. This allows optional linking to
* the Jade folder for faster tab completion ;)
*/

file = path.basename(file);
var filename = file.replace(path.extname(file), '').underscore();

/**
* Make sure that the given template exists.
*/

if (!path.existsSync(configuration.dir + file)) {
logger.error(file + ' does not exist in the ' + configuration.dir + ' folder');
process.exit(0);
}

/**
* Read the given template file and convert it to a string so it can be send to
* the Jade.compile function, which generates a compiled template function.
*/

file = fs.readFileSync(configuration.dir + file, 'utf8');

// compile all the things
var compiled = jade.compile(file, configuration.jade).toString()
, content = configuration.template
// ensure proper stack traces on the client by renaming the function
.replace('{content}', compiled.replace('function anonymous', 'function ' + filename))
.replace('{filename}', filename);

// output the compiled string
console.log(content);
```

It is part of my build system that runs in the zsh shell using `while; do; make all; sleep 1; done;`