An archive of community.esquilo.io as of Saturday January 26, 2019.

Bizarre behavior

rb1

I just updated from 0.3 to 0.5. In this code snippet:

// local limit = ((range_samples + range_valid) / 2).tointeger();
local limit = ((20 + 14) / 2).tointeger();
limit = 5;
local start = ((range_samples - range_valid) / 2).tointeger();

The commented out line always set "limit" to NULL, even though I verified the values of the variables.
Using constants, "limit" is still NULL.
Setting "limit = 5", limit is still NULL.
"start" computes successfully. I have no idea where to go to resolve this.

Any help?

Scott_Shumate

With EOS 0.5, I just tried the following code:

range_samples <- 20;
range_valid <- 14;

function test()
{
    local limit = ((range_samples + range_valid) / 2).tointeger();
    print(limit + "\n");

    limit = ((20 + 14) / 2).tointeger();
    print(limit + "\n");

    limit = 5;
    print(limit + "\n");

    local start = ((range_samples - range_valid) / 2).tointeger();
    print(start+ "\n");
}

test();

It produced the following out:
17
17
5
3

This was the expected output. I also stepped through the code in the debugger and saw the same values. How are you checking that the values are NULL?

rb1

Hi Scott. Using "print" statements the output is fine. However, I can't use the IDE debugger. That's where the variables show NULL.

Scott_Shumate

I ran your snippet exactly as is with the addition of definitions for the two range values and I can see the limit values in the IDE backtrace fine. Can you post a self-contained snippet that exhibits the behavior?

rb1

I can try, but before I do, the nut is about 500 lines. Could it be a memory problem? If the Esquilo is short on memory when running the IDE would there be some indication, or would things just start falling apart?