Switch to ARM caused silent breaking changes
Trace found cause was casting negative float to uint, which is handled differently in ARM: https://www.embeddeduse.com/2013/08/25/casting-a-negative-float-to-an-unsigned-int/
Undefined result raised no error but cause breaking changes in app.
Problem affected two partners.
Setup:
- Unity Version 2019.1
- MRTK Version v2.0
Target Platform:
- HoloLens 2
@jackie could you please provide a call stack or pointer to the method? that was casting float to uint?
Cast was done in client written code. Behavior was essentially that object could not be moved in a certain direction, the cause of which was not immediately apparent but after much stepping was found to be a value being set as "undefined" instead of a valid uint. The other partner affected by this (that I'm aware of, it's apparently cropped up a few other times in previous hacks?) also had done this casting in their own code. So it's really just that the switch to ARM introduced some problems that weren't flagged or warned for.
So it's really just that the switch to ARM introduced some problems that weren't flagged or warned for.
Hm, I'm not sure this is something that we can respond to in MRTK directly, doing a static analysis looking for casts from float to uint seems like something that the compiler / linter should be doing. But it's good to have this filed in case other people run into this issue and can work around it.