System.Math Floor & Ceiling both return insanely WRONG numbers. System.Math.Floor((8 * 12) / 8) SHOULD equal 12 NOT 786243!
Spent hours trying to figure out why my perfectly good program crashed over and over and over again.
Also I can narrow down BSoD a bit. Start to deploy, remove cable, instant BSoD.
Your question is missing one or more of these details:[ul]
The name of the product.
The code you’re trying to run.
Details on your setup.[/ul]
(Generated by QuickReply)
Sorry I thought it was all of 4.2
Cerb40 running 4.2.
Simple example code:
_bpc = (int)System.Math.Ceiling((_cw * _ch) / 8);
Where _cw = 8 & _ch = 12
Expected result: 12
Actual Result: 786243
What is the exact version of the firmware that you are running? Can you go to MFDeploy and go to the device capabilities to verify the version?
I’m not sure what I was [em]initially[/em] running. The first thing I did when the Cerb40 showed up was to check it w/ MFDeploy to make sure it was running 4.2, I didn’t look beyond that as to the specific GHI version.
Since then I was forced to reflash the chip w/ the latest firmware since there were several more instances of System.Math.Floor/Ceiling in the code, one of which forced it to step outside of the array size and lock itself in a reboot cycle so tight I had no other way to get it operational again.
I haven’t checked those methods since the reflash since I already coded my own replacements; wanting to have this project completely finished before I leave for vacation this weekend.
If I get time between now and then I will recheck the methods and report back.