Skip to content

Crash when updating multiple axes #7

Description

@ssayfulin69

When the setValue(...) function is called multiple times one after another, the EXC_BAD_ACCESS error can occur on the second call, like in this example:

let vFont = VFont(name: "MyFont", size: 14)
vFont.setValue(value1, forAxisID: axis1)
vFont.setValue(value2, forAxisID: axis2) // EXC_BAD_ACCESS

I assume that it happens because the name of the font is changed during the first call, and the system can't find it when executing the second time. This situation seems to me like a race condition, even though all the code appears sync. The crash happens about 50% of the time.

At this moment of error the font name contains the attribute suffix:

(lldb) po variableFontName
"myFont_wght_wdth680000"
Screenshot 2024-11-04 at 5 39 38 PM

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions