Avoiding Writing Your Characters into Corners

This is a problem with a lot of fanfiction, I find. Part of it’s the simple fact that people are worried about writing themselves into a corner by creating a situation they don’t know how to get out of. It’s hard to put characters in peril and I haven’t quite figured out how to do it yet . – Dartz

Oh, that’s simple. You start with your solution and work backwards. Come up with the most hopeless situation your solution would solve, and then have that happen.