string space corrupt error 
Author Message
 string space corrupt error

here's the situation.  i have several QB 6.0 programs which chain each
other based on menu selections made by the user.  they share COMMON
variables and arrays.  in one program i am getting a 'String Space Corrupt
in Line xxxxx' error while trying to open a random file at about 450 bytes.
i recompiled the program with a /D switch to check for 'Subscript out of
Range' errors an the 'String Space Corrupt' error disappeared.  however,
i am now getting 'Out of DATA' and 'Syntax Error in DATA' errors in a REM
$INCLUDE of the program.  these errors are bogus and i believe are being
caused by whatever caused the 'String Space Corrupt' error.  The 'String
Space Corrupt' error is also in a REM $INCLUDE, but not the same one as the
latter errors.  in the same REM $INCLUDE which i was getting the 'String
Space Corrupt' error, there is an assembly language routine which searches
for directory entries matching a specified pattern.  what is up ?  what
could be causing the 'String Space Corrupt' error ?  how can i find it ?
why does the /D switch hide it ?

Thanks for the help,


or reply to this newsgroup.

Shake



Tue, 04 Mar 1997 07:10:08 GMT  
 string space corrupt error

Quote:


>Subject: string space corrupt error
>Date: Thu, 15 Sep 1994 23:10:08 GMT

[munch]
  in the same REM $INCLUDE which i was getting the 'String
Quote:
>Space Corrupt' error, there is an assembly language routine which searches

[crunch]
My plain guess is that your ASM subroutine returns something that QB can't
handle.

Greetings,

 ----------------------------------------
| I don't believe in a no-win scenario.  |
|               - Admiral James T. Kirk  |
 ----------------------------------------



Wed, 05 Mar 1997 19:29:48 GMT  
 string space corrupt error
Quote:



>>Subject: string space corrupt error
>>Date: Thu, 15 Sep 1994 23:10:08 GMT

>[munch]
>  in the same REM $INCLUDE which i was getting the 'String
>>Space Corrupt' error, there is an assembly language routine which searches
>[crunch]
>My plain guess is that your ASM subroutine returns something that QB can't
>handle.

an ideas of what that may be ?
the manual suggest that SSC errors may be caused by ASM routines which
modify strings.  i believe my routine is doing that.  is there any way to
verify that is what is causing the error ?  is there any way to correct the
problem without changing the ASM routine ?

Thanks for the help,
Shake



Fri, 07 Mar 1997 07:55:02 GMT  
 string space corrupt error

Quote:


>Subject: Re: string space corrupt error
>Date: Sun, 18 Sep 1994 23:55:02 GMT

>writes:

>Heruty) writes:

>>>Subject: string space corrupt error
>>>Date: Thu, 15 Sep 1994 23:10:08 GMT
[crunch]
>>My plain guess is that your ASM subroutine returns something that QB can't
>>handle.

>an ideas of what that may be ?
>the manual suggest that SSC errors may be caused by ASM routines which
>modify strings.

[Del]
Well, I run VB, and am only guessing here on the assumption that there might
be similarities in VB and QB. What you should try is to Dim a string to be
fixed-length, and then initialize it, before calling the ASM sub. In VB syntax:
Dim S As String * 255       'For example
S = ""

Greetings,

 ----------------------------------------
| I don't believe in a no-win scenario.  |
|               - Admiral James T. Kirk  |
 ----------------------------------------



Sat, 08 Mar 1997 23:28:12 GMT  
 string space corrupt error

: here's the situation.  i have several QB 6.0 programs which chain each
: other based on menu selections made by the user.  they share COMMON
: variables and arrays.  in one program i am getting a 'String Space Corrupt
: in Line xxxxx' error while trying to open a random file at about 450 bytes.

1) make sure all you COMMON declarations are in a single include (*.BI)
file.  If module "A" has an integer as the 1st variable in common, &
Module B has a string as the 1st, you will get this a lot.  COOMON works
via variable position in CHAINed programs, not by variable name.

2) Force a garbage collection; often this generates an error closer to
the source of the corruption.  Insert some junk! = FRE("") statements
throughout your code.  Examine the code between the last successful one
and the one that triggers the error.  The culprit will be found there.
It may be FRE(0)-- look at the manual-- one of them does a garbage collection
first.

It also sometimes helps to insert line numbers before the FRE("") and
compile with /e.

3) Use DEFINT A-Z and/or use typing characters on all variable names if
you link to assembler libs.  Passing a float to an assy routine that
expects something else will cause this.

4) Can you say "Codeview"?

Good luck
--



Sun, 09 Mar 1997 11:42:24 GMT  
 string space corrupt error
: the manual suggest that SSC errors may be caused by ASM routines which
: modify strings.  i believe my routine is doing that.  is there any way to
: verify that is what is causing the error ?  is there any way to correct the
: problem without changing the ASM routine ?

: Thanks for the help,
: Shake

I have written ASM subs that modify passed strings and have not
encountered and problems doing this. However, it is a definite problem if
your ASM routine is changing the length of a passed string and then
returning it to QB. QB maintains string descriptors which tell it the
length of the string in question. When a call is made to an ASM program
and strings are passed, QB knows these lengths and expects them to be
unchanged upon their return. I do not know of any way to get around this
- others who read this group might.

You may want to re-examine the ASM routine and find out for sure what is
happening. You may even want to try replicating the ASM function in QB
(slow - I know) to test other parts of your program. This could help
you zero in on the problem.

I hope this helps,

Bob

--
 +-----------------------------------------------------------------------+

 +-----------------------------------------------------------------------+



Tue, 11 Mar 1997 23:41:54 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. String Space Corrupt error: Solved!

2. Corrupted String Space Problem

3. QB45-String Space Corrupt

4. QB45 with Assembler: String Space Corrupt!

5. "String Space Corrupt" in QB 4.5

6. Space Space Space Space Space Space Space

7. Space Space Space Space Space Space Space

8. Space Space Space Space Space Space Space

9. disabling the space key or removing a space from a string

10. Function to Squeeze multiple spaces in a string to one space

11. Out of String Space error in IE3.02

12. Out of string space (Error 14)

 

 
Powered by phpBB® Forum Software