I've only managed to run out of air once in 39 years/5000 dives... and it's pretty interesting when it happens. On a "two tank" charter in Utila, the dive staff insisted on changing our tanks over between dives. On our forth day, second dive, I was happily swimming along snapping pics, when I took a breath, and that was "it"! (The new fangled, high-performance regulators really don't give much warning!). I pondered a free ascent (I was in 90' and have done this many times "playing") but since I was pretty bubbled up after several days of diving, I decided to get friendly with my wife-buddy! She was about 20 feet away, also snapping pics. I popped her octo off of her necklace with a minimum of fuss (she was a pretty new diver at that point.) We packed up our cameras, and made a normal ascent with safety stop and SMB deployed.
What was really funny about all of this was that our DM (the one who didn't change the tank) came over and gave a two palms up "WTF?" signal. When I indicated I was out of air, he pointed at me and said "You???", started laughing and swam away... Awesome!
(He and I had dove together before and he new we were quite capable of managing the situation. He was horrified to learn WHY I had run out and we both agreed that it was good it was my tank that was forgotten and not someone else's that wasn't changed over. He bought more than a few beers that night!)
Obviously this was 100% my fault, and it was the last time I relied on the familiar SOUND of a pressuring system to "confirm" by tank was full. Very much a "stroke" error on my part...