You take a plain char array, cast it to string, and just expect it to work? You're braver than I thought.
Anyway, the error you're getting comes from the debugger's Python script that tries to print a std::string in a readable form. Since what you have is anything but a valid std::string, some check in the script triggers and throws the error. It's not a normal C++ error.