EXC_BAD_ACCESS on com.mapbox.common.location.clmonitor at launch since MapboxCommon 24.34 (CLMonitor region monitoring)

オープン
#2,456 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
ios, swift

調査の方向性

Start by tracing LocationService creation of the device location provider and MBXCLDeviceLocationProvider’s restoreCLMonitorTelemetryRegion path described in the issue. Check how the CLMonitor request and its queue are managed, including whether telemetry-disabled launches still initialize the provider. Done means identifying and fixing the launch crash and related provider or CoreLocation crashes, with a reproducible regression check; the issue does not name test files.

索引モデルが issue の本文から書いたものです。

説明

auto-triaged bug :beetle: p1

Environment

  • Maps SDK: 11.34.1 (MapboxCoreMaps 11.34.1, MapboxCommon 24.34.1)
  • iOS: 26.5.2 through 27.3, all iPhone models
  • Xcode: 27.2
  • Release builds from the App Store, no debugger attached

Observed behavior

Since moving from Maps 11.29.1 to 11.34.1 this is our top crash. It hits about 0.11% of daily active users every day. It's EXC_BAD_ACCESS in objc_release while libdispatch releases a block on the com.mapbox.common.location.clmonitor queue. 93% of events happen in the first second of the session. We haven't reproduced it locally.

Crashed thread

MapboxCommon 24.34.1 (arm64)

Crashed: com.mapbox.common.location.clmonitor
0  libobjc.A.dylib         objc_release_x8 + 16
1  libsystem_blocks.dylib  <deduplicated_symbol> + 68
2  libsystem_blocks.dylib  HelperBase<GenericInline>::destroyBlock(Block_layout*, bool, unsigned char*) + 116
3  libsystem_blocks.dylib  _call_dispose_helpers_excp + 72
4  libsystem_blocks.dylib  _Block_release + 236
5  libdispatch.dylib       _dispatch_client_callout + 16
6  libdispatch.dylib       _dispatch_lane_serial_drain + 740
7  libdispatch.dylib       _dispatch_lane_invoke + 392
8  libdispatch.dylib       _dispatch_root_queue_drain_deferred_wlh + 284
9  libdispatch.dylib       _dispatch_workloop_worker_thread + 720
10 libsystem_pthread.dylib _pthread_wqthread + 292
11 libsystem_pthread.dylib start_wqthread + 8

We also see two smaller crash groups in the same code on 24.34.1:

  • SIGABRT "pointer being freed was not allocated" inside LocationService::getDeviceLocationProvider, which looks like a race creating the provider.
  • EXC_BAD_ACCESS in CoreLocation client code called from MBXCLDeviceLocationProvider blocks.

What we found in the 24.34.1 binary

While doing our investigation into the issue, I had Claude do some analysis on Mapbox to help us determine if pinning to an older version would help. Thought I'd pass along it's findings, specifically the apple dev forum posting possibly of interest here:

  • -[MBXCLDeviceLocationProvider init] calls restoreCLMonitorTelemetryRegion on iOS 17+. That dispatches onto MBXSharedCLMonitor's queue, which calls +[CLMonitor requestMonitorWithConfiguration:completion:] for MapboxCommonRegionMonitor with that same queue.
  • The provider is created by LocationService when the telemetry location provider asks for a device location provider. The init path doesn't check telemetryCollectionDisabled, so turning telemetry off doesn't avoid it.
  • The block that crashes is disposed through HelperBase<GenericInline>. Every block we found in MapboxCommon has its own copy/dispose helpers, so the crashing block probably belongs to CoreLocation's CLMonitor setup and runs on Mapbox's queue. That matches the unresolved Apple Developer Forums report of CLMonitor crashing when it's requested early in launch: https://developer.apple.com/forums/thread/771001
主要言語
Swift
スター
601
フォーク
198
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mapbox/mapbox-maps-ios のほかの issue

mapbox/mapbox-maps-ios の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。