The debt involved is bona fide debt, that is, real debt and not contingent debt like a guarantee. And even if its from Uncle Rich, the forgiveness can still be taxable to you. The general rule is that any forgiveness of bona fide debt is gross income to the beneficiary. The tax laws provide several exceptions to this. Insolvent means an excess of liabilities over assets, determined just before the forgiveness.
Bankruptcy is the other official forgiveness basis.
Here, you are discharged by reason of the bankruptcy from a debt. The tax laws say you don't have to report that discharge as income, because that would defeat the whole purpose of the bankruptcy. In all cases, however, you must pay a price for the debt discharge. The tax laws are very complex in this regard, but the effect of them is simply to postpone, rather than permanently exclude, the debt discharge. If you have one of these situations, it's best to consult a professional since the rules can be tricky.