Repository navigation
Closed
Labels
Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.Needs: Version InfoPlatform: AndroidAndroid applications.Android applications.
Description
Description
We encountered an issue on Samsung devices running the latest version of Android.
When a user starts using the magnifier to edit text, the app crashes.
I found a similar problem described here. Maybe someone has already fixed a similar bug or has some ideas on how to get around it. Maybe there is a way to completely disable the possibility of using the magnifier?
Steps to reproduce
- Open the app and navigate to any screen with a text input field (TextView).
- Clear the text so the field is completely empty.
- Tap inside the field to place the text cursor.
- Long-press on the cursor or try to drag the selection handle (magnifier appears).
Actual Result:
The app crashes with NullPointerException in android.widget.Editor$HandleView.updateMagnifier.
Expected Result:
User should be able to interact with the cursor and magnifier without app crashing.
React Native Version
0.77
Affected Platforms
Runtime - Android
Output of npx @react-native-community/cli info
System:
OS: macOS 14.7.8
CPU: (10) arm64 Apple M1 Pro
Memory: 134.91 MB / 16.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 20.9.0
path: /usr/local/bin/node
Yarn:
version: 1.22.21
path: /usr/local/bin/yarn
npm:
version: 10.2.4
path: /usr/local/bin/npm
Watchman:
version: 2024.10.21.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /Users/oborysenko/.gem/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.25410.109.2511.13752376
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 22.0.1
path: /usr/bin/javac
Ruby:
version: 2.7.8
path: /opt/homebrew/opt/ruby@2.7/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.77.2
wanted: 0.77.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.text.Layout.getLineForOffset(int)' on a null object reference at android.widget.Editor$HandleView.getLineForOffset(Editor.java:6136) at android.widget.Editor$HandleView.obtainMagnifierShowCoordinates(Editor.java:6385) at android.widget.Editor$HandleView.updateMagnifier(Editor.java:6509) at android.widget.Editor$SelectionHandleView.onTouchEvent(Editor.java:7872) at android.view.View.performOnTouchCallback(View.java:17047) at android.view.View.dispatchTouchEvent(View.java:17004) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3353) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3023) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3353) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3023) at android.widget.PopupWindow$PopupDecorView.dispatchTouchEvent(PopupWindow.java:2921) at android.view.View.dispatchPointerEvent(View.java:17329) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:9551) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:9268) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:8590) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:8647) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:8613) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:8813) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:8621) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:8870) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:8594) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:8647) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:8613) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:8621) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:8594) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:12432) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:12327) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:12283) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:12582) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:385) at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method) at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:313) at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:12531) at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:12679) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1751) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1760) at android.view.Choreographer.doCallbacks(Choreographer.java:1216) at android.view.Choreographer.doFrame(Choreographer.java:1127) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1707) at android.os.Handler.handleCallback(Handler.java:959) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loopOnce(Looper.java:257) at android.os.Looper.loop(Looper.java:342) at android.app.ActivityThread.main(ActivityThread.java:9634) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
MANDATORY Reproducer
you can use any app with TextView
Screenshots and Videos
No response
Reacted by Dragomir Andrei, Basil Tarek, Zafer ATLI, Rayan Moarkech and Arif Romdoni
Metadata
Metadata
Assignees
Labels
Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.Needs: Version InfoPlatform: AndroidAndroid applications.Android applications.
Activity
react-native-bot commentedon Sep 4, 2025
Warning
Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.
react-native-bot commentedon Sep 4, 2025
Warning
Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.
react-native-bot commentedon Sep 4, 2025
Warning
Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:
You can read more about about it on our website: How to report a bug.
cortinico commentedon Sep 4, 2025
Please:
We can reopen the issue once those things have been provided
zaferatli commentedon Nov 3, 2025
same issue for me
deepanshuisky commentedon Nov 19, 2025
Happening for me too, can't create reproducer for this looks like samsung device issue
Nader-CS commentedon Feb 19, 2026
same issue for me
Nehal-Zeller commentedon Feb 23, 2026
happens for me as well but on Android 16 and Samsung devices
camboYY commentedon Nov 20, 2026
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.text.Layout.getLineForOffset(int)' on a null object reference
at android.widget.Editor$HandleView.getLineForOffset(Editor.java:6227)
at android.widget.Editor$HandleView.obtainMagnifierShowCoordinates(Editor.java:6476)
at android.widget.Editor$HandleView.updateMagnifier(Editor.java:6600)
at android.widget.Editor$SelectionHandleView.onTouchEvent(Editor.java:7963)
at android.view.View.performOnTouchCallback(View.java:17234)
at android.view.View.dispatchTouchEvent(View.java:17187)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3371)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3047)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3371)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3047)
at android.widget.PopupWindow$PopupDecorView.dispatchTouchEvent(PopupWindow.java:2915)
at android.view.View.dispatchPointerEvent(View.java:17527)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:9847)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:9563)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:8901)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:8958)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:8924)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:9124)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:8932)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:9181)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:8905)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:8958)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:8924)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:8932)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:8905)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:12785)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:12673)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:12628)
at android.view.ViewRootImpl.processRawInputEvent(ViewRootImpl.java:13165)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:12915)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:392)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(InputEventReceiver.java)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:315)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:12892)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:13007)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1901)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1910)
at android.view.Choreographer.doCallbacks(Choreographer.java:1367)
at android.view.Choreographer.doFrame(Choreographer.java:1277)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1870)
at android.os.Handler.handleCallback(Handler.java:995)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:273)
at android.os.Looper.loop(Looper.java:363)
at android.app.ActivityThread.main(ActivityThread.java:10060)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
camboYY commentedon Nov 20, 2026
happens for me as well but on Android 16 and Samsung devices