Same problem here (27" iMac late 2012 crashing) as everyone In this thread. I took mine into the local Apple "Mac Man" store for service and was charged $79.13 for some extended diagnostics and an overnight stress test. No crashing issues could be replicated so I was sent home. Thought it might be software issue but they were unsure. This was on 12/7/15. For three weeks no issues arose while using only safari and nothing else. On 1/1/16 the problems returned. I've kept a precise log of what's occurred thus far:
1-1-16 1:45pm... iPad connected DIRECTLY to rear USB port (using Apple cord) in rear of machine to perform iTunes backup. Backup completed successfully and iPad ejected properly. A second different iPad connected. At this point the iMac immediately crashed (powered off).
1:55pm after removing the cord, iMac powered on. Upon log in, computer crashed again. Decided to wait a couple hours before attempting power on again.
3:40pm iMac powered on. This time log in successful and computer functioning with Safari. Did not attempt to connect second iPad again.
6:20pm iPhone connected for iTunes back-up and update. During update, iMac crashes & powers off.
6:55pm iMac powered on. Upon log in crashes again.
7:25pm iMac powered on. Log in successful and computer remains on. Did not attempt to connect iPhone again.
1-2-16 safari & photoshop used to edit 3-4 jpeg photos. No issues.
1-3-16 safari used no issues. Seagate portable hard drive attached directly to rear USB port to transfer several jpeg file photos. No issues.
1-3-16-
1-7-16 Safari only usage. No issues. Computer remains in sleep mode after 15 minutes & powers on next day when pressing space bar. Four days, no issues.
1-8-16 6:33pm a Delkin photo card reader is attached directly to the rear USB port. Photos (three total RAW files from a Nikon D800 camera) uploaded. Upon appearing on screen in the apple photo window the iMac crashes (Powers off).
6:58pm Delkin card reader removed. iMac powered on. Upon log in crashes again.
7:30pm iMac powered on. Log in successful. Safari used no issues for remainder of day. No attempt to attach card reader again.
Someone had had asked about service & repair charges. Here are my quotes for Wisconsin Mac Man store quoted 12/7/15:
Power Supply (part) $103.51
Logic Board (part) $799.00
Labor rate per hour $75.00
Diagnostic charge $75.00