From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ade59281d0eea302 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e65g2000hsc.googlegroups.com!not-for-mail From: "andrew.carroll@okstate.edu" Newsgroups: comp.lang.ada Subject: Re: STORAGE_ERROR : EXCEPTION_STACK_OVERFLOW Date: 12 Apr 2007 09:00:37 -0700 Organization: http://groups.google.com Message-ID: <1176393637.422391.310300@e65g2000hsc.googlegroups.com> References: <1175494388.509572.267790@l77g2000hsb.googlegroups.com> <1176259776.630617.50120@e65g2000hsc.googlegroups.com> NNTP-Posting-Host: 139.78.128.110 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1176393637 14401 127.0.0.1 (12 Apr 2007 16:00:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 12 Apr 2007 16:00:37 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: e65g2000hsc.googlegroups.com; posting-host=139.78.128.110; posting-account=Kq9unQ0AAADh_grEViI3JGqegXKDDjxt Xref: g2news1.google.com comp.lang.ada:14943 Date: 2007-04-12T09:00:37-07:00 List-Id: On Apr 11, 4:31 pm, Simon Wright wrote: > Looking over your first complete posted code, I see that the procedure > schema_types.createtable has an unusual approach when writing the > schema to the file. This is "fixed" by moving the schema'output to its own file. > Normally you rely on the compiler to support streaming through the > inbuilt 'Output, 'Input, 'Wrtte, 'Read operations. The only place > where this falls down in your code is when outputting the contents of > attributes (an array of classwide pointers to attributes). > > The approach I'd start with is to override the default 'Output and > 'Input for attribute_types.attribute_ptr so that what you write to > disk is the thing designated by the pointer, and when you read back > you allocate the appropriate memory and return the pointer > .. something like > > return new attribute'class (attribute'class'input (fin)); I did something similar, AND IT WORKS!!! FINALLY!!!!!!!!!!!!!!!!!! I did: temp : attribute_array_ptr; ... temp(x) := new attribute'class'(attribute'class'input(stream(fin))); I can also do: attribute'class'output(stream(fout), temp(x).all); and the program is functioning as I had hoped. After reading Simon's post and reading http://www.grammatech.com/rm95html-1.0/rm9x-13-13-02.html it dawned on me that I was just using the attribute'input / attribute'output and not including the 'class part, which is the only way to tell what the actual type is for dispatching. duh! > > This would completely remove all the hand-written stuff about > outputting and inputting the different attribute records. Yep, it did. > I noticed when trying with T3 that the file's index (p fin.all in the > debugger) was 104 which is not in any sensible position in the > file. Something has got confused (I restored the commented-out line in > schema_types.loadtable that actually reads attribute info back, no > idea if it's getting called ... no, seems not) Resolved.