Closed tesla-cat closed 1 year ago
Without knowing what any of the called functions do, there is little I can do. Can you provide a stacktrace?
std::cout << boost::stacktrace::stacktrace();
, but it still just exits without printing any error messagevoid handle_message(uWS::WebSocket<false, true, PerSocketData>* ws,
string_view msg, uWS::OpCode code) {
json data = json::parse(msg);
try {
OptimizerInput inp = data.get<OptimizerInput>();
} catch (const exception& e) {
cerr << e.what() << '\n';
std::cout << boost::stacktrace::stacktrace();
}
ws->send(data.dump(), code);
}
Can you set a breakpoint to the line where you call parse and find the last line before the exit?
(This looks like an issue in your setup - the library throws exceptions inherited from std::exception
, and so far we never saw an issue.
the exit is caused by OptimizerInput inp = data.get<OptimizerInput>();
because everything works after removing it
Can you then debug into it? get
does not throw too many exceptions.
Description
Reproduction steps
Expected vs. actual results
expect to see error message
Minimal code example
No response
Error messages
No response
Compiler and operating system
windows, Visual Studio 16
Library version
nlohmann_json/3.11.2
Validation
develop
branch is used.