swarm-support
[Top][All Lists]
Advanced

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

RE: problem with String create: setC:


From: Steve Brophy
Subject: RE: problem with String create: setC:
Date: Mon, 12 Oct 1998 08:45:58 -0400

Yes, this is more like the examples I intended (the
difference between globalZone and scratchZone).  Sorry,
I messed up cutting the example code into my message,
it should have had the initSwarm(argc,argv) before
the String code.

> -----Original Message-----
> From: Rick Riolo [SMTP:address@hidden
> Sent: Saturday, October 10, 1998 7:33 AM
> To:   address@hidden
> Cc:   Swarm Bugs
> Subject:      Re: problem with String create: setC:
> 
> 
> Marcus,
> But it does work---by that I mean it does not crash in
> the way he described.  (It may not be a functioning String 
> object....I don't know.)
> 
> But the case he gave that *doesn't* work also doesn't 
> work if its after initSwarm().
> I just tried this program (under swarm-1.3):
> 
> #import <simtoolsgui/GUISwarm.h>
> #import <simtoolsgui.h>
> 
> int main (int argc, const char ** argv) {
>   id key;
>   char *keystr = "a string";
> 
>   fprintf(stderr,"about to do [String create: scratchZone] BEFORE
> initSwarm...");
>   key =  [String create: scratchZone];
>   [key setC: keystr];
>   fprintf(stderr,"...done.\n");
> 
>   initSwarm(argc, argv);
> 
>   fprintf(stderr,"about to do [String create: scratchZone]...");
>   key =  [String create: scratchZone];
>   [key setC: keystr];
>   fprintf(stderr,"...done.\n");
> 
>   fprintf(stderr,"about to do...[String create: globalZone setC:
> keystr]");
>   key =  [String create: globalZone setC: keystr];
>   fprintf(stderr,"...done.\n");
> 
>   fprintf(stderr,"about to do...[String create: scratchZone setC:
> keystr]");
>   key =  [String create: scratchZone setC: keystr];
>   fprintf(stderr,"...done.\n");
> 
>   return 0;
> }
> 
> Here is the output on running it:
> 
> badger-rlr)stest
> about to do [String create: scratchZone] BEFORE initSwarm......done.
> about to do [String create: scratchZone]......done.
> about to do...[String create: globalZone setC: keystr]...done.
> about to do...[String create: scratchZone setC: keystr]error: 
> ComponentZone_c (instance)
> ComponentZone_c does not recognize allocBlock:
> IOT trap (core dumped)
> badger-rlr)
> 
> Note that it crashes in the same way if one takes out the
> lines before the initSwarm, as well. Here is output after I 
> #ifdef-ed those first lines out:
> 
> badger-rlr)stest
> about to do [String create: scratchZone]......done.
> about to do...[String create: globalZone setC: keystr]...done.
> about to do...[String create: scratchZone setC: keystr]error: 
> ComponentZone_c (instance)
> ComponentZone_c does not recognize allocBlock:
> IOT trap (core dumped)
> 
> It also fails if I just do an initSwarm and the +create:setC:
> with scratchZone as the only thing in the program:
> 
> badger-rlr)stest
> about to do...[String create: scratchZone setC: keystr]error: 
> ComponentZone_c (instance)
> ComponentZone_c does not recognize allocBlock:
> IOT trap (core dumped)
> badger-rlr)
> 
> There does seem to be some difference between scratchZone
> and globalZone, and scratchZone seems to be the one that makes
> String+create:setC: fail when it shouldn't (at least according
> to the String man page).
> 
> - r
> 
> Rick Riolo                           address@hidden
> Program for Study of Complex Systems (PSCS)
> 4477 Randall Lab                
> University of Michigan         Ann Arbor MI 48109-1120
> Phone: 734 763 3323                  Fax: 734 763 9267
> http://www.pscs.umich.edu/PEOPLE/rlr-home.html
> 
> On 9 Oct 1998, Marcus G. Daniels wrote:
> 
> > Date: 09 Oct 1998 14:30:30 -0700
> > From: Marcus G. Daniels <address@hidden>
> > To: address@hidden
> > Subject: Re: problem with String create: setC:
> > 
> > >>>>> "SB" == Steve Brophy <address@hidden> writes:
> > 
> > SB> This test program works:
> > 
> > #import <simtools.h>
> > int
> > main (int argc, const char **argv)
> > {
> >     id key;
> >     key = [String create: globalZone setC: "testing"];
> > }
> > 
> > But it shouldn't:  you need to run initSwarm before anything else.
> > 
> > 
> >                   ==================================
> >    Swarm-Support is for discussion of the technical details of the
> day
> >    to day usage of Swarm.  For list administration needs (esp.
> >    [un]subscribing), please send a message to
> <address@hidden>
> >    with "help" in the body of the message.
> >                   ==================================
> > 
> 
>                   ==================================
>    Swarm-Support is for discussion of the technical details of the day
>    to day usage of Swarm.  For list administration needs (esp.
>    [un]subscribing), please send a message to <address@hidden>
>    with "help" in the body of the message.
>                   ==================================

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]