Tencent/QMUI_Android · error · RuntimeException

%s did not call through to super.onEnterAnimationStart(Anima

Error message

%s did not call through to super.onEnterAnimationStart(Animation)

What it means

checkAndCallOnEnterAnimationStart invokes onEnterAnimationStart and verifies the subclass called the super implementation via the mCalled flag. Skipping super breaks the library's animation lifecycle bookkeeping, so it throws.

Source

Thrown at arch/src/main/java/com/qmuiteam/qmui/arch/QMUIFragment.java:1140

                public void onAnimationStart(Animator animation) {
                    checkAndCallOnEnterAnimationStart(animation);
                }

                @Override
                public void onAnimationEnd(Animator animation) {
                    checkAndCallOnEnterAnimationEnd(animation);
                }
            });
            return animator;
        }
        return super.onCreateAnimator(transit, enter, nextAnim);
    }

    private void checkAndCallOnEnterAnimationStart(@Nullable Animator animation) {
        mCalled = false;
        onEnterAnimationStart(animation);
        if (!mCalled) {
            throw new RuntimeException(getClass().getSimpleName() + " did not call through to super.onEnterAnimationStart(Animation)");
        }
    }

    private void checkAndCallOnEnterAnimationEnd(@Nullable Animator animation) {
        mCalled = false;
        onEnterAnimationEnd(animation);
        if (!mCalled) {
            throw new RuntimeException(getClass().getSimpleName() + " did not call through to super.onEnterAnimationEnd(Animation)");
        }
    }

    /**
     * onCreateView
     */
    protected abstract View onCreateView();


    /**

View on GitHub (pinned to 026e7d4866)

Solutions

  1. Call super.onEnterAnimationStart(animation) in the override
  2. If custom logic must run alone, still invoke super and then apply custom animation
  3. Remove the override if no customization is needed

Example fix

// before
@Override
public void onEnterAnimationStart(Animator animation) {
    doCustomAnim();
}
// after
@Override
public void onEnterAnimationStart(Animator animation) {
    super.onEnterAnimationStart(animation);
    doCustomAnim();
}
Defensive patterns

Strategy: type-guard

Prevention

When it happens

Trigger: Overriding onEnterAnimationStart(Animator/Animation) in a QMUIFragment subclass without calling super.onEnterAnimationStart(animation).

Common situations: Custom enter animations written from scratch; overrides copied from non-QMUI fragment code; upgrading QMUI where the super-call became mandatory.

Related errors


AI-assisted analysis of Tencent/QMUI_Android@026e7d4866 (2026-09-06). Data as JSON: /api/errors/ff45186371a9d804. Report an issue: GitHub.