-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Problem in dump() in json.h caused by ss.imbue #444
Comments
Hey @cvengelen, thanks for reporting. This looks really strange, because we are running the AppVeyor tests (see https://github.com/nlohmann/json/blob/develop/appveyor.yml) in Release mode. |
Maybe someone with more insights to MSVC can help. |
This is possibly #359. |
@cvengelen Which version of the library are you using? |
The project is using version 2.0.1. Note that there are no statics inthe call to ss.imbue:
I'll check with the latest json version., |
This issue is resolved in version 2.1.0 (or in another version between 2.0.1 and 2.1.0).
Somehow this solves my original problem: the heap exception does not occur anymore. |
Thanks for the feedback! |
We have been using json.h for Json input and output in our product without problems.
However, until now I have build a Debug version of the product, and now I started building for a Release configuration. I immediately got a Heap exception in the last statement of the dump() method of json. This must have been a problem in some destructor, so just to be sure I changed the dump code in the following way:
The Heap exception then occurs when the block statement with the ss declaration is left, so caused by the ss destructor. Also see attached VS2015 screenshot.
Just as a guess, I then commented out the ss.imbue call, and then the Heap exception disappeared immediately.
Again, note that this problem only occurs when compiling for the Release configuration (with /MT in VS2015 instead of /MTd).
The text was updated successfully, but these errors were encountered: