<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">When running this example on Android, flutter crashes</p>
<ul dir="auto">
<li>running from repo from head sync'd this morning and using Dart VM version: 1.16.0-dev.5.0</li>
<li>use <code class="notranslate">flutter create</code> to create a new application</li>
<li>drop in the following <code class="notranslate">main.dart</code></li>
<li>launch on Android then tap the button</li>
<li>crash</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import 'dart:async';
import 'dart:io';

import 'package:flutter/material.dart';

void main() {
  runApp(
    new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        primarySwatch: Colors.blue
      ),
      routes: &lt;String, WidgetBuilder&gt;{
        '/': (BuildContext context) =&gt; new FlutterDemo()
      }
    )
  );
}

class FlutterDemo extends StatefulWidget {
  FlutterDemo({ Key key }) : super(key: key);

  @override
  _FlutterDemoState createState() =&gt; new _FlutterDemoState();
}

class _FlutterDemoState extends State&lt;FlutterDemo&gt; {
  String _networkInfo = 'Press button to get network information.';

  Future&lt;Null&gt; _updateNetworkInfo() async {
    StringBuffer buf = new StringBuffer();
    buf.writeln('Network information:');

    // This code crashes Flutter ...
    for (NetworkInterface interface in await NetworkInterface.list()) {
      for (InternetAddress ip in interface.addresses) {
        buf.writeln(ip.address);
      }
    }

    setState(() {
      _networkInfo = buf.toString();
    });
  }

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text('Flutter Demo')
      ),
      body: new Center(
        child: new Text(_networkInfo)
      ),
      floatingActionButton: new FloatingActionButton(
        onPressed: _updateNetworkInfo,
        tooltip: 'Increment',
        child: new Icon(
          icon: Icons.add
        )
      )
    );
  }
}"><pre class="notranslate"><code class="notranslate">import 'dart:async';
import 'dart:io';

import 'package:flutter/material.dart';

void main() {
  runApp(
    new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        primarySwatch: Colors.blue
      ),
      routes: &lt;String, WidgetBuilder&gt;{
        '/': (BuildContext context) =&gt; new FlutterDemo()
      }
    )
  );
}

class FlutterDemo extends StatefulWidget {
  FlutterDemo({ Key key }) : super(key: key);

  @override
  _FlutterDemoState createState() =&gt; new _FlutterDemoState();
}

class _FlutterDemoState extends State&lt;FlutterDemo&gt; {
  String _networkInfo = 'Press button to get network information.';

  Future&lt;Null&gt; _updateNetworkInfo() async {
    StringBuffer buf = new StringBuffer();
    buf.writeln('Network information:');

    // This code crashes Flutter ...
    for (NetworkInterface interface in await NetworkInterface.list()) {
      for (InternetAddress ip in interface.addresses) {
        buf.writeln(ip.address);
      }
    }

    setState(() {
      _networkInfo = buf.toString();
    });
  }

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text('Flutter Demo')
      ),
      body: new Center(
        child: new Text(_networkInfo)
      ),
      floatingActionButton: new FloatingActionButton(
        onPressed: _updateNetworkInfo,
        tooltip: 'Increment',
        child: new Icon(
          icon: Icons.add
        )
      )
    );
  }
}
</code></pre></div>
<h2 dir="auto">Flutter Doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (on Mac OS, channel master)
    • Flutter at /Users/ ............ /flutter/flutter
    • Framework revision ace1a64 (49 minutes ago), engine revision 4062813

[✓] Android toolchain - develop for Android devices (Android SDK 22.0.1)
    • Android SDK at /Users/danrubel/Library/Android/sdk
    • Platform android-22, build-tools 22.0.1
    • Java(TM) SE Runtime Environment (build 1.8.0_72-b15)

[✓] iOS toolchain - develop for iOS devices (Xcode 7.2.1)
    • XCode at /Applications/Xcode.app/Contents/Developer
    • Xcode 7.2.1, Build version 7C1002
    x ideviceinstaller not available; this is used to discover connected iOS devices.
      Install via 'brew install ideviceinstaller'.
    x ios-deploy not available; this is used to deploy to connected iOS devices.
      Install via 'brew install ios-deploy'.

[✓] Atom - a lightweight development environment for Flutter
    • Atom installed; Flutter plugin version 0.2.2"><pre class="notranslate"><code class="notranslate">[✓] Flutter (on Mac OS, channel master)
    • Flutter at /Users/ ............ /flutter/flutter
    • Framework revision ace1a64 (49 minutes ago), engine revision 4062813

[✓] Android toolchain - develop for Android devices (Android SDK 22.0.1)
    • Android SDK at /Users/danrubel/Library/Android/sdk
    • Platform android-22, build-tools 22.0.1
    • Java(TM) SE Runtime Environment (build 1.8.0_72-b15)

[✓] iOS toolchain - develop for iOS devices (Xcode 7.2.1)
    • XCode at /Applications/Xcode.app/Contents/Developer
    • Xcode 7.2.1, Build version 7C1002
    x ideviceinstaller not available; this is used to discover connected iOS devices.
      Install via 'brew install ideviceinstaller'.
    x ios-deploy not available; this is used to deploy to connected iOS devices.
      Install via 'brew install ios-deploy'.

[✓] Atom - a lightweight development environment for Flutter
    • Atom installed; Flutter plugin version 0.2.2
</code></pre></div>
<h2 dir="auto">Logs and Crash Reports</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="F/libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc in tid 10940 (ui_thread)
F/DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
F/DEBUG   : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MHC19T/2741998:user/release-keys'
F/DEBUG   : Revision: 'rev_1.0'
F/DEBUG   : ABI: 'arm'
F/DEBUG   : pid: 10755, tid: 10940, name: ui_thread  &gt;&gt;&gt; com.yourcompany.networkBug &lt;&lt;&lt;
F/DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc
F/DEBUG   :     r0 00000000  r1 df1000d4  r2 df100a20  r3 df100408
F/DEBUG   :     r4 df100180  r5 00000000  r6 2d4be3b5  r7 00000000
F/DEBUG   :     r8 00000000  r9 df100330  sl 00000001  fp 00000000
F/DEBUG   :     ip e1ce3d70  sp df1000b0  lr e13b8ac3  pc e13bb000  cpsr 600f0030
F/DEBUG   : 
F/DEBUG   : backtrace:
F/DEBUG   :     #00 pc 00324000  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #01 pc 00321abf  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #02 pc 0031e015  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #03 pc 004664c5  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #04 pc 00464c05  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #05 pc 00464f47  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #06 pc 0052d4f1  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #07 pc 0052d61b  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #08 pc 004a2cd3  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #09 pc 0003f883  /system/lib/libc.so (_ZL15__pthread_startPv+30)
F/DEBUG   :     #10 pc 00019f75  /system/lib/libc.so (__start_thread+6)
F/DEBUG   : 
F/DEBUG   : Tombstone written to: /data/tombstones/tombstone_02"><pre class="notranslate"><code class="notranslate">F/libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc in tid 10940 (ui_thread)
F/DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
F/DEBUG   : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MHC19T/2741998:user/release-keys'
F/DEBUG   : Revision: 'rev_1.0'
F/DEBUG   : ABI: 'arm'
F/DEBUG   : pid: 10755, tid: 10940, name: ui_thread  &gt;&gt;&gt; com.yourcompany.networkBug &lt;&lt;&lt;
F/DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc
F/DEBUG   :     r0 00000000  r1 df1000d4  r2 df100a20  r3 df100408
F/DEBUG   :     r4 df100180  r5 00000000  r6 2d4be3b5  r7 00000000
F/DEBUG   :     r8 00000000  r9 df100330  sl 00000001  fp 00000000
F/DEBUG   :     ip e1ce3d70  sp df1000b0  lr e13b8ac3  pc e13bb000  cpsr 600f0030
F/DEBUG   : 
F/DEBUG   : backtrace:
F/DEBUG   :     #00 pc 00324000  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #01 pc 00321abf  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #02 pc 0031e015  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #03 pc 004664c5  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #04 pc 00464c05  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #05 pc 00464f47  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #06 pc 0052d4f1  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #07 pc 0052d61b  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #08 pc 004a2cd3  /data/app/com.yourcompany.networkBug-2/lib/arm/libsky_shell.so
F/DEBUG   :     #09 pc 0003f883  /system/lib/libc.so (_ZL15__pthread_startPv+30)
F/DEBUG   :     #10 pc 00019f75  /system/lib/libc.so (__start_thread+6)
F/DEBUG   : 
F/DEBUG   : Tombstone written to: /data/tombstones/tombstone_02
</code></pre></div>
<p dir="auto"><a href="https://github.com/kyorohiro"><img src="https://avatars.githubusercontent.com/u/1310669?v=3" align="left" width="96" height="96" hspace="10" style="max-width: 100%;"></a> <strong>Issue by <a href="https://github.com/kyorohiro">kyorohiro</a></strong><br>
<em>Saturday Oct 17, 2015 at 02:15 GMT</em><br>
<em>Originally opened as <a href="https://github.com/flutter/engine/issues/1655">https://github.com/flutter/engine/issues/1655</a></em></p>
<hr>
<p dir="auto">Following code cause to crash application</p>
<p dir="auto">[source]<br>
import 'dart:io';<br>
import 'dart:convert';<br>
import 'dart:async';</p>
<p dir="auto">main() async {<br>
List interfaces = await NetworkInterface.list(<br>
includeLoopback: true, includeLinkLocal: true);<br>
}</p>
<p dir="auto">[project]<br>
<a href="https://github.com/kyorohiro/hello_skyengine/tree/master/dartio_networkinterface">https://github.com/kyorohiro/hello_skyengine/tree/master/dartio_networkinterface</a></p>