We purchased M1 Mac mini hardware to run our pipelines, however, we get a crash whenever running on IOS13 simulators using Xcode 12.X when trying to initialize WKContentRuleListStore.
The crash does not happen on Intel hardware nor on M1 with IOS14 simulators.
The storeUrl is initialized as follows:
The temporaryDirectory is not being used, storeUrl resolves to the doc directory as expected. When calling:
The following stack trace is observed:
Thread 1 Queue : com.apple.main-thread (serial)
The crash does not happen on Intel hardware nor on M1 with IOS14 simulators.
The storeUrl is initialized as follows:
Code Block let storeUrl = try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true) ?? FileManager.default.temporaryDirectory
The temporaryDirectory is not being used, storeUrl resolves to the doc directory as expected. When calling:
Code Block WKContentRuleListStore(url: storeUrl)
The following stack trace is observed:
Thread 1 Queue : com.apple.main-thread (serial)
Code Block 2#0 0x000000011b283dc7 in bmalloc::Heap::Heap(bmalloc::HeapKind, std::__1::lock_guard<bmalloc::Mutex>&) () 3#1 0x000000011b280175 in bmalloc::PerProcess<bmalloc::PerHeapKind<bmalloc::Heap> >::getSlowCase() () 4#2 0x000000011b280985 in bmalloc::PerHeapKindBase<bmalloc::Cache>::PerHeapKindBase<>() () 5#3 0x000000011b2803a6 in bmalloc::PerThread<bmalloc::PerHeapKind<bmalloc::Cache> >::getSlowCase() () 6#4 0x000000011b280464 in bmalloc::Cache::allocateSlowCaseNullCache(bmalloc::HeapKind, unsigned long) () 7#5 0x000000011b230d1c in WTF::StringImpl::create(unsigned char const*) () 8#6 0x000000011b27708e in WTF::String::String(char const*) () 9#7 0x000000012201c4b1 in +[WKContentRuleListStore storeWithURL:] () 10#8 0x000000010d8f6a04 in @nonobjc WKContentRuleListStore.__allocating_init(url:) () 11#9 0x000000010d8f6769 in DefaultContentBlockingService.init(config:storeUrl:logger:) at ***/ContentBlocking/DefaultContentBlockingService.swift:50