身份不明的他死了吉姆问题

时间:2014-12-01 15:25:37

标签: javascript c# jquery twitter-bootstrap google-chrome

这与我的代码并不常见,但其中一位测试人员发现Chrome中的问题导致了 "他死了吉姆"在我的旧代码部分。即/ FF / Opera / safari无法以自己的方式复制问题。目前能够在Chrome版本39.0.2171.71 m(最新版本)中进行复制。我们在整个项目中使用第三方组件,仅限剑道。在到达我的作品所在的项目部分之前,所有这些都被浏览器看到(工作流程明智)。没有任何与网络相关的问题(No 500s或404s或505s等)JS控制台没有问题。因此,在尝试诊断并找出问题时,我有点不和。任何人都可以提供任何其他尝试测试以确定其原因吗?我已经通过修改源代码本身对此进行了测试。 JS很好,每当我删除实际的html(bootstrapped)它都会很好。

如果我删除这段代码,它会毫无问题地返回...

<div class="row">
    <div class="col-md-10" id="headerProp">
        <div class="row">
            <div class="col-md-6">
                @Html.LabelFor(i => i.PropertyTypeId)<br />
                @Html.Kendo().DropDownListFor(a => a.PropertyTypeId).BindTo(Model.PropertyTypeList).DataTextField("Text").DataValueField("Value").HtmlAttributes(new { @class = "form-control" }).Events(a => a.Change("changePropertyType").DataBound("changePropertyType"))
            </div>
            <div class="col-md-6">
                @Html.LabelFor(i => i.StatusOfProperty)<br />
                <select multiple id="StatusOfProperty" name="StatusOfProperty" class="form-control">
                    @foreach (var PropertyTypes in Model.StatusOfProperty)
                    {
                        <option value="@PropertyTypes" selected="selected">@PropertyTypes</option>
                    }
                </select>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                @Html.LabelFor(i => i.Description)<br />
                @Html.TextAreaFor(i => i.Description, new { style = "width:100%; height:164px;", @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
            </div>
        </div>
    </div>
    <div class="col-md-2" id="photoImageForProperty">
        <img id="propImage" src="@Model.PropertyImage" style="width:100%;" alt="" />
        <input type="button" class="k-button" value="Add / View" onclick="showGallery()" style="width:100%" />
    </div>
</div>
<div class="row">
    <div class="col-md-4">
        @Html.LabelFor(i => i.SerialNumber)<br />
        @Html.TextBoxFor(i => i.SerialNumber, new { style = "width:100%", @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
    </div>
    <div class="col-md-4">
        @Html.LabelFor(i => i.ModelNumber)<br />
        @Html.TextBoxFor(i => i.ModelNumber, new { style = "width:100%", @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
    </div>
    <div class="col-md-4">
        @Html.LabelFor(i => i.BrandName)<br />
        @Html.TextBoxFor(i => i.BrandName, new { style = "width:100%", @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        @Html.LabelFor(i => i.LocationRecovered, "Location Seized")
        @Html.TextBoxFor(a => a.LocationRecovered, new { style = "width:100%", @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        @Html.LabelFor(i => i.MonataryValue)<br />
        @Html.Kendo().NumericTextBoxFor(i => i.MonataryValue).Decimals(2).Format("c").Placeholder("$ 0.00").Max(Int16.MaxValue).Min(0).Spinners(false).HtmlAttributes(new { style = "width:100%" })
    </div>
    <div class="col-md-6">
        @Html.LabelFor(i => i.MonataryValueRecovered)<br />
        @Html.Kendo().NumericTextBoxFor(i => i.MonataryValueRecovered).Decimals(2).Format("c").Placeholder("$ 0.00").Max(Int16.MaxValue).Min(0).Spinners(false).HtmlAttributes(new { style = "width:100%" })
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <div class="col-md-12">@Html.LabelFor(i => i.Weight)</div>
        <div class="col-md-3">@Html.Kendo().NumericTextBoxFor(i => i.Weight).Decimals(2).Placeholder("0.00").Max(Int16.MaxValue).Min(0).Spinners(false).HtmlAttributes(new { style = "width:100%" })</div>
        <div class="col-md-9">
            @Html.TextBoxFor(m => m.UnitofWeight, new { @class = "form-control" })
        </div>
    </div>
    <div class="col-md-6">
        @Html.LabelFor(i => i.Quantity)<br />
        @Html.Kendo().NumericTextBoxFor(i => i.Quantity).Decimals(2).Placeholder("0.00").Spinners(false).Max(Int16.MaxValue).Min(0).HtmlAttributes(new { style = "width:100%" })
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        @Html.LabelFor(i => i.MasterEntityPersonId)<br />
        @Html.Kendo().DropDownListFor(i => i.MasterEntityPersonId).BindTo((IEnumerable<PropertyPersonViewModel>)ViewBag.casePeople).DataValueField("MasterpersonsEntityId").DataTextField("FullName").HtmlAttributes(new { @class = "form-control input-md" })
    </div>
    <div class="col-md-6">
        @Html.LabelFor(i => i.Color)<br />
        @Html.TextBoxFor(i => i.Color)
    </div>
</div>
<div id="recoveredLocation">
    <div class="row">
        <div class="col-md-12">
            <span>Recovered From:</span>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            @Html.LabelFor(a => a.location.Street)
            @Html.TextBoxFor(a => a.location.Street, new { @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            @Html.LabelFor(a => a.location.AptSuite)
            @Html.TextBoxFor(a => a.location.AptSuite, new { @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
        </div>
    </div>
    <div class="row">
        <div class="col-md-3">
            @Html.LabelFor(a => a.location.City)
            @Html.TextBoxFor(a => a.location.City, new { @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
        </div>
        <div class="col-md-3">
            @Html.LabelFor(a => a.location.State)
            @Html.TextBoxFor(a => a.location.State, new { @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
        </div>
        <div class="col-md-3">
            @Html.LabelFor(a => a.location.Zip)
            @Html.TextBoxFor(a => a.location.Zip, new { @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
        </div>
        <div class="col-md-3">
            @Html.LabelFor(a => a.location.County)
            @Html.TextBoxFor(a => a.location.County, new { @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
        </div>
    </div>
    <div class="row">
        <div class="col-md-6">
            @Html.LabelFor(a => a.DateRecovered)
            @Html.Kendo().DatePickerFor(a => a.DateRecovered).Format("MM/dd/yyyy")
        </div>
        <div class="col-md-6">
            @Html.LabelFor(a => a.Jurisdiction)
            @Html.TextBoxFor(a => a.Jurisdiction, new { @class = "k-textbox form-control", onblur = "this.value=this.value.toUpperCase();" })
        </div>
    </div>
</div>

我们使用MVC 4,C#,Razor语法

1 个答案:

答案 0 :(得分:0)

经过多次试验和错误,我找到了罪魁祸首。至少在我的情况下。对于我的剑道文本框,我设置了最大尺寸。而不是像999亿这样设置它我把它设置为Decimal.MaxValue和Int32.MaxValue。 Chrome不喜欢这样并发出内存溢出。其中有两个部分是:

 <div class="row">
    <div class="col-md-6">
        @Html.LabelFor(i => i.MonataryValue)<br />
        @Html.Kendo().NumericTextBoxFor(i => i.MonataryValue).Decimals(2).Format("c").Placeholder("$ 0.00").Max(Decimal.MaxValue).Min(0).Spinners(false).HtmlAttributes(new { style = "width:100%" })
    </div>
    <div class="col-md-6">
        @Html.LabelFor(i => i.MonataryValueRecovered)<br />
        @Html.Kendo().NumericTextBoxFor(i => i.MonataryValueRecovered).Decimals(2).Format("c").Placeholder("$ 0.00").Max(Decimal.MaxValue).Min(0).Spinners(false).HtmlAttributes(new { style = "width:100%" })
    </div>
</div>

<div class="row">
    <div class="col-md-6">
        <div class="col-md-12">@Html.LabelFor(i => i.Weight)</div>
        <div class="col-md-3">@Html.Kendo().NumericTextBoxFor(i => i.Weight).Decimals(2).Placeholder("0.00").Max(Decimal.MaxValue).Min(0).Spinners(false).HtmlAttributes(new { style = "width:100%" })</div>
        <div class="col-md-9">
            @Html.TextBoxFor(m => m.UnitofWeight, new { @class = "form-control" })
        </div>
    </div>
    <div class="col-md-6">
        @Html.LabelFor(i => i.Quantity)<br />
        @Html.Kendo().NumericTextBoxFor(i => i.Quantity).Decimals(2).Placeholder("0.00").Spinners(false).Max(Int32.MaxValue).Min(0).HtmlAttributes(new { style = "width:100%" })
    </div>
</div>

我已经将它们调整到更小的值并且没有问题,这可能只是一个剑道限制。