I had something similar once.
The party was storming a completely optional Shadow Dragon's lair. They knew they were storming a shadow dragon's lair, and were given the opportunity to literally look up what a shadow dragon is capable of (read: breath weapon inflicts negative levels) for a whole week between sessions. They knew for a fact (and had discussed among themselves) that this thing WOULD pile tons of negative levels on them if they didn't prepare properly.
They worked their way through the myriad layers of raid guardians and defenses. They reached a point that quite clearly seemed to be the entrance to its horde/sleeping room, where it was pretty obvious the dragon would be on the other side. The smartest player (druid) even cast the spell Omen of Peril regarding the course of action of going through the door, which only has 3 options: Safety, Peril, and Great Peril where your very life is at risk. The answer was of course Great Peril since there was a dragon on the other side. The group then proceeded to MOCK him for casting the spell. One of the other smart players asked about death ward, since they knew they needed it since they knew they were fighting a dragon known to pass out tons of negative levels, which death ward prevents. One of the TWO clerics responded with "I didn't memorize any death wards cause I have a mass death ward memorized." Only he refused to cast it on them before going through the door since the duration is only 1 round/level instead of 1 minute/level like the single target version. The other cleric didn't even have any memorized.
So after mocking the druid for giving them a clear and definitive warning that there's a bloody shadow dragon on the other side of the door (technically a wall that they would ddoor past), he refused to cast mass death ward because OMG what if there isn't a shadow dragon and he wastes his one and only death ward since he didn't memorize any long lasting ones? So they shift to the other side, into the big cave where lo-and-behold there's an ancient shadow dragon lying on its horde. If you think the cleric would cast death ward now, you're a far smarter individual then him. Instead of casting the mass death ward then when the group is nice and grouped up for it, he sprints ahead of the group (using an activation of swift expeditious retreat on his boots) and casts a sunburst cause he wanted to dispel some of the darkness spells around the lair.
So then after he sprinted away from the group, having used up the round where the dragon was standing up and hasting itself, he then yells at the group to gather up on him so he can death ward them since he only has the one memorization and no two targets can be more than 20 feet apart, and readies an action to cast mass death ward when all party members are in range. So about 2/3rds of the group gets in range (packed in nice and tight since they have to be for the spell), and the dragon's turn comes around so I naturally have it move into range and hit them with a 50 foot cone of negative levels, 8 on a failed reflex save of over 30, 4 on a successful reflex save.
So guess what happens to the memorized spells of a cleric barely able to cast 8th level spells when he gets hit for 4-8 negative levels? Naturally they lose their 8th level spells, on top of the penalties to hit points, saves, skill checks, caster level checks, the works. And what level is mass death ward? 8th level. So he starts *****ing and moaning about how he lost his mass death ward and blah blah blah it's everyone's fault but his.
I'm left in a situation where I either let the battle progress and guarantee a total party wipe and an end to that campaign, or I change something about the encounter. I don't think I've ever been so ****ed at a party (the 2 clerics in particular), that they basically forced me into a situation through the grossest collection of stupidity I've ever seen to either wipe the party or give them a pass. I specifically use the players-roll-all-the-dice rules variant to generally remove the possibility of my flubbing dice rolls behind the screen in their favor.
So after the negative levels have been resolved and the two clerics in particular are just whining whining whining about how it's hopeless we're doomed omg this isn't fair how should we have known blah blah blah, I come up with the lamest and most blatantly obvious lie I've ever told at the table, that "Oops, I forgot about the dragon's first initiative roll that was a 2, and accidentally rerolled its initiative to 12." They were allowed to undo the negative levels, and after they barely survived the encounter (there were some other pretty stupid decisions made, such as using a standard action to make a spot check with a spot score of +4 rather than healing the goliath who was at 12 hit points), I basically didn't give them any treasure or experience for the fight, due to the dragon they fought having been a simulacrum sitting on a dummy horde as one last layer of lair guardian (encounter originally would have netted them a ton of experience and wealth back when it was a real dragon). The players didn't think twice about how the dragon seemed to take on a crystalline structure and disintegrated when it died, they were too excited about piling the million or so coins (it was on the plane of shadows, where everything is in shades of grey so all coins look alike) into their portable hole and getting out of there. They're all excited about how they're going to spend over a million gold (I was very careful not to ever say gold, just coins), only to find that they actually had about 10,000 gold worth of copper, and a couple +1 weapons, to divide between a 7 man level 15-16 party, and not even some dragon hide either.
So yea, I've had players put me in a position where they forced me to either scrap the campaign or give them a get-out-of-stupid free card. I don't think I've ever been as infuriated by a pair of individuals within a game before or since. Some of their stupidity wouldn't have rankled QUITE so much if they hadn't persistently mocked the druid who was actually smart enough to give them clear intelligence and one last opportunity to get the proper protective preparations in place.