I've been using ATMs since the machines were introduced in the US. Have used them in many European countries. Had never experienced a machine malfunction until recently. I've now had two, both in Spain--one in Salamanca and one in Santiago de Compostela. I've made very frequent small withdrawals, but 2 out of 30 or 50 transactions is a pretty significant problem rate, so I thought I should warn others.
The two problems were the same: The machines dispensed the correct amount of money and the requested receipt, but the ATM card remained in the machine (not visible). On the first occasion I pressed the Cancel button and the card was ejected. Whew. It happened again today, so I tried the same technique. No go; card still inside machine. It was Saturday, so the bank was closed. Envisioning having to return to the scene of the malfunction Monday morning, I stood at the machine for a moment, then realized it was displaying the normal Welcome screen. I figured it wouldn't hurt to try another transaction. I went through the regular steps, requesting 20 euros, and I received money, receipt and card.
I've previously ignored the advice to use ATMs at banks during working hours. I now see the error of my ways.