Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Execscript() Crashing Build -- Bug?
Message
From
07/12/2006 08:59:17
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
06/12/2006 14:22:18
Spencer Redfield
Managed Healthcare Northwest, Inc.
Portland, Oregon, United States
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
01175348
Message ID:
01175582
Views:
6
Ooops,

after the C0..5 my pjx is gone (Error 1685)

Agnes
>I stumbled upon an unexpected problem found in both VFP 8 SP1 and 9 SP1.
>
>Background: I added additional lines to our original EXECSCRIPT() parameter and, from the command window, the changes ran fine. (This EXECSCRIPT() parameter string is legal.)
>
>However, whenever I attempted to compile the project it quickly crashed with the dreaded C000005 error. The identical behavior occurs on my manager's machine. Changing the FOXUSER resource file, my first guess, makes no difference.
>
>A workaround is to add the parameter value indirectly via a variable. Is this a bug or is this behavior documented? Simple repro code follows:
>
>#IF ( .T. )
>    * This builds just fine
>    lcOnF3Script =  ;
>        "local lcTagName"       + chr(13) + chr(10) + ;
>        "local lnTagHit"        + chr(13) + chr(10) + ;
>        "gcHowExited='F3'"      + chr(13) + chr(10) + ;
>        "select 'AltProvFacil'" + chr(13) + chr(10) + ;
>        "ATagInfo(laTheTags,'AltProvFacil')"    + chr(13) + chr(10) + ;
>        "lnTagHit = ascan( laTheTags, 'SSN', -1, -1, 1, 15 )"  + chr(13) + chr(10) + ;
>        "if ( empty( m.lnTagHit ) )"                           + chr(13) + chr(10) + ;
>        "    lnTagHit=ascan( laTheTags, 'TIN', -1, -1, 1, 15 )"+ chr(13) + chr(10) + ;
>        "endif"    + chr(13) + chr(10) + ;
>        "lcTagName=laTheTags[ m.lnTagHit, 1 ]"    + chr(13) + chr(10) + ;
>        "lcTagName=iif(order()=='DISPLORDER', m.lcTagName, 'DisplOrder' )" ;
>            + chr(13) + chr(10) + ;
>        "set order to (m.lcTagName)"    + chr(13) + chr(10) + ;
>         "KEYBOARD '{Esc}' plain"
>    * Inserting the parameter text using a varialble
>    on key label "F3"    execscript( m.lcOnF3Script )
>#ELSE
>    * This crashes a build under both VFP 8 SP1 and VFP 9 SP1
>    *
>    * Inserting the same text directly causes a C0000005 error when
>    * the project is built and yields no clue as to the cause!
>    *
>    * (Note: In a .PRG run from the command line the following
>    * will run without problem -- until a build is attempted.)
>    *
>    on key label "F3" execscript( ;
>        "local lcTagName" + chr(13) + chr(10) + ;
>        "local lnTagHit"        + chr(13) + chr(10) + ;
>        "gcHowExited='F3'"      + chr(13) + chr(10) + ;
>        "select 'AltProvFacil'" + chr(13) + chr(10) + ;
>        "ATagInfo(laTheTags,'AltProvFacil')"    + chr(13) + chr(10) + ;
>        "lnTagHit = ascan( laTheTags, 'SSN', -1, -1, 1, 15 )"  + chr(13) + chr(10) + ;
>        "if ( empty( m.lnTagHit ) )"                           + chr(13) + chr(10) + ;
>        "lnTagHit=ascan( laTheTags, 'TIN', -1, -1, 1, 15 )"    + chr(13) + chr(10) + ;
>        "endif"    + chr(13) + chr(10) + ;
>        "lcTagName=laTheTags[ m.lnTagHit, 1 ]"    + chr(13) + chr(10) + ;
>        "lcTagName=iif(order()=='DISPLORDER', m.lcTagName, 'DisplOrder' )"    ;
>            + chr(13) + chr(10) + ;
>        "set order to (m.lcTagName)" + chr(13) + chr(10) + ;
>         "KEYBOARD '{Esc}' plain"     )
>#ENDIF
>
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform