Skip to content

Remove package-lock.json and add to .gitignore (project uses Bun)

71650e3
Select commit
Loading
Failed to load commit list.
Open

Fix memory leaks when PagerView is unmounted #1040

Remove package-lock.json and add to .gitignore (project uses Bun)
71650e3
Select commit
Loading
Failed to load commit list.
Cursor / Cursor Bugbot completed Nov 16, 2025 in 2m 29s

Bugbot Review

Bugbot Analysis Progress (2m 30s elapsed)

✅ Gathered PR context (2s)
✅ Analyzed code changes (1s)
✅ Completed bug detection — 4 potential bugs found (2m 17s)
✅ Validation and filtering completed (0s)
✅ Posted analysis results — 4 bugs reported (10s)
✅ Analysis completed successfully (0s)

Final Result: Bugbot completed review and found 4 potential issues

Request ID: serverGenReqId_4497eb08-89f4-469d-a316-5065c4b7ae03

Details

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Bug: Nil object access during component recycling.

After prepareForRecycle sets scrollView = nil on line 158, updateProps accesses scrollView.scrollEnabled without a nil check. If the component is recycled and updateProps is called before willMoveToSuperview reinitializes the view, this causes a crash or undefined behavior when accessing properties on a nil object.

ios/RNCPagerViewComponentView.mm#L204-L206

if (newScreenProps.scrollEnabled != scrollView.scrollEnabled) {
scrollView.scrollEnabled = newScreenProps.scrollEnabled;

Fix in Cursor Fix in Web


Bug: Imperative Commands Crash on Nil State Access

The setScrollEnabledImperatively method accesses scrollView without checking if it's nil. After prepareForRecycle sets scrollView = nil on line 158, calling this imperative command from JavaScript will crash or produce undefined behavior. Since this is an imperative API callable at any time, it needs a nil check.

ios/RNCPagerViewComponentView.mm#L425-L428

- (void)setScrollEnabledImperatively:(BOOL)scrollEnabled {
[scrollView setScrollEnabled:scrollEnabled];
}

Fix in Cursor Fix in Web