Repository navigation
Description
The TextInput component on iOS versions of 11 or higher seems to be crashing the entire mobile application when I enter a long text consisting of 490 characters or more. There aren't any errors that pop up in the Javascript console but our QA engineer found this message below inside their crash log. Note: this is only happening on an actual iPhone device, not a simulator.
Date/Time: 2018-03-27 17:08:24.2634 +0400
Launch Time: 2018-03-27 16:16:23.4539 +0400
OS Version: iPhone OS 11.2.5 (15D60)
Baseband Version: 1.62.00
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace ASSERTIOND, Code 0xbada5e47
Triggered by Thread: 0
Environment
Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.3
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: ~0.55.0 => 0.55.0
Steps to Reproduce
- Create a TextInput component (The one we used is pasted below)
- Enter text until you have reached a count of 490 characters
- The app will suddenly crash and you will automatically be taken to the home screen.
return (
<TextInput
accessibilityLabel="ChatInput"
editable
multiline
enablesReturnKeyAutomatically
placeholder={placeholder}
placeholderTextColor={placeholderTextColor}
onChangeText={onChange}
style={[style, { height: composerHeight }]}
value={value}
selectionColor={selectionColor}
onChange={this.onContentSizeChange}
underlineColorAndroid="transparent"
onContentSizeChange={this.onContentSizeChange}
/>
);
Expected Behavior
The TextInput rendering logic should be completely independent from the character count.
Actual Behavior
The application crashes and we are sent to the home screen.
Activity
react-native-bot commentedon Apr 12, 2018
Thanks for posting this! It looks like your issue may refer to an older version of React Native. Can you reproduce the issue on the latest release, v0.55?
Thank you for your contributions.
Ahad-Wasim commentedon Apr 25, 2018
This is still an issue on the latest version of React Native
GeorgianSorinMaxim commentedon May 17, 2018
I have the same issue on RN version 0.55.4 and React version 16.3.1.
The stack trace is:
tobyclemson commentedon May 28, 2018
I'm experiencing the same as soon as the
TextInputcontent overflows its width and is then blurred. I've also tried RN version 0.55.4 and React version 16.3.1 and the problem persists.ol3j commentedon May 28, 2018
I have the same error for string like that qwertywertwQwertywertTy99,99?
bpeyrouBDHIS commentedon Jun 12, 2018
I have the same error.
The
TextInputis a password, when the length of the characters overflows the width of theTextInputand it is blurred, the app crashes and I get this messagewangghon commentedon Jun 24, 2018
same issue on react native 0.54.2
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x182f6ad8c __exceptionPreprocess
1 libobjc.A.dylib 0x1821245ec objc_exception_throw
2 CoreFoundation 0x182f6ac6c -[NSException initWithCoder:]
3 UIFoundation 0x18dc7eae8 -[NSLayoutManager glyphRangeForTextContainer:]
4 UIKit 0x18d476e08 -[_UIFieldEditorLayoutManager _completeBulletRenderingForTextContainer:]
5 UIKit 0x18ce43700 -[UIFieldEditor layoutManager:didCompleteLayoutForTextContainer:atEnd:]
6 UIFoundation 0x18dc595e0 -[NSLayoutManager(NSPrivate) _fillLayoutHoleForCharacterRange:desiredNumberOfLines:isSoft:]
7 UIFoundation 0x18dc59da0 -[NSLayoutManager(NSPrivate) _fillLayoutHoleAtIndex:desiredNumberOfLines:]
8 UIFoundation 0x18dc630f4 _NSFastFillAllLayoutHolesUpToEndOfContainerForGlyphIndex
9 UIFoundation 0x18dc7bb58 -[NSLayoutManager ensureLayoutForTextContainer:]
10 UIKit 0x18ccdb668 -[UIFieldEditor layoutSubviews]
11 UIKit 0x18cb7b6f4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
12 QuartzCore 0x1870f1fec -[CALayer layoutSublayers]
13 QuartzCore 0x1870f617c CA::Layer::layout_if_needed(CA::Transaction*)
14 UIKit 0x18cb93bf4 -[UIView(Hierarchy) layoutBelowIfNeeded]
15 UIKit 0x18cc8ac2c -[UITextField layoutSubviews]
16 UIKit 0x18cb7b6f4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
17 QuartzCore 0x1870f1fec -[CALayer layoutSublayers]
18 QuartzCore 0x1870f617c CA::Layer::layout_if_needed(CA::Transaction*)
19 QuartzCore 0x187062830 CA::Context::commit_transaction(CA::Transaction*)
20 QuartzCore 0x18708a364 CA::Transaction::commit()
21 QuartzCore 0x18708b1e4 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
22 CoreFoundation 0x182f12910 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION
23 CoreFoundation 0x182f10238 __CFRunLoopDoObservers
24 CoreFoundation 0x182f10884 __CFRunLoopRun
25 CoreFoundation 0x182e30da8 CFRunLoopRunSpecific
26 GraphicsServices 0x184e15020 GSEventRunModal
27 UIKit 0x18ce4d758 UIApplicationMain
28 networkhub 0x1003e70e8 main (main.m:16)
29 libdyld.dylib 0x1828c1fc0 start
TimonSotiropoulos commentedon Jul 6, 2018
I am having the same issue here. Any one got an idea on a fix?
webartistse commentedon Jul 27, 2018
I can't update my app because of this! Itunes is rejecting the app because it crashes on their test device iOS 11.4.1. Using react 16.3.2 and react native 0.55.3. Does anyone have a solution for this one??
ajfigueroa commentedon Jul 27, 2018
Is this still an issue in 0.56?
webartistse commentedon Jul 29, 2018
@ajfigueroa I made an update to RN 0.56 and have posted an update to iTunes. I will update when I know more! My build has always worked in simulator, on my device via xcode. The very same build that works in Testflight is crashing for the testers at iTunes. I really cant reproduce this but the crashlogs from iTunes leads me to this error. The testers say that the app crashes efter they fill in the username and password on start screen and hit return on the software keyboard.
7 remaining items
taschik commentedon Oct 30, 2018
Same here running on 0.55.4 on iOS 12. Is there any workaround?
ericlewis commentedon Feb 28, 2019
I think this is related: #19453
fbartho commentedon Feb 28, 2019
@taschik We worked around it by dropping the
fontFamilyif there's data in the input. It's clunky but fine.itanandp commentedon Mar 4, 2019
This fixed the issue for me, thank you!
stale commentedon Aug 4, 2019
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
stale commentedon Aug 11, 2019
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.