@ andre - LOL, I wish I had an app size of only 16 bytes!
Imagine this setup from GHI’s SystemUpdate Class documentation. To paraphrase:
We are reading the application hex file from some source. In the example, the source is a SD card.
We are using SystemUpdate.Load() to load the hex file in block increments. The block size in the example is 10 * 1024 bytes = 10240 bytes long.
Finally, at the very end, there will likely be a remainder. This remainder is (ApplicationSize modulo 10240). We still need to use Load() to load the remainder.
So if my application size is 40976 bytes, I will end up with a 16-byte remainder. And this will throw an exception once I finally Load() this portion.
If this is not intentional behavior, it can actually be quite insidious. Imagine in-field update working for some hex file sizes and not others. It would be very confusing.