Rocket U2 | UniVerse & UniData

 View Only
  • 1.  MAXINT error message

    Posted 11-17-2022 09:11

    Hello all!

    We are running UniVerse 11.3.4 on AIX 7.2.  We just started this combination 2 months ago, though we've been running on UniVerse/AIX for many years.  Yesterday we received a UV error during one of our users' sessions:
            Integer value over the MAXINT (2147483647). Zero used.
    We've never encountered that error before. 

    I've run searches through the $uvhome directory at the unix level, and the only references I can find to MAXINT are in python.tar.  We're not running Python code and have not even licensed it.

    We're looking at the issue, and it's most likely a data error, but is has raised my curiosity.  Where is MAXINT set?  Is it something we can control, or is it hard-coded into UniVerse somewhere?  Has anyone ever had a need to modify the value - up or down?




    ------------------------------
    Brian Paige
    ------------------------------


  • 2.  RE: MAXINT error message

    ROCKETEER
    Posted 11-17-2022 09:20
    Brian,

    MAXINT is an internal variable in UniVerse and you cannot change it. Can you find out what the user was doing or the program and line number where the error occured. For example there is a known issue from 11.3.1 fixed at 12.1.1.

    At 11.3.1, using the RND() BASIC function with an argument larger than a 32bit int results in the following warning message being displayed.

    >CT BP RND

    RND
    0001 X = RND(123456789012)
    0002 CRT X
    0003 END

    At 11.3.1, the following warning is generated

    >RUN BP RND
    Program "RND": Line 1, Integer value over the MAXINT (2147483647). Zero used.
    -1103528845

    There is also the following outstanding bug as well

    String extraction does not work if length is larger than maxint 2147483647

    >CT BP MAXINTBUG

    MAXINTBUG
    0001 A = STR("A", 100)
    0002 B = A[1,2147483648]
    0003 PRINT A
    0004 PRINT B

    > RUN BP MAXINTBUG
    Program "MAXINTBUG": Line 2, Integer value over the MAXINT (2147483647). Zero used.
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

    >



    ------------------------------
    Jonathan Smith
    UniData ATS
    Rocket Support
    ------------------------------



  • 3.  RE: MAXINT error message

    Posted 11-17-2022 09:27
    Hi Jonathan!

    Thanks for the quick reply!

    I did a quick scan of the program and it looks like the error came from one of two variables being used to reference VM positions in dynamic arrays One is a loop counter and the other is obtained from values in yet another array. I suspect that the issue may be data related, but I have requested that one of our developers that knows the program (and the data) better than I dig a little deeper.

    My questions were more curiosity than anything else. I've been using UV (and other multi-value variants) for decades and this is the first time I've ever seen reference to that variable. It raised my 'want to know' interest level.

    Brian




  • 4.  RE: MAXINT error message
    Best Answer

    ROCKETEER
    Posted 11-17-2022 09:44
    Brian,
    Support for 64bit integers was added at the 11.3.1 release. So numbers greater than 32bit which were treated as floats before can now be interpreted as integers. The side effect is that certain functions which check for a maxint value can now throw the error you noted. This has come up a few times and typically it was due to a program coding an arbitrarily large value (i.e. 9999999999) into one of these functions.
    Thanks,
    Neil

    ------------------------------
    Neil Morris
    Universe Advanced Technical Support
    Rocket Software
    ------------------------------



  • 5.  RE: MAXINT error message

    Posted 11-17-2022 10:00
    Brian,
      We encountered this shortly after moving to 11.3.1 a while back.  For us, we mostly found it in places where the developer did a GREAT job of ensuring they were getting the full string (either that or their keyboard stuck and repeated numbers) by entering a number greater than the 32bit int max (2147483648).
    Here is one such location...

          DATA.FILE = DATA.FILE[134,9999999999]


    Our "fix" in this case was to just reference a smaller number (by chopping off a few 9's) to get the remaining parts of the string.  In our case, we never expect to receive 2Gb of data in the string so it was a relatively easy workaround for us.

    ------------------------------
    Ryan Ladd
    ------------------------------



  • 6.  RE: MAXINT error message

    Posted 11-17-2022 10:07
    Thanks for the input, Ryan!




  • 7.  RE: MAXINT error message

    Posted 11-17-2022 10:07
    Thanks Neil!