How to use Hashtable of toString(true) in C++?

peteo
edited October 2011 in Native
void PtLink::PhotonPeerOperationResult(nByte opCode, int returnCode, const Hashtable& returnValues,short invocID)
{
CCLOG("%s", returnValues.toString(true).ANSIRepresentation().cstr());
}

I want to write log of the Hashtable& returnValues,but it EXC_BAD_ACCESS

Program received signal: “EXC_BAD_ACCESS”.
Xcode could not locate source file: JString.cpp (line: 409)

Comments

  • Your code looks perferctly right.
    Can you tell me the client library version, which you use, please?
  • Photon-iPhone_v6-5-5_SDK
    C++ version
  • Just had a look into the code of class JString from that specific version and an EXC_BAD_ACCESS at this specific line does not make any sense. The program should not even jump into that method from your code (that line is located inside of operator+=(char aChar), and afaics nothing in that code triggers an approach to add a single 8bit-character).
    I guess, that this is reproducible?

    Can you vie me the serialized version of that operation result, so that I can rebuild and debug with the same data, as you are using?
    You could either get it with wireshark or by just setting the operation data logger in log4net.config of the serverside-application to DEBUG and then checking the log of that application (if you have not set any specific operation, then it will be Lite, which is the default application).