[futurebasic] Re: STR#

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1997 : Group Archive : Group : All Groups

From: Rick Brown <rbrown@...>
Date: Sat, 27 Dec 1997 21:32:29 +0000
Terrald J. Smith wrote:
> 
> Guys.....I'm still having MAJOR problems with the STR# resource.  They
> keep getting destroyed.  I am using the call update thing and that has
> elimiated the type -39 error but the resources are corrupted on a daily
> basis, sometimes several times a day.  Some involve System 7.5.5 some on
> Os 8.
> 
> I doubt this is an extension thing but then I don't know much about the
> STR# stuff anyway.  In some situations, there is nothing being done but
> reading the strings.
> 
> Any ideas or places that I could find some ideas about this.  Please,
> this is very important.

How much data are you creating as STR# resources?  There are limits to
how many strings you can put in a STR# resource, how long each string
can be, what the total size of the resource can be, and how many total
resources (of any kind) that you can have in your file.  Sometimes the
Resource Manager does not handle the situation very elegantly if you
exceed the numbers.  According to my notes, the limits are as follows:

* Max number of strings in a STR# resource: 32,767
* Max characters per string: 255
* Maximum number of resources (of all kinds) per file: 2729 (this
  is an _absolute_ maximum: the actual limit can be smaller
  depending on circumstances)
* Maximum size (in bytes) of the resource fork: 16 MB

Do you think you might be approaching any of these limits?

In cases where you're "just reading" the strings, is it possible that
you (or some other process) are calling CHANGEDRESOURCE on them?  That
could cause them to be re-written to the disk, conceivably in corrupt
form.

- Rick