From: "andrew.carroll@okstate.edu" <andrew.carroll@okstate.edu>
Subject: Re: STORAGE_ERROR : EXCEPTION_STACK_OVERFLOW
Date: 12 Apr 2007 09:00:37 -0700
Date: 2007-04-12T09:00:37-07:00 [thread overview]
Message-ID: <1176393637.422391.310300@e65g2000hsc.googlegroups.com> (raw)
In-Reply-To: <m2d52afvj6.fsf@mac.com>
On Apr 11, 4:31 pm, Simon Wright <simon.j.wri...@mac.com> 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.
<A HUGE SIGH OF RELIEF>
next prev parent reply other threads:[~2007-04-12 16:00 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-02 6:13 STORAGE_ERROR : EXCEPTION_STACK_OVERFLOW andrew.carroll
2007-04-02 10:10 ` Stephen Leake
2007-04-02 14:11 ` andrew.carroll
2007-04-02 18:43 ` andrew.carroll
2007-04-02 21:48 ` Georg Bauhaus
2007-04-02 21:40 ` andrew.carroll
2007-04-03 10:25 ` Georg Bauhaus
2007-04-03 17:07 ` andrew.carroll
2007-04-03 19:43 ` Simon Wright
2007-04-03 21:32 ` andrew.carroll
2007-04-04 0:49 ` Georg Bauhaus
2007-04-04 0:32 ` andrew.carroll
2007-04-05 18:28 ` Georg Bauhaus
2007-04-09 13:12 ` andrew.carroll
2007-04-09 18:19 ` Georg Bauhaus
2007-04-10 13:22 ` andrew.carroll
2007-04-10 15:07 ` Ludovic Brenta
2007-04-10 20:55 ` andrew.carroll
2007-04-10 22:17 ` Georg Bauhaus
2007-04-10 21:43 ` andrew.carroll
2007-04-12 8:32 ` Ludovic Brenta
2007-04-11 1:55 ` Jeffrey R. Carter
2007-04-11 2:34 ` andrew.carroll
2007-04-05 0:56 ` andrew.carroll
2007-04-02 20:45 ` Simon Wright
2007-04-02 21:47 ` andrew.carroll
2007-04-02 22:05 ` andrew.carroll
2007-04-03 0:09 ` Randy Brukardt
2007-04-11 2:49 ` andrew.carroll
2007-04-11 8:07 ` Georg Bauhaus
2007-04-11 21:31 ` Simon Wright
2007-04-12 16:00 ` andrew.carroll [this message]
2007-04-12 19:08 ` Simon Wright
2007-04-12 13:48 ` andrew.carroll
2007-04-12 15:49 ` Georg Bauhaus
-- strict thread matches above, loose matches on Subject: below --
2005-08-05 0:55 Adaddict
2005-08-05 1:21 ` Adaddict
[not found] <20050709100024.322314C41FD@lovelace.ada-france.org>
2005-07-09 12:29 ` Robert C. Leif
[not found] <200507082148.j68LmXhG002695@mail733.megamailservers.com>
2005-07-09 9:27 ` Marius Amado Alves
2005-07-09 19:14 ` Duncan Sands
2005-07-08 21:48 Robert C. Leif
2005-07-09 3:52 ` John B. Matthews
2005-07-12 0:29 ` jim hopper
2005-07-09 22:55 ` Björn Persson
2005-07-11 10:15 ` Alex R. Mosteo
2005-07-11 20:07 ` Keith Thompson
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox