• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

SQL to Excel crashing since version 6.2.20230927.0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL to Excel crashing since version 6.2.20230927.0

    All our excel reports are now experiencing MCH check "Pointer not set for location referenced" in vvOut_execSQLtoSS. We traced with debug to a null pointer error not checked properly. See attached jpeg. We checked with later build, 6.2.20231026.0 and we have same error.

    If we respond to error message with "G", it works second time. Not sure if that is for all cases.

    This is critical for us because all our nightly reporting crashes and holds up processing.

    We have dumps if that helps, Error message sent to QSYSOPR is RNQ0202.
    Attached Files

  • #2
    Hi Peter,

    It would be helpful to see the call stack of the job when this occurs. If these Excel download jobs are running in batch (meaning in a non-CGI job) then I suspect some sort of exception logic is being triggered that fails when executed outside of CGI. A look at the call stack would help confirm that.

    Comment


    • #3
      This is the call stack at the point of crash with "Pointer not set for location referenced."
      NB: This is a batch RPG program PSR900 (not part of Valence CGI jobs) doing a stand-alone call to vvOut_execSQLtoSS

      Type Program Statement Procedure
      QCAPCMD QSYS /016E
      PSR900 APPOBJ _QRNP_PEP_PSR900
      PSR900 APPOBJ 9100 PSR900
      VVSRVPGM VALENCE6P 206000 VVOUT_EXECSQLTOSS
      VVSRVPGM VALENCE6P 504500 VVOUT_INITIALIZE
      VVSRVPGM VALENCE6P 374300 VVUTILITY_GETVALENCESETTING
      VVSRVPGM VALENCE6P 389909 VVUTILITY_REPLACESUBS
      VVSRVPGM VALENCE6P 12800 VVIN_CHAR
      VVSRVPGM VALENCE6P 133800 PULLANDVALIDATEQUERYSTRING
      QMHPDEH QSYS /012E
      QMHUNMSG QSYS /0600
      QTEMDEBP QSYS /01FB
      QTESTOPH QSYS _C_pep
      QTESTOPH QSYS 200 main
      QTENPTS QSYS 20 qtescren
      QTENPTS QSYS 36 ProgramSource
      QUIDSPP QSYS /00E4
      QUIMGFLW QSYS /03C3
      QUIEXFMT QSYS /0099
      QUIINMGR QSYS /0582
      QWSGET QSYS /0667

      We have the same problem on other Excel calls. Look at this case:

      // Initialise the spreadsheet
      if vvOut_SSOpenWorkbook(vvOut) and
      vvOut_SSOpenWorksheet(vvOut: %addr(Col): %elem(Col));

      Type Program Statement Procedure
      1 QCMD QSYS /01C8
      ORR110B APPOBJ _QRNP_PEP_ORR110B
      ORR110B APPOBJ 12300 ORR110B
      VVSRVPGM VALENCE6P 214500 VVOUT_SSOPENWORKBOOK
      VVSRVPGM VALENCE6P 504500 VVOUT_INITIALIZE
      VVSRVPGM VALENCE6P 374300 VVUTILITY_GETVALENCESETTING
      VVSRVPGM VALENCE6P 389909 VVUTILITY_REPLACESUBS
      VVSRVPGM VALENCE6P 12800 VVIN_CHAR
      VVSRVPGM VALENCE6P 133800 PULLANDVALIDATEQUERYSTRING
      QRNXIE QSYS 1 _QRNX_CALL_FC_H
      QRNXIE QSYS 2 _QRNX_DFT_ERROR
      QRNXIE QSYS 18 _QRNX_INQ
      QRNXIE QSYS 10 InqMsg

      It also holds a lock on VVFUSION *DTAARA causing subsequent processes to hang waiting or crash.

      Comment


      • #4
        Thanks, that stack points me to the root cause. The vvUtility_replaceSubs procedure was modified recently to check session variables in addition to settings. Retrieving a session variable requires a session ID (sid), and of course there won't be a session ID in a non-Valence CGI job. So it's blowing up on the vvIn_char call where it's attempting to retrieve a sid.

        I will email you a patch shortly that should resolve this problem. Assuming it works we'll include it in the next build.

        Comment

        Working...
        X