Setting caretHidden for a TextInput component on iOS (iPhone SE 3) causes continuous metal rendering errors
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- ios, objective-c, react-native
- Ambito
- mobile
Direzione di ricerca
Riproduci il problema con l’app di esempio obbligatoria usando npm install e npm run ios -- --simulator="iPhone SE 3", quindi esamina RCTUITextField.mm intorno alla riga 216 e RCTUITextView.mm intorno alle righe 369-378. Confronta il comportamento con caretHidden abilitato e controlla i log Metal mentre il campo è attivo. L’attività è completata quando gli errori continui Surface 1073741823 x 1073741823 is too large non si verificano più nel caso iOS TextInput riprodotto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
Setting the caretHidden prop on a <TextInput> component when rendered on iOS results in an error that spams the iOS logs (~ 20-30 times per second):
Surface 1073741823 x 1073741823 is too large
As the error is generated so frequently this creates a lot of activity on the app. In my use case this is causing XCUITest to wait continuously for the app to be idle which never happens, so our end to end tests tend to stall when displaying a text input with a hidden caret.
We are using the iPhone SE 3 in the simulator for our testing which shows the error, it does not seem to occur with the iPhone 17 Pro, I haven't tested other phones but the obvious difference is the home button on the SE 3. I was able to reproduce this problem on a fresh v0.87 metro app with a single text input.
I believe this may be due to calculations that use the caret position that run even though the caret is not displayed, though I'm not 100% sure.
RCTUITextField.mm (for single line input) and RCTUITextView.mm for multi line input both set the caret to CGRectZero which would give it dimensions and size of 0, which I could see causing the problem, though I'm not sure what code is using these values for calculations.
Steps to reproduce
- Install the app with
npm install - Run the app on iOS on the iPhone SE 3 with
npm run ios -- --simulator="iPhone SE 3" - Open the Console.app and start viewing logs for the simulator (you can filter by
metalto make the error more clear) - Focus the input field by tapping on it
- Check the errors in the console app
React Native Version
0.87.1
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
System:
OS: macOS 26.6.2
CPU: (14) arm64 Apple M4 Pro
Memory: 435.84 MB / 48.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 24.11.0
path: /Users/mario/.local/share/mise/installs/node/24.11.0/bin/node
Yarn:
version: 1.22.22
path: /Users/mario/.local/share/mise/installs/node/24.11.0/bin/yarn
npm:
version: 11.6.1
path: /Users/mario/.local/share/mise/installs/node/24.11.0/bin/npm
Watchman:
version: 2026.01.12.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /Users/mario/.local/share/mise/installs/ruby/3.4.8/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.2
- iOS 26.2
- macOS 26.2
- tvOS 26.2
- visionOS 26.2
- watchOS 26.2
Android SDK:
API Levels:
- "29"
- "33"
- "35"
- "36"
Build Tools:
- 33.0.2
- 35.0.0
- 36.0.0
System Images:
- android-28 | Google APIs ARM 64 v8a
- android-29 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2025.3 AI-253.32098.37.2534.15336583
Xcode:
version: 26.2/17C52
path: /usr/bin/xcodebuild
Languages:
Java:
version: javac 17
path: /Users/mario/.local/share/mise/shims/javac
Ruby:
version: 3.4.8
path: /Users/mario/.local/share/mise/installs/ruby/3.4.8/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.2.0
wanted: 20.2.0
react:
installed: 19.2.3
wanted: 19.2.3
react-native:
installed: 0.87.1
wanted: 0.87.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
Subsystem: com.apple.coreanimation
Category: Metal
Surface 1073741823 x 1073741823 is too large
MANDATORY Reproducer
https://github.com/mariovisic/react-native-example-ios-carret-error
Screenshots and Videos
- Lingua principale
- C++
- Stelle
- 127k
- Fork
- 25.3k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di react/react-native
-
Needs: Author Feedback Needs: Repro
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
react/react-native#58621 · 1 commento ·
-
Needs: Author Feedback Needs: Repro
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
react/react-native#58610 · 1 commento ·
-
Needs: Triage :mag:
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
react/react-native#58565 · 1 commento · 2 reazioni ·
-
Needs: Author Feedback Needs: Repro
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
react/react-native#58555 · 5 commenti · 2 reazioni ·
-
Needs: Attention Needs: Repro
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
react/react-native#58526 · 2 commenti ·
Tutte le issue di react/react-native
Issue simili
-
ai_reviewed
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ydb-platform/ydb#53869 · 3 commenti ·
-
bug cert blocker needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
project-chip/connectedhomeip#74373 ·
-
[request] tracy/0.14.1 Apertaupstream update
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
conan-io/conan-center-index#31035 ·
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
vllm-project/vllm-ascend#17329 ·