FIX: FoxPro UNIX Terminates Abnormally Returning a Signal 11

Last reviewed: November 26, 1997
Article ID: Q139309
2.60 UNIX kbprg kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft FoxPro for UNIX, version 2.6

SYMPTOMS

While in an edit region on a running screen, if the user of the screen presses the ENTER key after each line of text that is entered, eventually FoxPro will terminate abnormally to the UNIX system prompt. At the UNIX system prompt, immediately after FoxPro terminates, if the user types the following command, the number 11 is returned, which is the UNIX signal code for a "Segmentation Violation."

   echo _$?

CAUSE

A Segmentation Violation error tells the user that the process that was running tried to write to a memory segment that the process did not own.

This can occur when the user is in an edit region because of a problem with FoxPro version 2.6 for UNIX. The portion of FoxPro that handles edit regions on a screen does not account correctly for carriage returns and line feeds. FoxPro attempts to write to memory past the end of the buffer containing the text that the user is entering.

This error tends to be intermittent, and may be hard to duplicate. Nevertheless, given the right circumstances, this error will occur when leaving an edit region.

WORKAROUND

To correct this problem, the user may type in the following script and run it to patch the FoxPro binary file. Follow these steps to apply the patch script:

  1. Log on to the UNIX host in single-user mode, or log in as root and make sure no other users are using FoxPro.

  2. Make a copy of the current FoxPro binary file to protect against accidents. To copy the FoxPro binary file, run the following commands at the UNIX system prompt:

    cd /usr/lib/foxpro cp foxpro.pr oldfoxpro.pr

  3. If the error occurs while running FoxPro itself, type the following script code using a UNIX text editor such as vi.

          ----- Beginning of code for FoxPro.
          ----- begin pfix -- save the contents into a file and make
          ----- executable with "chmod +x <filename>"
          echo "Fixes problem with the edit region ..."
          /etc/_fst foxpro.pr << EOF
          0x17:0x1444aa?X\
          $q
          EOF
          echo "If 0x8ec83ec is displayed above press y to continue: \c"
          read foo
          if [ "$foo" != "y" ]
          then exit 0
          fi
          /etc/_fst -w foxpro.pr << EOF
          0x17:0x1444aa?W 800068ec
          0x17:0x1444ae?W 458b0000
          0x17:0x1444b2?W 54408b08
          0x17:0x1444b6?W 5002e0c1
          0x17:0x1444ba?W 9844de8
          0x17:0x1444be?W 8b909000
          $q
          EOF
          ----- End of code.
    

    If the error occurs while running a FoxPro executable, use the following code:

          ----- Beginning of code for FoxPro executable.
          ----- begin pfix -- save the contents into a file and make
          ----- executable with "chmod +x <filename>"
          echo “Fixes problem with the edit region ...”
          /etc/_fst foxr.pr << EOF
          0x17:0xd2452?X\
          $q
          EOF
          echo “If the string:  0x8ec83ec is displayed above press y to
    
            continue: \c”
          read foo
          if [ “$foo” != “y” ]
          then exit 0
          fi
          /etc/_fst -w foxr.pr << EOF
          0x17:0xd2452?W 800068ec
          0x17:0xd2456?W 458b0000
          0x17:0xd245a?W 54408b08
          0x17:0xd245e?W 5002e0c1
          0x17:0xd2462?W 84a89e8
          0x17:0xd2466?W 8b909000
          $q
          EOF
          ----- End of code.
    
    

  4. Save the script file, and name it pfix. Enter the following command to make the script file executable:

    chmod +x pfix

  5. Carefully compare the contents of the script file with the script text shown in step 3. Then execute the script by typing the following command at the UNIX system prompt:

    ./pfix

Once this script has run successfully, the FoxPro binary will have been patched.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem is correctable by applying the patch script described in the "Workaround" section of this article.


Additional reference words: 2.60 FoxUnix buglist2.60 patch error 11 edit
region
KBCategory: kbprg kbbuglist kbfixlist
KBSubcategory: FxprgGeneral
Keywords : FxprgGeneral kbbuglist kbfixlist kbprg
Version : 2.60
Platform : UNIX
Solution Type : kbfix


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 26, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.