Closed Misamag closed 9 months ago
Thanks for the detailed report, @Misamag.
There may be an issue with how ouster-sdk is interacting with JsonCpp here.
If possible, could you provide
Best Regards,
Tom Staff Engineer Ouster Inc.
@twslankard,
this is the JSON string:
{"phase_lock_offset": 0, "udp_profile_lidar": "LEGACY", "nmea_baud_rate": "BAUD_9600", "udp_port_imu": 53510, "udp_dest": "239.83.104.101", "sync_pulse_out_angle": 360, "nmea_leap_seconds": 0, "sync_pulse_out_polarity": "ACTIVE_HIGH", "udp_port_lidar": 53509, "lidar_mode": "2048x10", "timestamp_mode": "TIME_FROM_INTERNAL_OSC", "sync_pulse_out_pulse_width": 0, "signal_multiplier": 3, "operating_mode": "NORMAL", "sync_pulse_out_frequency": 1, "sync_pulse_in_polarity": "ACTIVE_HIGH", "phase_lock_enable": false, "multipurpose_io_mode": "OFF", "nmea_in_polarity": "ACTIVE_HIGH", "azimuth_window": [300000, 50000], "udp_profile_imu": "LEGACY", "nmea_ignore_valid_char": 0, "columns_per_packet": 16}
JsonCpp: 1.9.5
Issue persiststs in Debug build. In Release build, it parses correctly.
Thanks, Marvin
I have just noticed something: when I switch the language version in the cmake file from 14 to 17, I do not get any errors. The following is just a guess as I have not made much of reverse-engineering:
@Misamag this is the same issue as #483 and yes it happens when the nonstd::optional is compiled with different cxx standards. The fix to this problem lies within the application embedding ouster client. You just need to make sure the cxx standard is set before ouster client is included.
@Samahu thanks, I see. It would be handy to have such information available in the starting guide at https://static.ouster.dev/sdk-docs/cpp/building.html. Like the required C++ version, mandatory defines (like EIGEN_MAX_ALIGN_BYTES=32) an so on.
Description
When calling
from my application, I get a read access violation in
The config read in client.cpp:285
auto res = sensor_http->get_config_params(active)
is a valid JSON string.It looks like the parsing in types.cpp:659
if (!Json::parseFromStream(builder, ss, &root, &errors)) {
results in an invalid root. Thess
argument contains the JSON string but root or root["udp_dest"], after this call, just contain garbage.Platform
Note