Infinite Loop on Pin Input (Teensy 3.1)?
Try using the internal Pullup/Pulldown resistor to control the input when the pin is not connected to anything.  If you do not have a pullup/pulldown, then the input capacitance on the input pin circuitry can sample and hold the 5V unreliably.

...
void setup() {                
  // Outputting for error checking
  Serial.begin(38400);

  // Readying the pin for input
  pinMode(signal_receiving_pin, INPUT_PULLDOWN);
}
...


You may want to uncomment the delay() or add some state logic trigger only one activation per each cycle of signal_receiving_pin