Erroneous error handling in mm-modem-helpers-cinterion.c causes assertion. Analysis inside.
OS is Ubuntu 24.04.1 for Raspberry Pi, but that should be irrelevant.
When running ModemManager with "--debug" on a "Gemalto M2M GmbH ALSx PLSx LTE modem" that is correctly indentified as a Cinterion modem a failing assertion is reported:
`(ModemManager:2925): GLib-CRITICAL **: 09:21:32.082: g_propagate_error: assertion 'src != NULL' failed
(ModemManager:2925): GLib-GIO-CRITICAL **: 09:21:32.083: g_task_return_error: assertion 'error != NULL' failed`
After building and debugging the current version of ModemManager I found the error handling in source file mm-modem-helpers-cinterion.c, function mm_cinterion_parse_scfg_sim_response to be faulty. The relevant lines are
if (!mm_get_uint_from_match_info (match_info, 1, active_slot)) { g_prefix_error (&inner_error, "Could not parse SIM slot index: "); g_propagate_error (error, inner_error); return FALSE; }
If no matching string is found then the local variable inner_error is still NULL.
The call g_prefix_error becomes a silent no operation.
The call to g_propagate_error fails with the assertion.
My guess is that my particular modem has only a single SIM slot and therefor does not indictae a slot at all.
If you suggest how to fix this problem "in style" I am happy to test the fix.