locked
EditPoint.FindPattern RegularExpression Throws AccessViolationException RRS feed

  • Question

  • I'm trying to use
    EditPoint.FindPattern(pattern,EnvDTE.vsFindOptions.vsFindOptionsRegularExpression,endPoint, tags)

    I kept getting AccesViolationException. Even when pattern = ".*"

    What am I doing wrong?

    Sunday, November 24, 2013 3:14 PM

Answers

  • Hi Tedy Pranolo,

    Do you use .NET4.0? From MSDN, we see the AccessViolationException() exception that is thrown when there is an attempt to read or write protected memory. Please add a line to your application's config file under the configuration/runtime element:

    <runtime>
        <legacyCorruptedStateExceptionsPolicy enabled="true" />
    </runtime>
    More information, please read http://msdn.microsoft.com/en-us/library/dd638517 .
    If it doesn't work for you, please feel free to let me know and provide us with details. 
    • Marked as answer by Anna Cc Wednesday, December 4, 2013 3:19 AM
    Monday, November 25, 2013 9:38 AM