Need More Info
Last Updated: 14 Jan 2025 12:24 by ADMIN
Kristina
Created on: 07 Jan 2025 19:53
Category: UI for Blazor
Type: Bug Report
0
Enable/Disable Form Element in child component has 'heap is currently locked' error

When enabling/disabling a form element that is defined in a child component, the element is successfully disabled, however a console error occurs. The error occurs whether the child component makes the update or the parent makes the update through a passed parameter.  The error does not occur for form elements defined in the parent.  The error does not occur for basic html input elements defined in the child. 

Element definition:

<TelerikTextBox 
     Id="ElementMisc" 
     AutoComplete="new-password" 
     @bind-Value="@_searchModel.ElementMisc" 
     Enabled="!_elementSelectMode" 
     class="textbox-75"
     DebounceDelay="0">
 </TelerikTextBox>

Update Code defined in child:

   

 if (results.Data.Count > 1)
 {   
     _elementSelectMode= true;
     StateHasChanged();

 }

 

Console Error:

Uncaught (in promise) Error: Assertion failed - heap is currently locked
    at mr (blazor.web.js:1:158963)
    at Object.beginInvokeDotNetFromJS (blazor.web.js:1:157244)
    at w.invokeDotNetMethodAsync (blazor.web.js:1:3978)
    at C.invokeMethodAsync (blazor.web.js:1:5486)
    at r.invokeMethodAsync (telerik-blazor.js:22:1272553)
    at r.onBlur (telerik-blazor.js:22:1463592)
    at ye.setOrRemoveAttributeOrProperty (blazor.web.js:1:28630)
    at ye.applyAttribute (blazor.web.js:1:27574)
    at ye.applyEdits (blazor.web.js:1:24601)
    at ye.updateComponent (blazor.web.js:1:23606)

1 comment
ADMIN
Hristian Stefanov
Posted on: 14 Jan 2025 12:24

Hi Kristina,

I have tried reproducing the error by testing the described scenario. As a result, the enabling/disabling seems to working without any errors. I'm sharing the sample via this REPL link. Please run and test it to see if the result you get is the same.

As a next step, please modify the REPL sample to reproduce the issue and send it back to me for further investigation.

Regards,
Hristian Stefanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.