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

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



Kevin,

You are welcome.

Did you submit a problem report to IBM?

Thomas.

-----Ursprüngliche Nachricht-----
Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Kevin Wengert
Gesendet: Dienstag, 3. März 2015 00:06
An: 'HTTPAPI and FTPAPI Projects'
Betreff: RE: AW: Space offset X'0008A000' or X'0000000000000000' is outside current limit

Thomas and Scott,

Just wanted to say thanks.  I converted the procedure interface specs back to the "old" format and my program is working correctly.

Thanks,

Kevin

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

Hi Thomas,

I have been coming to the same conclusion.

His prototypes were wrong as you said  -- he i spassing userdata incorrectly, and has an extra parameter in startOfElement.  But since he's not using these parameters, it should not break the program, and indeed, fixing these does not help.

I noticed, however, that if I do not call the HTTP_nextXmlAttr() procedure, the problem goes away.  For example, if EndOfElement is coded as follows, it seems to work fine, but I do not understand why:

         Dcl-Proc EndOfElement;
           Dcl-PI *n;
             UserData            Pointer value;
             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);
           Dcl-S  p1 pointer;
           Dcl-s  p2 pointer;

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

         End-Proc EndOfElement;


I've spent the last three hours trying to figure out why this works and HTTP_nextXMlElement does not...  they do almost exactly the same thing.  
But, I cannot see the problem.  It's now 2:45am, and I really need to go to bed as I have to work in the morning...

So, I don't know what the problem could be.  If anyone sees it, please let me know.

-SK

On 2/27/2015 1:47 AM, Thomas Raddatz wrote:
> Kevin,
>
> First I fixed a few minor errors:
>
> a) added "value" keyword to parameters "userData" and "depth"
> b) removed parameter "value" from "StartOfElement"
>
> Since that did not fix the error I translated the program to "standard"
/free, which fixed the problem!
>
> Eventually I compared the compiler listings and found no differences. 
> That
makes me believe that the problem is a compiler defect.
>
> 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.
>
>
> ----------------------------------------------------------------------
> - 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.

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