Once again, getting Panda 3D working with C++

I am using Panda 1.6.2 (judging by directory name and version information in Windows’ software manager).

Concerning the change of code you suggested, well it’s strange enough… The program

#include "pandaFramework.h"
#include "pandaSystem.h"

PandaFramework &framework = *(new PandaFramework);
 
int main(int argc, char *argv[])
{
  framework.open_framework(argc, argv);
  //framework.set_window_title("My Panda3D Window");
  WindowFramework *window = framework.open_window();
  framework.main_loop();
  framework.close_framework();
  return (0);
}

does run and close without any errors. Yet removing the comment on

//framework.set_window_title("My Panda3D Window");

will cause a heap corruption. I hope this somewhat makes sense to you because it sure does not do so to me.
:question:

EDIT:
While having

PandaFramework &framework = *(new PandaFramework);

active I get a heap corruption no matter what I do after. There appears to be something very wrong.