Alright, took a few hours reading this thread from the top really hoping a solution would be somewhere.
27" 2012 (thin) iMac, purchased January 2013
Nvidia 680MX 2GB Cache
I've had the instant shutdown problem for about 6 months, I've contacted Apple Support but only to have them reference me to a store for inspection. Unfortunately for me I do not have the time to travel hours to a certified repair location only to have them discover the same issues you all have found ( or more like to have them discover nothing).
I can only speculate that unplugging our machines extending their run time is the number one clue into their problems. Wether or not the problem is directly a result of the power supply or not can not be determined as the shutdown looks to occur mostly during high graphical load. That is to say, perhaps a faulty power supply sends improper power (or just faulty electricity to be general in physics terms) to the graphics chip. Resulting in an SMC "lifesaver" shutdown to prevent damage that may or may not occur otherwise.
I've run through so many situations in my head, brainstorming a fix.
I read the earliest posts about this issue 6 months ago and thought perhaps my RAM was to blame, I had installed an additional 8 GB that came OEM in my dad's iMac, he upgraded to 32 GB when he bought his machine. Interestingly the brand of my RAM and his RAM are not the same, however the specifications are. I have no way of knowing which set truly belong to my computer anymore but I have run them separately, both resulting in sudden switch offs. The two brands are;
"ELPIDA": made in Taiwan, 4GB 2Rx8 PC3 12800S - 11 - 10 - F3, EBJ41UF8BDU5-GN F 1251GK052093 (I don't think these are serial numbers, they are the same for each stick of the same brand.)
"hynix": made in China, 4GB 2Rx8 PC3 12800S - 11 - 11 - F3, HMT351S6CFR8C-PB NA AA 1240
The only notable difference is in the SPD revisions (the number after the 11) but 10 and 11 seem to run at the same latency and with the same "math" (not an expert here). The RAM "Chips" are not identical across the two brands, that is, they are not rebranded, they are different upon visual inspection of specific molding designs and serial/product numbering. Again though, I've had crashes while running both and one or the other sets.
This is a good time to point out that my dad's computer has not had this problem, though my iMac has likely seen a 4,5,6 or so thousand more hours of use and his model is the base version purchased in spring time, 2013.
The crash occurs or has occurred in Mountain Lion, Yosemite, El Caption, Windows 7, and Windows 10 (Bootcamp)
I thought running my computer from a non-grounded outlet (old house) could be causing problematic surges so I plugged the computer into a grounded outlet (I know it's grounded, I installed it), no fix. (Additionally this has occurred in two houses from different "grids".)
I've done everything possible save removing the screen to get a look inside the machine and clean it, no avail and not hardly any dust either.
I'm definitely preaching to the choir when I say no computer should ever behave this way, even an old computer should have mechanical failures long before issues like these come up, and much later in life too, nothing close to 2-2.5 years. This error is most definitely recall worthy, I'd just like to hear from Apple that "Yes, we are aware of a possibly power related issue impacting owners of our late 2012 iMac and are studying defective models to learn the exact cause of the problem. Apple will work to rectify all models effected by means of component or model replacement and issue refunds for services previously aimed to fix the issue." Ahh, wouldn't that be nice.
I'm at the end of the thread from the end of the rope, if I can't get this fixed within the next few months, I'll likely never buy an Apple computer again.
Edit: Perhaps I shouldn't sound too grim, I've learned a lot from this thread and will be putting to use many of the techniques from contributors.