Neither one is probably broken, but I'd say the 7812 is going into thermal shutdown first, since it is dissapating the most wattage.
the 78xx family of regulators have a thermal shutdown, so they turn themselves off before they melt.
I have the same thing, a 7812 being fed from a +24VDC supply, supplying 320mA (.32A) max (16 4-20mA circuits). I use a 3 watt resistor to pull some of the heat out of the 7812 regulator. The resistor gets too hot to touch, but it runs nonstop.
To calculate the resistor value, set the regulator input to a minimum of 16v at 400mA. 24v - 16v = 8v. 8v/.4mA = 20 ohms.
I*I*r = .4 * .4 * 20 = 3.2W, so use 2 10 ohm 3W resistors in series. You can work the formula backwards if you want to pull out half the heat... 1.6W/(.4A*.4A) = 10 ohm, or use a 10 ohm 3W resistor to pull half the heat out of the regulator.
You can figure out if the regulator is going into thermal shutdown by it's dissipation. What is the part number of the heatsink you are using, and I am assuming you are using the regulator in a TO220 package? The TO220 has a thermal resistance junction to case of 5°C/W, so with 3.6W the max case temp would be 107°C, so at 30°C ambient, you would need a heatsink with a thermal resistance less than 21°C/W.
In air, the TO220 has a thermal resistance to air of 65°C/W, which means the highest temperature you can dissipate 3.6W without a heatsink is -109°C ambient, or the most power you can dissipate at 30°C would be 1.46W.
View attachment 69260