BUnit tests failing for Syncfusion 32.x QRCode control

Hi


I have a page which effectively can generate a qrcode with custom size, error correction and (of course) value.


I have this component test with buint 2.3.4


```

[Fact]
public void Component_has_the_correct_width_and_height()
{
var cut = Render<QrCode>(); // My Blazor page
cut.Render(par =>
{
par.Add(p => p.Value, "some value");
});

var qrCodeComponent = cut.FindComponent<SfQRCodeGenerator>().Instance;
qrCodeComponent.Width.Should().Be("300px"); // this is testing, f the default size is respected
qrCodeComponent.Height.Should().Be("300px");
qrCodeComponent.Value.Should().Be("some value");

cut.Render(par =>
{
par.Add(p => p.Size, 100);
});

qrCodeComponent = cut.FindComponent<SfQRCodeGenerator>().Instance;
qrCodeComponent.Width.Should().Be("100px");
qrCodeComponent.Height.Should().Be("100px");
}

```


Which basically checks if the SfQRCodeGenerator is properly re-rendering with new parameters.

Since Syncfusion 32 the third `.Render` (size change) fails with a stack overflow exception.

Same test with 31 succeeds.


Can you reproduce this and/or can you point me in the right direction here (given it's not a bug)?


Thanks


1 Reply

RS Ramya Subramani Syncfusion Team February 26, 2026 06:44 AM UTC

Hi,

We were unable to reproduce the issue on our side. We tested it using the v32.1.19 NuGet package.

For your convenience, we have attached a working sample. Kindly review the sample and check whether the issue persists in your environment. If it still occurs, please share more details.

 

Note:

If you want to render the QRcodeGenerator with a text element, you need to set the bounds values based on the text element's Bbox value. This can be achieved by using a JavaScript call. We have shared a code snippet to get the text element's Bbox value for your reference.

 

Code Snippet:


function getBbox() {

    var data= document.getElementsByClassName("e-barcode")[0].getElementsByTagName("text")[0].getBBox();

    return data;

}


Regards,

Ramya



Attachment: BarcodeTests_9a4954a9.zip

Loader.
Up arrow icon