-
Notifications
You must be signed in to change notification settings - Fork 42
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
iot_data_map_get: Assertion `map && key && (map->type == IOT_DATA_MAP)' failed #504
Labels
bug
Something isn't working
Comments
We saw this a while back at Eaton and did your first-case solution - wrapped all the calls to iot_data_map_iter() with a null and type check. I will post a PR with those changes. @lindseysimple IOTech may want to consider removing those assertions, in the meantime we can avoid them. |
eaton-coreymutter
added a commit
to eaton-coreymutter/device-sdk-c
that referenced
this issue
Jan 29, 2024
Sometimes objects intended to be maps are null, or initialized but type IOT_DATA_NULL, causing map get/iterate functions to assert. Bypass these cases, treating it as an empty map. Signed-off-by: Corey Mutter <[email protected]>
Posted IOTechSystems/iotech-c-utils#331 as an alternative fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐞 Bug Report
A segment fault occurs in the associated String data of devicecommands obtained through the Device Service API.
Affected Services [REQUIRED]
Device Service
Is this a regression?
Only available in version 3.1.0.
Description and Minimal Reproduction [REQUIRED]
When attempting to develop a device service based on version 3.1.0 of the device-sdk-c (csdk), I encountered the following issue. The reproduction steps are as follows:
assertion failed: map && key && (map->type == IOT_DATA_MAP).
Note: You must use your own compiled debug version of the iot library to reproduce this bug, the release version is normal
🔥 Exception or Error
Compile and install the debug version of iotech-c-utils manually.
device profile:
Notice: The "manufacturerId" is a resource of type String.
When all services are running, get the manufacturerId resource associated with the MId command from devicecommand
result:
This example is modified from device-sdk-c example/template.c.
🌍 Your Environment
Deployment Environment:
Ubuntu:22.04
EdgeX Version [REQUIRED]:
Anything else relevant?
The text was updated successfully, but these errors were encountered: