Microsoft KB Archive/123452

{| = BUG: _CLIPTEXT Variable Causes GP Fault in Debug Window =
 * width="100%"|

ID: Q123452

2.50 2.50a 2.50b 2.60 2.60a | 2.50 2.50a 2.50b 2.60 2.60a

WINDOWS                    | MS-DOS kbtool kbbuglist The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5x, 2.6x
 * Microsoft FoxPro for MS-DOS, versions 2.5x, 2.6x

SYMPTOMS
A general protection (GP) fault occurs when you store a value that exceeds 254 characters in the _CLIPTEXT system memory variable while attempting to type additional characters in the Debug window.

RESOLUTION
The _CLIPTEXT system memory variable has an internal storage limit of 254 characters. To copy larger amounts of text to the clipboard, you must store the text data to a memory variable as in this example:

_CLIPTEXT =  This way, you can copy blocks of text exceeding 254 characters to the clipboard. Also, by storing memory variables to _CLIPTEXT in this manner, you increase the clipboard capacity based on the amount of memory available. To avoid a GP fault and still use Debug, store the characters into a memory variable prior to using _CLIPTEXT in the Debug window. The following code illustrates how the data could be stored prior to using the variable in the Debug Window.


 * Type the following commands from the Command window;

MODIFY COMMAND Clipit

* Program Clipit comments start here. * The program will store a replicated value to a memory variable. * Then the variable value is stored into the system memory variable * called _CLIPTEXT. *  * Initialize memory variables. M = 0      && Multiplier Value S = " "    && String value to replicate R = " "    && Contains the Result of replication. CLEAR      && Clear the initial display screen. @ 1,5 SAY "Enter Value for Multiplier " GET M  @ 3,5 SAY "Enter Symbol to replicate " GET S   READ R = Replicate("&S",(M)) _CLIPTEXT = R+" ** End of String ** " && Store value to _cliptext ? _CLIPTEXT                           && Display Results * End of Clipit program.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Steps to Reproduce Problem
1. Start FoxPro for MS-DOS or FoxPro for Windows.

2. In the Command window, type _CLIPTEXT=REPLICATE("*",255).

3. Activate the Debug Window.

4. Press CTRL+V to paste the cliptext into the Debug Window.

5. Immediately type 1234567890.

6. Click the bottom left scroll box of the Debug Window and drag it all the

way to the right. 7. You should see ***1u (actually that is an umlaut "u"). 8. When you click the "u," a GP fault occurs in Windows, or an application

error occurs in MS-DOS. NOTE: After you paste the asterisks, the bottom scroll box does not move all the way left as it should. Additional reference words: FoxWin FoxDos 2.50 2.50a 2.50b 2.60 2.60a buglist2.50 buglist2.50a buglist2.50b buglist2.60 buglist2.60a edit cut copy paste GPF KBCategory: kbtool kbbuglist KBSubcategory: FxtoolDebug

Keywords         : FxtoolDebug kbbuglist Version          : 2.50 2.50a 2.50b 2.60 2.60a | 2. Platform         : MS-DOS WINDOWS
 * }