Skip to content

Title: EXC_BAD_ACCESS crash on iOS when dynamically removing Border views — regression in Microsoft.Maui.Controls 10.0.30, possibly earlier #34142

@JohnHDev

Description

@JohnHDev

Description

Upgrading Microsoft.Maui.Controls from 9.0.120 to 10.0.30 introduces a reproducible EXC_BAD_ACCESS (SIGSEGV) crash on physical iOS devices, occasionally on sim. Reverting to 9.0.120 eliminates the crash entirely.

Steps to Reproduce

Using a custom layout control where views can be moved, updated, added. When being removed 90% of the time this exception is thrown. Only on physical device.

Expected: Views are disposed cleanly when removed from the visual tree.

Actual: EXC_BAD_ACCESS on the finalizer thread — managed NSObject wrapper outlives the freed native ObjC CALayer.

I spent a lot of tokens trying to resolve this, then had the brainwave to revert the nuget packages. Can provide a symbolicated crash log if that helps.

Link to public reproduction project repository

No response

Version with bug

10.0.30

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.120 SR12

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    s/needs-infoIssue needs more info from the authors/needs-reproAttach a solution or code which reproduces the issuet/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions