BUG: _CLIPTEXT Variable Causes GP Fault in Debug Window

Last reviewed: November 21, 1995
Article ID: Q123452
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 = <Memory Var>

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.

MORE INFORMATION

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.