You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remove line of "std::string ss = result.dump();" , it work ok, output:
xxxxx handler failed
xxxxx call 44 1 field:ErrMsg,err:33 x
xxxxx handler failed 2
xxxxx call 41 soineweij x
simple json demo cannot reproduce the issue
i'm confused why it appears, please give some suggest to get where is wrong, thanks
Please describe the steps to reproduce the issue.
may not reproduce, but in my project is indeed exist every time
nginx fprintf(stderr, ...) output to file
Can you provide a small but working code example?
What is the expected behavior?
And what is the actual behavior instead?
Which compiler and operating system are you using?
What is the issue you have?
json version: 3.7.3
source:
static int HanldeFailed(json& reply, json& result, std::string& err, const std::string& err_key, int has_err_key) {
fprintf(stderr, "xxxxx handler failed\n");
fprintf(stderr, "xxxxx call 44 %d field:%s,err:%d x\n", has_err_key, err_key.c_str(), err.size());
if (has_err_key) {
result.push_back(json {{err_key, err}});
reply["reply"] = result;
fprintf(stderr, "xxxxx handler failed 2\n");
std::string ss = result.dump();
fprintf(stderr, "xxxxx call 41 %s x\n", "soineweij");
return 0;
}
fprintf(stderr, "xxxxx call 42 %s x\n", "jiojonosnfie");
return -1;
}
output:
xxxxx handler failed
xxxxx call 44 1 field:ErrMsg,err:33 x
xxxxx handler failed 2
other:
xxxxx handler failed
xxxxx call 44 1 field:ErrMsg,err:33 x
xxxxx handler failed 2
xxxxx call 41 soineweij x
i'm confused why it appears, please give some suggest to get where is wrong, thanks
Please describe the steps to reproduce the issue.
may not reproduce, but in my project is indeed exist every time
Can you provide a small but working code example?
What is the expected behavior?
And what is the actual behavior instead?
Which compiler and operating system are you using?
Which version of the library did you use?
develop
branchIf you experience a compilation error: can you compile and run the unit tests?
The text was updated successfully, but these errors were encountered: