H-Bridge Transistor Smoking (Bipolar BJT Transistor)
Q1 and Q3 turn ON when you connect +5V to their resistors.
Q2 and Q4 turn OFF when you connect +12V to their resistors.

Connecting 5V to R2 or R4 will result in the transistor turning on.

So, if you connect 5V to R3 and less than 12V (or whatever the power supply voltage is) to R4, both transistors turn on creating a short circuit. 

If you want to turn off Q2 or Q4, connect their resistors to +12V.

If you want to control the transistors with 5V (a microcontroller or whatever) then you can add two more ttransistors that control Q2 and Q4, like this:


Connecting 5V to R6 will turn Q4 on, connecting 5V to R5 will turn Q2 on.