Skip to content

MPS delegate crashes on iOS 26 #11655

Open
@shoumikhin

Description

@shoumikhin

🐛 Describe the bug

Running MV3 model in simulator leads to a crash: -[__NSArrayM insertObject:atIndex:]: object cannot be nil'

#0 0x0000000101004874 in __pthread_kill ()
#1 0x00000001011ae2ec in pthread_kill ()
#2 0x00000001801ad8a4 in abort ()
#3 0x00000001802f326c in __abort_message ()
#4 0x00000001802e31a4 in demangling_terminate_handler ()
#5 0x0000000180077218 in _objc_terminate ()
#6 0x00000001018c6c70 in _XCTTerminateHandler ()
#7 0x00000001802f2758 in std::__terminate ()
#8 0x00000001802f57c0 in __cxxabiv1::failed_throw ()
#9 0x00000001802f57a0 in __cxa_throw ()
#10 0x000000018009c0bc in objc_exception_throw ()
#11 0x00000001803c61ec in -[__NSArrayM insertObject:atIndex:] ()
#12 0x00000001d53164d8 in -[MPSGraphDeviceDescriptor initWithMPSGraphDevice:] ()
#13 0x00000001d5315b3c in -[MPSGraphDevice initWithDeviceType:metalDevice:] ()
#14 0x00000001d5315dcc in __38+[MPSGraphDevice deviceWithMTLDevice:]_block_invoke ()
#15 0x00000001801d34b0 in _dispatch_client_callout ()
#16 0x00000001801c9050 in _dispatch_lane_barrier_sync_invoke_and_complete ()
#17 0x00000001d5315c3c in +[MPSGraphDevice deviceWithMTLDevice:] ()
#18 0x0000000102ed9bf8 in executorch::backends::mps::delegate::MPSGraphBuilder::getMPSGraphExecutable ()
#19 0x0000000102ed70f0 in executorch::backends::mps::delegate::MPSCompiler::compileModel ()
#20 0x0000000102ed6958 in executorch::backends::MPSBackend::init ()
#21 0x00000001023b0d5c in executorch::runtime::BackendDelegate::Init at /executorch/runtime/executor/method.cpp:104
#22 0x0000000110e18a98 in executorch::runtime::Method::init at /executorch/runtime/executor/method.cpp:832
#23 0x0000000110e184f8 in executorch::runtime::Method::load at /executorch/runtime/executor/method.cpp:758
#24 0x0000000110e239c0 in executorch::runtime::Program::load_method at /executorch/runtime/executor/program.cpp:278

Versions

iOS 26

Metadata

Metadata

Assignees

Labels

module: mpsIssues related to Apple's MPS delegation and code under backends/apple/mps/triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions