River Song has been in three Dr Who stories, but her appearances are actually chronologically in reverse order. She died at the end of the first story in which we saw her, in her second appearance there's a very interesting bit of dialogue between her and the Doctor,
Doctor: ?Octavian said you killed a man.?
River: ?Yes I did.?
Doctor: ?A good man.?
River: ?A very good man?the best man i?ve ever known.?
Doctor: ?Who??
River: ?It?s a long story Doctor. Can?t be told. Has to be lived. No sneak previews, well, except for this one?You?ll see me again quite soon, when the Pandorica opens.?
Doctor: ?Pandorica hah. That?s a fairy tale.?
River: ?Aren?t we all? I?ll see you there?
Doctor: ?I look forward to it?
River: ?I remember it well.?
So it seems River doesn't die in an exploding TARDIS, and possibly at some point is accused of murdering the Doctor.
Also, why don't all those aliens just kill the Doctor instead of locking him up?
Finally, when the TARDIS materialises and River opens the door, there's a wall there (which means she can't get out), but maybe that's the wall of the inside of the pandorica and the TARDIS has materialised around the Doctor. At the end she says "Sorry Doctor" and turns and looks towards the console. Maybe she's talking directly to him.