Web Analytics Made Easy -
StatCounter Common Language Runtime detected an invalid program - CodingForum

Announcement

Collapse
No announcement yet.

Common Language Runtime detected an invalid program

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Common Language Runtime detected an invalid program

    I have an aspx page that I send an ajax form submission to. This aspx page has a couple thousand lines of conditional statements and does some calculations which then spits an xml document out to me. This is been working great for the better part of a year.

    Yesterday, someone added in some new conditions and I get the error:

    System.InvalidProgramException: Common Language Runtime detected an invalid program

    Line 427:<caution cid="113" applies_to="ALL" specific_flg="Y" location="loan_parameters_yields">
    Line 428:<![CDATA[Max cash out for Investor transactions cannot exceed $50,000.]]></caution>
    Line 429:<%END IF%>Line 430:
    Line 431:

    Code:
    Stack trace:    at ASP.calculatetodd_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)
       at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
       at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
       at System.Web.UI.Page.Render(HtmlTextWriter writer)
       at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
       at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
       at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    Now we have been up and down this thing (like 3 different sets of eyes). We find no syntax errors. The strange thing is if we take out a few of the conditional statement, anywhere in the document, top, bottom, middle, doesn't matter,everything works fine. I'll also add that regardless of what part of the program is executed first (if I rearrange the order of the conditions), I still just get the error on the last line. Does someone know what might be causing this? Perhaps I need to break this up into a couple of calls. . . .

    Here is an example of the conditions as well:

    Code:
    <%IF programtype=2 and textcltv=100 and reservesseasoning=2 THEN%>
    <caution cid="91" applies_to="ALL" specific_flg="Y" location="assets_yields">
    <![CDATA[Assets must be seasoned a minimum of 60 days on the Hybrid 5yr 100% CLTV program. 2 months bank statements or a fully completed VOD is required.]]></caution>
    <%END IF%>
    
    <%IF ((programtype=1 and subordinate=4) OR (programtype=2 and textcltv=100)) AND  firsttime = 1 AND purpose = 1 AND documentation=1 AND trades>4 THEN%>
    <caution cid="108" applies_to="ALL" specific_flg="Y" location="credit_report_yields">
    <![CDATA[Please note:  This program requires a minimum of 4 tradelines. Alternative Tradelines cannot be used to meet this requirement.]]></caution>
    <%END IF%>
    
    <%IF ((programtype=1 and subordinate=4) OR (programtype=2 and textcltv=100))  AND purpose=2 AND documentation>1 AND documentation<4 AND trades>4 THEN%>
    <caution cid="109" applies_to="ALL" specific_flg="Y" location="credit_report_yields">
    <![CDATA[Please note:  This program requires a minimum of 4 tradelines. Alternative Tradelines cannot be used to meet this requirement.]]></caution>
    <%END IF%>
    
    <%IF ((programtype=1 and subordinate=4) OR (programtype=2 and textcltv=100)) AND purpose=2 AND documentation=1 AND trades>4 THEN%>
    <caution cid="110" applies_to="ALL" specific_flg="Y" location="credit_report_yields">
    <![CDATA[Please note:  This program requires a minimum of 4 tradelines. Alternative Tradelines cannot be used to meet this requirement.]]></caution>
    <%END IF%>
    Edit: I've come to think this is a bug in the compiler. After fiddling with it all day it seems the only way to fix this is to reduce the number of conditional statements the program runs. Since that isn't really an option I get to do some major rework, I'm so very excited. If someone knows of another reason this could be happening feel free to let me know.


    Any help appreciated,
    Basscyst
    Last edited by Basscyst; Oct 3, 2006, 08:50 PM.
    Helping to build a bigger box. - Adam Matthews
Working...
X