Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsed.Failure.trace get Javascript heap out of memory error with large function #130

Open
hiepsieunhan opened this issue Sep 21, 2021 · 0 comments

Comments

@hiepsieunhan
Copy link

This function is invalid (with redundant ; at the end). Parsing this function returns result: Parsed.Failure, but calling result.trace() cause the out of memory error (in browser). Note that this doesn't happen with small functions

function(investortype)
    local isIndividual = investortype.value == "individual";
    local isJoint = investortype.value == "joint";
    local isRevocableTrust = investortype.value == "revocable trust";
    local isEntity = investortype.value != "" && !isIndividual && !isJoint && !isRevocableTrust;
    local isOther = investortype.value == "other";

    // individual
    local e1 = individualjoint.add("hide", !isIndividual && !isJoint);
    local e2 = marriedstatus2.add("hide", !isIndividual && !isJoint);
    local e6 = revocabletrust.add("hide", !isIndividual && !isJoint);
    local e7 = otherresidence_appendixa.add("hide", !isIndividual && !isJoint);
    local e8 = individual1.add("hide", !isIndividual && !isJoint);
    local e9 = individual3.add("hide", !isIndividual && !isJoint);
    local e10 = paragraph19.add("hide", !isIndividual && !isJoint);
    local e11 = paragraph23.add("hide", !isIndividual && !isJoint);
    local e13 = individual2.add("hide", !isIndividual);
    local e4 = individualName.add("hide", !isIndividual);
    local e5 = revocabletrust1.add("hide", !isIndividual && !isRevocableTrust);
    
    // joint
    local e14 = joint.add("hide", !isJoint);
    local e15 = radio1.add("hide", !isJoint);
    local e16 = joint_name.add("hide", !isJoint);
    local e17 = joint2.add("hide", !isJoint);
    
    // revocable trust
    local e18 = entitysname1.add("hide", !isRevocableTrust && !isEntity);
    local e19 = entity1.add("hide", !isRevocableTrust && !isEntity);
    local e20 = individual.add("hide", !isRevocableTrust);
    local e21 = otherresidence_revocable.add("hide", !isRevocableTrust);
    local e22 = revocabletrust2.add("hide", !isRevocableTrust);
    local e23 = revocabletrust3.add("hide", !isRevocableTrust);
    local e24 = revocabletrust4.add("hide", !isRevocableTrust);
    local e25 = paragraph22.add("hide", !isRevocableTrust);
    local e26 = revocabletrust8.add("hide", !isRevocableTrust);
    local e27 = revocabletrust6.add("hide", !isRevocableTrust);
    local e29 = revocabletrust5.add("hide", !isRevocableTrust);
    local e30 = trustee.add("hide", !isRevocableTrust);
    
    // entity
    local e28 = entity1.add("hide", !isEntity);
    local e31 = entity2.add("hide", !isEntity);

    // other
    local e32 = other.add("hide", !isOther);

    local e33 = [];
    local e34 = [];
    local e35 = [];

    e1 + e2 + e4 + e5 + e6 + e7 + e8 + e9 + e10 + e11 + e13 + e14 + e15 + e16 + e18 + e19 + e20 + e21 + e22 + e23 + e24 + e25 + e26 + e27 + e28 + e29 + e30 + e31 + e32 + e33 + e34 + e35;
@hiepsieunhan hiepsieunhan changed the title Parse Failure trace get Javascript heap out of memory error with large function Parse.Failure.trace get Javascript heap out of memory error with large function Sep 21, 2021
@hiepsieunhan hiepsieunhan changed the title Parse.Failure.trace get Javascript heap out of memory error with large function Parsed.Failure.trace get Javascript heap out of memory error with large function Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant