Crash in Blog.xmlrpcApi when saving a post that was deleted locally (EXC_BAD_ACCESS at 0x48, since 27.2)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
Start with PostRepository.swift (_sync, _create, and getRemoteService) and trace how a deleted post reaches Blog.swift's xmlrpcApi getter, checking the related PostServiceRemoteFactory.swift call. Build the Jetpack scheme and follow the reproduction steps using docs/simulator-sign-in.md; done means reporting whether the crash reproduces and, if confirmed, what the investigation establishes about the deleted post and blog.
索引モデルが issue の本文から書いたものです。
説明
Likely shares a root cause with #26316, #26317, #26319, #26320. See #26323: posts are deleted locally by a first-page list sync while still in use.
Sentry: JETPACK-IOS-1KJC
Sentry snapshot (as of Oct 30, 2026)
Fatal EXC_BAD_ACCESS: KERN_INVALID_ADDRESS at 0x48. It was first seen Aug 31, 2026, the 27.2 release; Sentry's suspect commit is the release/27.2 merge (#25916). Totals: 114 events from 79 users.
| Last 30 days | Events | Users |
|---|---|---|
| 27.3 | 62 | 41 |
| 27.2 | 7 | 7 |
27.3 has about 4.2× as many error-reporting users as 27.2, so 41 against 7 (about 5.9×) is slightly rising. All events are on iPhone, on iOS 26.5 to 27.2. Some users crash repeatedly.
Stack
PostRepository._create (PostRepository.swift:222) → getRemoteService(for: post.blog) (:393) → PostServiceRemoteFactory.forBlog (PostServiceRemoteFactory.swift:14) → Blog.xmlrpcApi.getter (Blog.swift:81) → URL? → crash.
Blog.swift:81 is if _xmlrpcApiEndpoint != endpoint, which reads a Swift stored property. Reading address 0x48 means self is nil: that's a field offset from a nil pointer.
Why it started in 27.2 (hypothesis)
- The 27.2 change. #25869 (in 27.2) added the
_xmlrpcApiEndpointcache, a Swift stored property read inside thexmlrpcApigetter. - How a nil blog reaches it.
post.blogis declared non-optional (@NSManaged public var blog: Blog), but Core Data returns nil for it when the post has been deleted. Objective-C calls on a nil blog, likesupports(.wpComRESTAPI)andwordPressComRestApi, silently return NO/nil, soforBlogfalls through toblog.xmlrpcApi. - Before and after. Before 27.2, that getter didn't touch Swift storage, so a nil blog probably came back as
nilandPostRepositorythrewremoteAPIUnavailable. Now it crashes. - Why it's
_create. A deleted post also readspostIDas nil, so_synctakes the create path.
Breadcrumbs (3 events sampled)
Every time, the crash comes right after the user commits a change to a post they opened earlier:
- Editor → Close → alert → Update (
publishButtonTapped) - Post Settings opened from Posts search → Cancel → alert → Done
- Posts search → editor → Close → Move to Trash alert
- In all three the app went to the background and came back while the post was open, and Posts list syncs ran in between.
- Two of the three started from Posts search (
status=any,trashresults).
Candidate code (hypothesis)
- Same cause as #26317. The post was deleted locally, by a list sync or a trash, while the editor or Post Settings still held it.
- Fix direction:
- In
PostRepository._sync,_createandgetRemoteService, guardpost.managedObjectContext != nil && !post.isDeleted. - Make
forBlogandxmlrpcApisafe against a deleted or nil blog.
- In
Repro to try
- Sign in to a self-hosted site with an application password, or to any site where
forBlogreachesxmlrpcApi. Use a site with several published posts. - Posts → Search → open a result in the editor, or in Post Settings.
- Delete the post locally while it's open: trash it on the web and pull to refresh the Posts list, or background the app long enough for a list sync to purge it.
- Tap Update, or Done in Post Settings.
- Pass:
EXC_BAD_ACCESSinBlog.xmlrpcApi, or a breakpoint in_createshowingpost.isDeleted == trueandpost.blog == nil.
Events
af200e41c91a4ffe86ff64f393dd5d25dd1b9b7460a84a048da50d1f7e64d6bcc1ac90b2a8de4ec3bed82e4261ace77f223ecf228a864eaa9a6510c29461b7d3bf039188011e41eaac00138c1d995844
Build the Jetpack scheme and sign in using docs/simulator-sign-in.md, with bundle ID com.automattic.jetpack.
When you're done: post the results here. If you now have reliable steps, remove [Status] Needs Repro. If you found the cause and a fix approach, remove [Status] Needs Plan and add [Status] Ready for Dev. Remove Simulator Testable when you're finished.
Generated by Claude Code
- 主要言語
- Swift
- スター
- 3.9k
- フォーク
- 1.2k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 136
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
wordpress-mobile/WordPress-iOS のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
wordpress-mobile/WordPress-iOS#26423 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Pri] Low [Status] Ready for Dev [Type] Bug /Me
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
wordpress-mobile/WordPress-iOS#26279 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Pri] Low [Status] Ready for Dev [Type] Bug Share Extension
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
wordpress-mobile/WordPress-iOS#26276 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Pri] Low [Status] Ready for Dev [Type] Bug Blogging Prompts Notifications
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
wordpress-mobile/WordPress-iOS#26256 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Status] Ready for Dev [Type] Bug Reader
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
wordpress-mobile/WordPress-iOS#26254 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
wordpress-mobile/WordPress-iOS の issue をすべて見る
似ている issue
-
Optional callbacks log "Unable to create JSCallback" when passed null対応中かも @cmsj が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
cmsj/Hammerspoon2#464 ·
-
android bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
VocaHQ/vocaphone#470 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
new-compilers request
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
compiler-explorer/compiler-explorer#9640 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100