[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: Space offset X'0008A000' or X'0000000000000000' is outside current limit



Kevin,

I further traced down the problem to the prototype of "endOfElement". Starting with your original CALLIT I just changed to the prototype to the old format and the program works.

That makes me believe even stronger, that it is a compiler problem, unless some else could see the differences between the new and old format. For my eyes both prototypes look the same regarding to the parameter descriptions.

Thomas.

-----Ursprüngliche Nachricht-----
Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Kevin Wengert
Gesendet: Donnerstag, 26. Februar 2015 21:59
An: 'HTTPAPI and FTPAPI Projects'
Betreff: RE: Space offset X'0008A000' or X'0000000000000000' is outside current limit

Sorry, that had a bad attachment, here is the xml file again...

Thanks,

Kevin

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Kevin Wengert
Sent: Thursday, February 26, 2015 1:41 PM
To: 'HTTPAPI and FTPAPI Projects'
Subject: RE: Space offset X'0008A000' or X'0000000000000000' is outside current limit

Hi Scott,

I've attached a simplified version of the code that still gets the error.
I've also attached the xml file.

You will probably want to edit this to rename the file and the debug file to something meaningful in your environment, otherwise it should be good to go.

Thanks,

Kevin

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Thursday, February 26, 2015 1:01 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Space offset X'0008A000' or X'0000000000000000' is outside current limit

Kevin,

This error means that a pointer was set to an invalid address. Usually this occurs because the pointer was added to, and it resulted in a number that's larger than the size of the memory that was allocated to a field.

I don't see anything obvious in the code that you provided that would do this.

To help further, I will need to be able to reproduce this problem on my development box.  Unfortunately, the code you provided is not complete, so I can't load/run that code on my machine.  Can you provide something that I can load and run?

Thanks



On 2/26/2015 1:19 PM, Kevin Wengert wrote:
> HI Loek,
>
> I will run that through but I don't think that's the issue.  I didn't 
> include all the code trying to make it easier to read.  The 
> StartOfElement processing actually isn't doing anything, I'm not 
> expecting multiple transactions so I'm not trying to increment an 
> index for an array.  That's all I've ever used the StartOfElement
processing for in the past.
>
> Thanks,
>
> Kevin
>
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Loek 
> Maartens
> Sent: Thursday, February 26, 2015 10:26 AM
> To: HTTPAPI and FTPAPI Projects
> Subject: Re: Space offset X'0008A000' or X'0000000000000000' is 
> outside current limit
>
> Hi Kevin,
>
> I can see the EndOfElement procedure but no StartOfElement. Since your 
> code points to a StartOfElement and there is no such procedure I think 
> that is where things go wrong.
>
> Kind regards,
>
> Loek Maartens.
>
> On 26-2-2015 12:46, Kevin Wengert wrote:
>> Hi Scott,
>>
>> I'm trying to parse some xml from an ifs file and I'm getting this error:
>>
>> Space offset X'0008A000' or X'0000000000000000' is outside current 
>> limit
> for
>> object QPADEV001GKEVINW    819274.
>>
>> Here is the relevant code:
>>
>> Ctl-Opt Copyright('Logistix Software Solutions, 2014')
>>            Option(*SrcStmt: *NoDebugIO)
>>            DatEdit(*MDY)
>>            DatFmt(*MDY)
>>            DftActGrp(*NO)
>>            ActGrp(*CALLER)
>>            PgmInfo(*PCML:*MODULE)
>>            Bnddir('KWA':'LOGISTIX':'HTTPAPI');
>>                                                                    
>> /copy qrpglesrc,httpapi_h
>> /copy qrpglesrc,ifsio_h
>>                                                                    
>>     Dcl-PI  SelectorProExport   ExtPgm('CALLIT');
>>     End-PI;
>>    
>>
>>      Dcl-Pr EndOfElement;
>>        UserData            Pointer;
>>        depth               Int(10);
>>        name                VarChar(1024)  Const;
>>        path                VarChar(24576) Const;
>>        value               VarChar(65535) Const;
>>        attrs               Pointer        Dim(32767)
>>                                           Const Options(*VarSize);
>>      End-Pr;
>>
>>     wFile = '/Logistix/Events/SE20150225183816276.xml';
>>     rc = http_parse_xml_stmf( wFile
>>          : 1208
>>          : %paddr(StartOfElement)
>>          : %paddr(EndOfElement)
>>          : *Null);
>>     If rc <> *Zero;
>>       //  Error processing;
>>       http_error(err);
>>       http_crash();
>>     EndIf;
>>
>>                         
>>      Dcl-Proc EndOfElement;
>>        Dcl-PI *n;
>>          UserData            Pointer;
>>          depth               Int(10);
>>          name                VarChar(1024)  Const;
>>          path                VarChar(24576) Const;
>>          value               VarChar(65535) Const;
>>          attrs               Pointer        Dim(32767)
>>                                             Const Options(*VarSize);
>>        End-Pi;
>>                                                                      
>>        Dcl-S  count          Int(10);
>>        Dcl-S  attrname       VarChar(1024);
>>        Dcl-S  attrval        VarChar(65535);
>>                                                                 
>>      // Pick Update
>>      If path = '/PickUpdate'
>>              + '/Locations'
>>              + '/Location'
>>              + '/Items'
>>              + '/Item';
>>        If name = 'AI';
>>          wCatchWeight = *Off;
>>          count = 1;
>>          Dow http_nextXmlAttr(attrs: count: attrname: attrval);
>>            If attrname = 'ID';
>>              If attrval = '3202';
>>                wCatchWeight = *On;
>>              EndIf;
>>
>>              EndIf;
>>            EndDo;
>>            If wCatchWeight;
>>              wIndex += 1;
>>              RandomWeight(wIndex) = %Dec(value:9:2);
>>            EndIf;
>>          EndIf;
>>        EndIf;
>>                      
>>     End-Proc EndOfElement;
>>
>> Here is the ifs file:
>>
>> <PickUpdate ID="593" WarehouseID="0001" PickID="3619052"
>> AssignmentNumber="011289769" User="101" Quantity="1"
>> ItemNumber="38564" Ord derNumber="1627531" OrderLineNumber="19-000"
> xmlns="">
>>     <Time>2015-02-24T19:47:09</Time>
>>
>>     <Locations>
>>
>>       <Location Aisle="AE" Slot="321" Quantity="1"
>> Verification="SCANNED">
>>
>>         <Items>
>>
>>           <Item ID="1" EntryMethod="SCANNED"
>> Barcode="01000680620222241716111910009">
>>
>>             <AI ID="1" EntryMethod="SCANNED">00068062022224</AI>
>>
>>             <AI ID="17" EntryMethod="SCANNED">11/19/2016 12:00:00 
>> AM</AI>
>>
>>             <AI ID="10" EntryMethod="SCANNED">009</AI>
>>
>>           </Item>
>>
>>         </Items>
>>
>>         <LabelBarcodes>
>>
>>           <LabelBarcode>3619052</LabelBarcode>
>>
>>         </LabelBarcodes>
>>
>>       </Location>
>>
>>     </Locations>
>> </PickUpdate>
>>
>>                                     
>> I get the error on this line:
>>            Dow http_nextXmlAttr(attrs: count: attrname: attrval);
>>
>> I've debugged and stepped into the http_nextXmlAttr proc and it 
>> happens before the first line of code is executed.  Could it be that 
>> the xml is using the same name(AI) 3 times?
>>
>> Any help is greatly appreciated.
>>
>> Thanks,
>>
>> Kevin
>>
>>
>> ---------------------------------------------------------------------
>> -
>> - This is the FTPAPI mailing list.  To unsubscribe, please go to:
>> http://www.scottklement.com/mailman/listinfo/ftpapi
>> ---------------------------------------------------------------------
>> -
>> -
> ----------------------------------------------------------------------
> - This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> ----------------------------------------------------------------------
> -
>
> ----------------------------------------------------------------------
> - This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> ----------------------------------------------------------------------
> -
>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.
      *****************************************************************
      * Copyright  Logistix Software Solutions, LLC  2014             *
      *****************************************************************
       Ctl-Opt Copyright('Logistix Software Solutions, 2014')
               Option(*SrcStmt: *NoDebugIO)
               DatEdit(*MDY)
               DatFmt(*MDY)
               DftActGrp(*NO)
               ActGrp(*CALLER)
               PgmInfo(*PCML:*MODULE)
               Bnddir('HTTPAPI');

      /copy qrpglesrc,httpapi_h
      /copy qrpglesrc,ifsio_h

        Dcl-PI  SelectorProExport   ExtPgm('CALLIT6');
        End-PI;

        Dcl-PR  StartOfElement;
          UserData            Pointer;
          depth               Int(10);
          name                VarChar(1024)  Const;
          path                VarChar(24576) Const;
          value               VarChar(65535) Const;
          attrs               Pointer        Dim(32767)
                                             Const Options(*VarSize);
        End-Pr;

        Dcl-Pr EndOfElement;
          UserData            Pointer;
          depth               Int(10);
          name                VarChar(1024)  Const;
          path                VarChar(24576) Const;
          value               VarChar(65535) Const;
          attrs               Pointer        Dim(32767)
                                             Const Options(*VarSize);
        End-Pr;

        Dcl-DS SDS PSDS;
          JobNm               Char(10)       Pos(244);
          UsrNm               Char(10)       Pos(254);
          JobNb               Char(6)        Pos(264);
          PgmId               *Proc;
        End-DS SDS;

        Dcl-S  wCatchWeight   Ind;
        Dcl-S  rc             Int(10);
        Dcl-S  err            Int(10);
        Dcl-S  wIndex         Uns(5);
        Dcl-S  wDebugFile     VarChar(100);
        Dcl-S  wFile          VarChar(100);
        Dcl-S  DateTime       Uns(20);

        Dcl-S  fd             Int(10);
        Dcl-S  RandomWeight   Packed(9:2)    Dim(999);

        DateTime = %uns(%subst(%char(%timeStamp: *iso0): 1: 14));
        wDebugFile = '/home/raddatz/SR' + %EditC(DateTime:'X') + '.txt';
        http_debug(*ON: wDebugFile);
 		
        For wIndex = 1 to 999;
          RandomWeight(wIndex) = *Zero;
        EndFor;
        wIndex       = *Zero;

        wFile = '/home/raddatz/SE20150225183816276.xml';
        rc = http_parse_xml_stmf( wFile
             : 1208
             : %paddr(StartOfElement)
             : %paddr(EndOfElement)
             : *Null);
        If rc <> *Zero;
          //  Error processing;
          http_error(err);
          http_crash();
        EndIf;

        Return;

     p EndOfElement...
     p                 b
     d                 pi
     d  UserData                       *
     d  depth                        10i 0
     d  name                       1024a     const varying
     d  path                      24576a     const varying
     d  value                     65535a     const varying
     d  attrs                          *     Dim(32767)
     d                                       const Options(*VarSize)

          Dcl-S  count          Int(10);
          Dcl-S  attrname       VarChar(1024);
          Dcl-S  attrval        VarChar(65535);

          // Pick Update
          If path = '/PickUpdate'
                  + '/Locations'
                  + '/Location'
                  + '/Items'
                  + '/Item';
            If name = 'AI';
              wCatchWeight = *Off;
              count = 1;
              Dow http_nextXmlAttr(attrs: count: attrname: attrval);
                If attrname = 'ID';
                  If attrval = '3202';
                    wCatchWeight = *On;
                  EndIf;
                EndIf;
              EndDo;
              If wCatchWeight;
                wIndex += 1;
                RandomWeight(wIndex) = %Dec(value:9:2);
              EndIf;
            EndIf;
          EndIf;

     p                 e

        Dcl-Proc StartOfElement;

          Dcl-PI *n;
            UserData            Pointer;
            depth               Int(10);
            name                VarChar(1024)  Const;
            path                VarChar(24576) Const;
            value               VarChar(65535) Const;
            attrs               Pointer        Dim(32767)
                                               Const Options(*VarSize);
          End-Pi;

        End-Proc StartOfElement;
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------