New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MemoryPoolAllocator crash #548
Comments
Can you make sure that only one copy of RapidJSON code in the project? If multiple versions of headers are used at the same time, there may be strange crash. |
Thank you for responding! I've checked, and the RapidJSON headers are only contained in I'm not exactly sure what to look for in the backtrace, but it looks like everything in the class files is being called correctly: the main scene's The next step is Here is the readout that shows the fault at the scores.Accept step, fault at 93 |
I asked about the one version issue because cocos2d-x has used a version of RapidJSON internally. Are you using their header files also? The situations you described looks strange. If you can try to make a minimal test case (ideally without other dependencies such as cocos3d-x), I may help you to find out the problem. |
This wound up being entirely my mistake: I failed to properly initialize the class I had designated to handle RapidJSON. Thank you for your help! |
Hello!
I'm new to C++ and rapidjson, but I'm using it in the prototype of the game I'm putting together. At this point, all I'm trying to do is write a simple key pair to a file to make sure it's set up correctly, but I'm getting a crash each time.
My class definitions for rapidjson:
https://gist.github.com/matthewlehew/755fae28780bb99edbf0
When the main Cocos2dx scene inits, it calls the
GameData::startup
method. Based on backtrace, it looks like the EXC_BAD_ACCESS is happening during theSetObject
method implemented inGameData::createScores()
.Debug readout (error is on line 16):
https://gist.github.com/matthewlehew/26dde2ac39d6dd07c738
Based on reading of #412, I changed the
GameData::startup
method to the one that's currently commented out in the above file. When using that one, the EXC_BAD_ACCESS happens later on, within theGameData::writeScores()
block.Debug readout (error is on line 6):
https://gist.github.com/matthewlehew/28e7a29f40e8caebc64b
Any suggestions on how to proceed at this point? I apologize if I left out any important data, I'm new to rapidjson and to Xcode.
The text was updated successfully, but these errors were encountered: