You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I’m encountering an issue reported by some of our users when attempting a DFU. The application intermittently crashes with the following exception:
java.lang.NegativeArraySizeException:Data length is negative (-2 bytes) (MTU=69, CBOR overhead =71, data length =211750, offset =0)
What is odd is that we log the MTU value of our connection and its value is the one we use for negotiation: 72 (log below)
2025-01-02 07:11:44.433 🟪 VERBOSE - (pool35thread1:478): AppState(
...,
carvDevicesState: CarvDevicesState(
left: CarvDeviceState(
side=left
rxBleDevice.macAddress=##:##:##:##:##:##
rxBleConnection.mtu=72
connectionState=Connected(authorized=true),
...
)
right: CarvDeviceState(
side=right
isReadyToRecord=false
rxBleDevice.macAddress=##:##:##:##:##:##
rxBleConnection.mtu=72
connectionState=Connected(authorized=true),
...
)
)
2025-01-02 07:11:44.433 🟥 ERROR - (pool35thread1:478): Uncaught exception on thread pool-35-thread-1
java.lang.NegativeArraySizeException: Data length is negative (-2 bytes) (MTU = 69, CBOR overhead = 71, data length = 211750, offset = 0)
at io.runtime.mcumgr.managers.ImageManager.e(ImageManager.java:243)
at Gq.f.a(Upload.java:14)
at io.runtime.mcumgr.transfer.TransferCallable.a(TransferCallable.java:70)
at Gq.d.run(TransferManager.java:3)
at Gq.d.run(TransferManager.java:53)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Additional Context
Restarting the update usually resolves the issue temporarily.
I have not been able to reproduce this issue consistently.
Do you happen to have any suggestions on how to debug or fix this issue?
Thank you!
The text was updated successfully, but these errors were encountered:
Hello,
As the error says, you need to increase the MTU. Seems like your device returns 69 (at least sometimes?).
You can do this in 2 ways:
Increase the maximum ATT MTU on the device to 71+, preferably 498.
Enable segmentation and reassembly on the device and "MCU Mgr Params" command in SMP Server. This allows the device to buffer long SMP packets split into smaller chunks.
Hi.
I’m encountering an issue reported by some of our users when attempting a DFU. The application intermittently crashes with the following exception:
What is odd is that we log the MTU value of our connection and its value is the one we use for negotiation: 72 (log below)
Additional Context
Do you happen to have any suggestions on how to debug or fix this issue?
Thank you!
The text was updated successfully, but these errors were encountered: