Skip to content

Program Crashes with malformed data #307

@doppelhub

Description

@doppelhub

Hello, just downloaded your app for the first time. Went to use it with my existing embedded application, but program crashes immediately (and repeatedly) when my embedded device starts sending data. Running MacOS Sonoma 14.7.6 and Serial Studio 3.1.5.

Serial data my embedded product responds with (which crashes your app):
[CODE]
19:37:16.749 ->
19:37:16.749 ->
19:37:16.749 -> LiBCM v0.9.5f, 2025JUN02
19:37:16.749 -> '$HELP' for info
19:37:16.785 ->
19:37:16.785 -> HW:D/5AhG3/48S/Vs=off/Heat:N
19:37:16.785 -> Grid: Plugged In
19:37:16.785 -> Charger disabled: Key is ON
19:37:16.785 -> Key:OFF
19:37:16.785 -> Old SoC: 0%, New SoC:10%
19:37:16.785 -> ADC 0A offset: -2 (pass)
19:37:16.785 -> Remainder_ms: 25
19:37:16.785 -> Total hours since last firmware update: 2 (2880 Hours MAX)
19:37:16.785 -> Charger disabled: LiBCM Powerup
19:37:19.258 -> Charging
19:37:19.258 -> ADC 0A offset: -1 (pass)
19:37:19.293 -> Old SoC: 10%, New SoC:10%
19:37:19.293 -> IC0,3.4881,3.4643,3.4851,3.4762,3.4676,3.4771,3.4850,3.4770,3.4681,3.4675,3.4820,3.4651
19:37:19.293 -> IC1,3.4631,3.4631,3.4629,3.4592,3.4856,3.4754,3.4801,3.4805,3.4759,3.4408,3.4800,3.4816
19:37:19.293 -> IC2,3.4798,3.4407,3.4795,3.4753,3.4387,3.4778,3.4836,3.4789,3.4522,3.4877,3.4509,3.4892
19:37:19.331 -> IC3,3.4600,3.4576,3.4527,3.4447,3.4553,3.4446,3.4551,3.4518,3.4637,3.4616,3.4591,3.4648
19:37:19.331 -> Discharging cells above 3.4409 V (0x): fff,ffb,b7f,fff,
19:37:20.282 ->
19:37:20.282 -> Old SoC: 10%, New SoC:10%
19:37:20.316 -> IC0,3.4880,3.4643,3.4852,3.4763,3.4677,3.4771,3.4850,3.4770,3.4681,3.4674,3.4819,3.4650
19:37:20.316 -> IC1,3.4629,3.4630,3.4628,3.4590,3.4855,3.4753,3.4801,3.4806,3.4758,3.4408,3.4800,3.4815
19:37:20.316 -> IC2,3.4804,3.4415,3.4801,3.4760,3.4395,3.4785,3.4842,3.4796,3.4528,3.4884,3.4515,3.4898
19:37:20.316 -> IC3,3.4607,3.4584,3.4535,3.4456,3.4561,3.4454,3.4558,3.4526,3.4644,3.4624,3.4599,3.4655
19:37:20.316 -> Discharging cells above 3.4409 V (0x): fff,ffb,b7f,fff,
19:37:21.309 ->
19:37:21.309 -> Old SoC: 10%, New SoC:10%
19:37:21.309 -> IC0,3.4888,3.4650,3.4859,3.4771,3.4683,3.4779,3.4857,3.4777,3.4688,3.4681,3.4827,3.4658
19:37:21.309 -> IC1,3.4637,3.4638,3.4636,3.4598,3.4863,3.4761,3.4814,3.4812,3.4766,3.4416,3.4808,3.4823
19:37:21.309 -> IC2,3.4806,3.4417,3.4803,3.4760,3.4396,3.4786,3.4843,3.4798,3.4530,3.4886,3.4517,3.4899
19:37:21.309 -> IC3,3.4607,3.4585,3.4536,3.4457,3.4561,3.4455,3.4559,3.4528,3.4646,3.4625,3.4600,3.4656
19:37:21.347 -> Discharging cells above 3.4417 V (0x): fff,ffb,b7f,fff,
19:37:22.298 ->
19:37:22.298 -> Old SoC: 10%, New SoC:10%
19:37:22.298 -> IC0,3.4888,3.4651,3.4860,3.4771,3.4685,3.4780,3.4858,3.4779,3.4690,3.4683,3.4828,3.4659
19:37:22.298 -> IC1,3.4639,3.4640,3.4638,3.4600,3.4864,3.4763,3.4814,3.4814,3.4767,3.4417,3.4809,3.4824
19:37:22.354 -> IC2,3.4806,3.4416,3.4803,3.4760,3.4396,3.4786,3.4844,3.4797,3.4530,3.4885,3.4517,3.4900
19:37:22.354 -> IC3,3.4607,3.4585,3.4536,3.4457,3.4562,3.4455,3.4559,3.4528,3.4646,3.4625,3.4600,3.4656
19:37:22.354 -> Discharging cells above 3.4418 V (0x): fff,ffb,b7f,fff,
19:37:23.312 ->
19:37:23.312 -> Old SoC: 10%, New SoC:10%
19:37:23.312 -> IC0,3.4888,3.4652,3.4861,3.4771,3.4685,3.4779,3.4858,3.4779,3.4689,3.4682,3.4828,3.4658
19:37:23.312 -> IC1,3.4638,3.4639,3.4637,3.4599,3.4864,3.4762,3.4814,3.4814,3.4767,3.4417,3.4809,3.4824
19:37:23.312 -> IC2,3.4807,3.4418,3.4804,3.4761,3.4397,3.4786,3.4844,3.4798,3.4531,3.4886,3.4518,3.4900
19:37:23.312 -> IC3,3.4609,3.4585,3.4537,3.4457,3.4563,3.4455,3.4559,3.4528,3.4646,3.4626,3.4601,3.4657
19:37:23.346 -> Discharging cells above 3.4418 V (0x): fff,ffb,b7f,fff,
[/CODE]

I don't necessarily expect your program to handle formatting like this, but I do expect the program to handle data it doesn't understand gracefully. Note that the above-posted data isn't gathered from your program, which crashes immediately upon connecting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions