communication between 2 arduino crash when external power supply is plugged
Note: this answer is based on the comments above.

Possibly the cause of the problem is:
* Long I2C cable length, combined with
* Different power supplies causing current to flow in the ground wire of the cable, causing noise on the I2C lines.

The solution that worked was to reduce the I2C bus speed. It is usually 100kHz but one can reduce it to 10kHz by making the following code changes (taken from http://arduino.cc/forum/index.php/topic,12518.0.html)

Modify hardware/libraries/Wire/utility/twi.h:

Old: 

#ifndef TWI_FREQ
#define TWI_FREQ 100000L
#endif


New:

#ifndef TWI_FREQ
#define TWI_FREQ 10000L  /* 10kHz */
#define PRESCALER_10KHZ 4
#endif


Modify hardware/libraries/Wire/utility/twi.c

Old:

cbi(TWSR, TWPS0);
cbi(TWSR, TWPS1);

TWBR = ((CPU_FREQ / TWI_FREQ) - 16) / 2;


New:

/* Select 4 as the prescaler value - see page 239 of the data sheet */
cbi(TWSR, TWPS1);
sbi(TWSR, TWPS0);

TWBR = ((CPU_FREQ / TWI_FREQ) - 16) / 2 / PRESCALER_10KHZ;
/*
  The documentation in twi.c is assuming a prescaler value of 1.  
  The actual equation (data sheet page 218) is 
  SCL Frequency = CPU Clock Frequency / (16 + (2 * TWBR * prescaler))
  For a rate of 10kHz with a clock speed of 16MHz, TWBR is 198.
*/


This post (http://arduino.cc/forum/index.php/topic,16793.0.html) also advises that ".. you also have to the delete the files: 


hardware/libraries/Wire/Wire.o 
hardware/libraries/Wire/utility/twi.o"


to make sure the changes are recompiled.