Skip to content

[Bug] MLX 0.25.2 causing the UI rendering to be stuck and occasionally crash. #237

@tqtifnypmb

Description

@tqtifnypmb

Describe the issue:

Run an LLM model using MLX 0.25.2 and wait a few minutes until the Xcode log shows:
Command queue creation failed. Worst processes <decode: bad range for [%@] got [offs:318 len:959 within:0]>.

After this log appears, the app's UI will freeze (the model will still be running), and it may occasionally crash with the following crash stack.

This issue never occurred in version 0.23.1.

Configuration:

Devices: MacBook Pro/iPhone
System Version: macOS(15.3.1), iOS(18.2)
MLX-Swift version: 0.25.2

Crash Logs:

libsystem_kernel.dylib`__abort_with_payload:
    0x18926bc64 <+0>:  mov    x16, #0x209               ; =521 
    0x18926bc68 <+4>:  svc    #0x80
->  0x18926bc6c <+8>:  b.lo   0x18926bc8c               ; <+40>
    0x18926bc70 <+12>: pacibsp 
    0x18926bc74 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x18926bc78 <+20>: mov    x29, sp
    0x18926bc7c <+24>: bl     0x18925f8cc               ; cerror_nocancel
    0x18926bc80 <+28>: mov    sp, x29
    0x18926bc84 <+32>: ldp    x29, x30, [sp], #0x10
    0x18926bc88 <+36>: retab  
    0x18926bc8c <+40>: ret    

Xcode console log at the time of the app crash:

assertion failure: "!rv" -> 0
assertion failure: "!rv" -> %lld

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions