Skip to content

Printing a long string causes Flutter to crash #6758

@lukechurch

Description

@lukechurch

Steps to Reproduce

The below, rather silly, code simulates a real problem that I came across whilst debugging an app.

Run the standard template app with _incrementCounter modified to

void _incrementCounter() {
    setState(() {
      _counter++;
    });

    print ("This is a short string");

    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < 10000; i++) {
      sb.write("This is some text $i");
    }

    print (sb.toString());
  }

I.e. Print a short string followed by a very long string.

Run on the iOS simulator. The result is:

com.apple.CoreSimulator.SimDevice.B6E113C1-725A-43E9-B4AD-538AD90FC5B2.launchd_sim[12828] (UIKitApplication:com.yourcompany.longString[0x4ee1]: Service exited due to signal: Broken pipe: 13
SpringBoard: Application 'UIKitApplication:com.yourcompany.longString[0x4ee1]' exited abnormally via signal.
assertiond: notify_suspend_pid() failed with error 7
SpringBoard: Reply Error: Connection interrupted

Flutter version details from IntelliJ

screen shot 2016-11-08 at 13 25 36

Metadata

Metadata

Assignees

Labels

c: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.platform-iosiOS applications specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions