Insane offset? Does anyone have an idea of what this means?
After a bit of experimenting, it seems this error happens when the struct in the 2D array is larger than 4 bytes. If one of the ints are changed to byte or one of the variables are removed, it stops complaining...
Looked interesting so I did a search and found this from the national Instruments website :-
"This message means that an object in LabVIEW such as a wire or a loop tunnel does not pass an internal test known as a sanity check. If the errors are serious enough, LabVIEW exits because something has become very corrupted. Sanity checks occur before each save, to ensure that corrupted VIs are not written over good VIs."
Absolutely no idea why the error occurred though!
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
I don't think you should be passing a struct as the third argument to NumOut. Doesn't NumOut only accept a scalar for its third argument? If so, since no scalar can be bigger than four bytes, that might explain the error message.
I did notice it and fixed it in my test copy, but I left it there as a treat for your guys. It does no change whatsoever, it seems to happen at the ArrayInit() call. But if the type is wrong, it usually just returns 0, I have never experienced it to crash the program.
It is a bit unexpected that it accepts the value though, but I didn't test if it could actually display it properly. Who knows... But there was also a similar case with pow(), I could pass an array of float into it, while it clearly didn't support it... (Again, no crash, it just returned 0.)
I spent way too long trying to figure this out today and ended up not making any real progress. The compiler is definitely generating a bad RXE file if you have a struct longer than 4 bytes in a 2d array. It is setting the offset to the first Dope Vector to 4 bytes greater than it should be and that causes one of the file header offsets to be 4 bytes too large which is causing the parsing of the RXE by the firmware to abort with the insane offset error.
If anyone would like to help me figure out what I am doing wrong I would be grateful.
afanofosc wrote:
If anyone would like to help me figure out what I am doing wrong I would be grateful.
John Hansen
Hi John,
After all you've done for us (and me) I'd love to help you with this but as I recall your compiler is written in Pascal and I'm not sure I can get it running on my Mac. But I'm a pretty good code reader.