fix(instagram): inject inboxActionBarButton after CHECK_CAST to fix VerifyError on 439 - #1602
Closed
Flaxmbot wants to merge 1 commit into
Closed
fix(instagram): inject inboxActionBarButton after CHECK_CAST to fix VerifyError on 439#1602Flaxmbot wants to merge 1 commit into
Flaxmbot wants to merge 1 commit into
Conversation
…erifyError on 439
InboxActionBarButtonPatch was injecting the inboxActionBarButton call at
it.location.index — before the CHECK_CAST to IgdsActionBar executes.
At that point the register still holds the raw View returned by
LayoutInflater.inflate(). The DEX verifier (ART, SDK 36) sees the
register typed as View being passed where ViewGroup is declared, and
rejects the entire X.08PF (DirectInboxFragment) class with:
VerifyError: register v9 has type Reference: android.view.View
but expected Reference: android.view.ViewGroup
Fix: inject at index + 1 (after the cast) so the register is already
typed as IgdsActionBar, which satisfies the ViewGroup parameter.
This is the same pattern ChatActionBarButtonPatch already uses.
Collaborator
|
Thanks but it's already addressed #1600 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Instagram 439.0.0.37.89 (Android 16 / SDK 36), the app crashes immediately when navigating to Direct Inbox:
\
java.lang.VerifyError: Verifier rejected class X.08PF:
android.view.View X.08PF.onCreateView(...) failed to verify:
register v9 has type Reference: android.view.View
but expected Reference: android.view.ViewGroup
\\
Root cause
\InboxActionBarButtonPatch\ injects the \inboxActionBarButton\ call at \it.location.index\ — before the \CHECK_CAST to IgdsActionBar\ executes. At that point the register still holds the raw \�ndroid.view.View\ returned by \LayoutInflater.inflate().
The DEX verifier (ART, SDK 36) sees that register being passed where a \ViewGroup\ is declared, and rejects the entire \X.08PF\ (DirectInboxFragment) class.
Fix
Inject at \index + 1\ (after the cast), so the register is already typed as \IgdsActionBar\ — a \ViewGroup\ subclass — when the verifier inspects it.
This is exactly the same pattern \ChatActionBarButtonPatch\ already uses (with an explicit comment explaining why).
Tested on