Skip to content

TextInput Component crashing app when character count exceeds 490 (IOS versions 11.0 or higher only) #18815

@Ahad-Wasim

Description

@Ahad-Wasim

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

  1. Create a TextInput component (The one we used is pasted below)
  2. Enter text until you have reached a count of 490 characters
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugComponent: TextInputRelated to the TextInput component.Platform: iOSiOS applications.Priority: MidStaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions