<p dir="auto">As reported by someone who tried this yesterday on Android. Confirmed on both Android N and Android O.</p>
<p dir="auto">This was the chunk of code that when added, lead to the exception:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Modify the _buildTextComposer method with the code below to define the 
// send button.

// ...
       new Container(                                          //new
         margin: new EdgeInsets.symmetric(horizontal: 4.0),    //new
         child: new IconButton(                                //new
           icon: new Icon(Icons.send),
           onPressed: () =&gt; _handleSubmitted(_textController.text)),//new
       ),  "><pre class="notranslate"><code class="notranslate">// Modify the _buildTextComposer method with the code below to define the 
// send button.

// ...
       new Container(                                          //new
         margin: new EdgeInsets.symmetric(horizontal: 4.0),    //new
         child: new IconButton(                                //new
           icon: new Icon(Icons.send),
           onPressed: () =&gt; _handleSubmitted(_textController.text)),//new
       ),  
</code></pre></div>
<p dir="auto">After this step in the codelab, the user can type into the text field, but when they hit the arrow button, they get this exception:</p>
<p dir="auto">here's the log from adb logcat from Android N 7.1.2:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="06-16 15:09:41.380 29675 29751 W GAv4    : Discarding hit. Too many hits sent too quickly, rate limiting invoked: sr=1080x1794,sf=100.0,ec=sync,ev=0,cid=6aeba2c7-3c46-492c-91a4-e84f0b5e5dae,_v=ma10.2.98,av=1.7.232.05.40,aip=1,v=1,a=1129632470,an=Slides,ul=en-us,t=event,tid=UA-21125203-7,aiid=com.android.vending,ea=entriesChanged,aid=com.google.android.apps.docs.editors.slides,el=null
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: Failed to handle method call
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1325)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:683)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:676)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.text.Selection.setSelection(Selection.java:76)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at io.flutter.plugin.editing.TextInputPlugin.setTextInputEditingState(TextInputPlugin.java:147)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at io.flutter.plugin.editing.TextInputPlugin.onMethodCall(TextInputPlugin.java:66)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:643)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.os.MessageQueue.nativePollOnce(Native Method)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.os.MessageQueue.next(MessageQueue.java:323)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.os.Looper.loop(Looper.java:136)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.app.ActivityThread.main(ActivityThread.java:6121)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at java.lang.reflect.Method.invoke(Native Method)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
06-16 15:09:42.277 29524 29544 I flutter : ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
06-16 15:09:42.295 29524 29544 I flutter : The following assertion was thrown during paint():
06-16 15:09:42.295 29524 29544 I flutter : 'package:flutter/src/rendering/object.dart': Failed assertion: line 2110: 'owner == null ||
06-16 15:09:42.295 29524 29544 I flutter : !owner.debugDoingPaint': is not true.
06-16 15:09:42.302 29524 29544 I flutter : 
06-16 15:09:42.302 29524 29544 I flutter : Either the assertion indicates an error in the framework itself, or we should provide substantially
06-16 15:09:42.302 29524 29544 I flutter : more information in this error message to help you determine and fix the underlying cause.
06-16 15:09:42.303 29524 29544 I flutter : In either case, please report this assertion by filing a bug on GitHub:
06-16 15:09:42.303 29524 29544 I flutter :   https://github.com/flutter/flutter/issues/new
06-16 15:09:42.303 29524 29544 I flutter : 
06-16 15:09:42.303 29524 29544 I flutter : When the exception was thrown, this was the stack:
06-16 15:09:42.311 29524 29544 I flutter : #2      RenderObject.markNeedsPaint (package:flutter/src/rendering/object.dart:2110)
06-16 15:09:42.312 29524 29544 I flutter : #3      _RenderInkFeatures._didChangeLayout (package:flutter/src/material/material.dart:315)
06-16 15:09:42.312 29524 29544 I flutter : #4      _MaterialState.build.&lt;anonymous closure&gt; (package:flutter/src/material/material.dart:228)
06-16 15:09:42.312 29524 29544 I flutter : #5      NotificationListener._dispatch (package:flutter/src/widgets/notification_listener.dart:110)
06-16 15:09:42.312 29524 29544 I flutter : #6      Notification.visitAncestor (package:flutter/src/widgets/notification_listener.dart:43)
06-16 15:09:42.312 29524 29544 I flutter : #7      LayoutChangedNotification&amp;ViewportNotificationMixin.visitAncestor (package:flutter/src/widgets/scroll_notification.dart:36)
06-16 15:09:42.312 29524 29544 I flutter : #8      Element.visitAncestorElements (package:flutter/src/widgets/framework.dart:3103)
06-16 15:09:42.312 29524 29544 I flutter : #9      Notification.dispatch (package:flutter/src/widgets/notification_listener.dart:57)
06-16 15:09:42.312 29524 29544 I flutter : #10     ScrollActivity.dispatchScrollStartNotification (package:flutter/src/widgets/scroll_activity.dart:90)
06-16 15:09:42.312 29524 29544 I flutter : #11     ScrollPosition.didStartScroll (package:flutter/src/widgets/scroll_position.dart:543)
06-16 15:09:42.312 29524 29544 I flutter : #12     ScrollPosition.beginActivity (package:flutter/src/widgets/scroll_position.dart:535)
06-16 15:09:42.312 29524 29544 I flutter : #13     ScrollPositionWithSingleContext.beginActivity (package:flutter/src/widgets/scroll_position_with_single_context.dart:119)
06-16 15:09:42.312 29524 29544 I flutter : #14     ScrollPositionWithSingleContext.animateTo (package:flutter/src/widgets/scroll_position_with_single_context.dart:186)
06-16 15:09:42.312 29524 29544 I flutter : #15     ScrollController.animateTo (package:flutter/src/widgets/scroll_controller.dart:143)
06-16 15:09:42.312 29524 29544 I flutter : #16     EditableTextState._handleCaretChanged (package:flutter/src/widgets/editable_text.dart:463)
06-16 15:09:42.312 29524 29544 I flutter : #17     RenderEditable._paintCaret (package:flutter/src/rendering/editable.dart:497)
06-16 15:09:42.312 29524 29544 I flutter : #18     RenderEditable._paintContents (package:flutter/src/rendering/editable.dart:515)
06-16 15:09:42.312 29524 29544 I flutter : #19     RenderEditable.paint (package:flutter/src/rendering/editable.dart:531)
06-16 15:09:42.312 29524 29544 I flutter : #20     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
06-16 15:09:42.313 29524 29544 I flutter : #21     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
06-16 15:09:42.313 29524 29544 I flutter : #22     RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
06-16 15:09:42.313 29524 29544 I flutter : #23     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
06-16 15:09:42.313 29524 29544 I flutter : #24     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
06-16 15:09:42.313 29524 29544 I flutter : #25     RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
06-16 15:09:42.313 29524 29544 I flutter : #26     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
06-16 15:09:42.313 29524 29544 I flutter : #27     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
06-16 15:09:42.313 29524 29544 I flutter : #28     RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
06-16 15:09:42.313 29524 29544 I flutter : #29     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
06-16 15:09:42.313 29524 29544 I flutter : #30     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
06-16 15:09:42.313 29524 29544 I flutter : #31     RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
06-16 15:09:42.313 29524 29544 I flutter : #32     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
06-16 15:09:42.313 29524 29544 I flutter : #33     PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:96)
06-16 15:09:42.313 29524 29544 I flutter : #34     PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1085)
06-16 15:09:42.313 29524 29544 I flutter : #35     BindingBase&amp;SchedulerBinding&amp;GestureBinding&amp;ServicesBinding&amp;RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:253)
06-16 15:09:42.313 29524 29544 I flutter : #36     BindingBase&amp;SchedulerBinding&amp;GestureBinding&amp;ServicesBinding&amp;RendererBinding&amp;WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:504)
06-16 15:09:42.313 29524 29544 I flutter : #37     BindingBase&amp;SchedulerBinding&amp;GestureBinding&amp;ServicesBinding&amp;RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:189)
06-16 15:09:42.314 29524 29544 I flutter : #38     BindingBase&amp;SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:688)
06-16 15:09:42.314 29524 29544 I flutter : #39     BindingBase&amp;SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:636)
06-16 15:09:42.314 29524 29544 I flutter : #40     _drawFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:70)
06-16 15:09:42.314 29524 29544 I flutter : (elided 2 frames from class _AssertionError)
06-16 15:09:42.334 29524 29544 I flutter : 
06-16 15:09:42.334 29524 29544 I flutter : The following RenderObject was being processed when the exception was fired:
06-16 15:09:42.334 29524 29544 I flutter :   RenderEditable#1023788513 relayoutBoundary=up14
06-16 15:09:42.334 29524 29544 I flutter :   creator: _Editable ← _ScrollableScope ← IgnorePointer-[GlobalKey#548512129] ← Listener ←
06-16 15:09:42.334 29524 29544 I flutter :   _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey&lt;RawGestureDetectorState&gt;#404540233] ←
06-16 15:09:42.334 29524 29544 I flutter :   RepaintBoundary ← CustomPaint ← RepaintBoundary ← NotificationListener&lt;ScrollNotification&gt; ←
06-16 15:09:42.334 29524 29544 I flutter :   GlowingOverscrollIndicator ← Scrollable ← ⋯
06-16 15:09:42.334 29524 29544 I flutter :   parentData: &lt;none&gt; (can use size)
06-16 15:09:42.334 29524 29544 I flutter :   constraints: BoxConstraints(w=339.4, 0.0&lt;=h&lt;=321.1)
06-16 15:09:42.334 29524 29544 I flutter :   size: Size(339.4, 38.0)
06-16 15:09:42.334 29524 29544 I flutter :   cursorColor: Color(0xff90caf9)
06-16 15:09:42.334 29524 29544 I flutter :   showCursor: ValueNotifier&lt;bool&gt;#369763540(true)
06-16 15:09:42.334 29524 29544 I flutter :   maxLines: 2
06-16 15:09:42.334 29524 29544 I flutter :   selectionColor: Color(0xff90caf9)
06-16 15:09:42.334 29524 29544 I flutter :   textScaleFactor: 1.0
06-16 15:09:42.334 29524 29544 I flutter :   selection: TextSelection(baseOffset: -1, extentOffset: -1, affinity: TextAffinity.downstream,
06-16 15:09:42.334 29524 29544 I flutter :   isDirectional: false)
06-16 15:09:42.334 29524 29544 I flutter :   offset: ScrollPositionWithSingleContext#309474994(offset: 0.0, range: 0.0..0.0, viewport: 38.0,
06-16 15:09:42.334 29524 29544 I flutter :   ScrollableState, ClampingScrollPhysics -&gt; ClampingScrollPhysics,
06-16 15:09:42.334 29524 29544 I flutter :   DrivenScrollActivity#359018454(AnimationController#111705517(▶ 0.000; for DrivenScrollActivity)),
06-16 15:09:42.334 29524 29544 I flutter :   ScrollDirection.idle)
06-16 15:09:42.334 29524 29544 I flutter : This RenderObject has no descendants.
06-16 15:09:42.334 29524 29544 I flutter : ════════════════════════════════════════════════════════════════════════════════════════════════════
06-16 15:09:42.345 29524 29544 E flutter : [ERROR:../../lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
06-16 15:09:42.345 29524 29544 E flutter : PlatformException(error, setSpan (-1 ... -1) starts before 0, null)
06-16 15:09:42.345 29524 29544 E flutter : #0      JSONMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:145)
06-16 15:09:42.345 29524 29544 E flutter : #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:154)
06-16 15:09:42.345 29524 29544 E flutter : &lt;asynchronous suspension&gt;
06-16 15:09:42.345 29524 29544 E flutter : #2      OptionalMethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:228)
06-16 15:09:42.345 29524 29544 E flutter : &lt;asynchronous suspension&gt;
06-16 15:09:42.345 29524 29544 E flutter : #3      TextInputConnection.setEditingState (package:flutter/src/services/text_input.dart:248)
06-16 15:09:42.345 29524 29544 E flutter : #4      EditableTextState._updateRemoteEditingValueIfNeeded (package:flutter/src/widgets/editable_text.dart:342)
06-16 15:09:42.345 29524 29544 E flutter : #5      EditableTextState._didChangeTextEditingValue (package:flutter/src/widgets/editable_text.dart:516)
06-16 15:09:42.345 29524 29544 E flutter : #6      ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:129)
06-16 15:09:42.345 29524 29544 E flutter : #7      ValueNotifier.value= (package:flutter/src/foundation/change_notifier.dart:184)
06-16 15:09:42.345 29524 29544 E flutter : #8      TextEditingController.clear (package:flutter/src/widgets/editable_text.dart:95)
06-16 15:09:42.345 29524 29544 E flutter : #9      ChatScreenState._handleSubmitted (file:///Users/nasir/flutter-work/my_friendlychat/lib/main.dart:67)
06-16 15:09:42.345 29524 29544 E flutter : #10     ChatScreenState._buildTextComposer.&lt;anonymous closure&gt; (file:///Users/nasir/flutter-work/my_friendlychat/lib/main.dart:58)
06-16 15:09:42.345 29524 29544 E flutter : #11     _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:229)
06-16 15:09:42.345 29524 29544 E flutter : #12     GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:67)
06-16 15:09:42.345 29524 29544 E flutter : #13     TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:149)
06-16 15:09:42.345 29524 29544 E flutter : #14     TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:92)
06-16 15:09:42.345 29524 29544 E flutter : #15     PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:268)
06-16 15:09:42.345 29524 29544 E flutter : #16     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:73)
06-16 15:09:42.345 29524 29544 E flutter : #17     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101)
06-16 15:09:42.345 29524 29544 E flutter : #18     BindingBase&amp;SchedulerBinding&amp;GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:127)
06-16 15:09:42.345 29524 29544 E flutter : #19     BindingBase&amp;SchedulerBinding&amp;GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:105)
06-16 15:09:42.345 29524 29544 E flutter : #20     BindingBase&amp;SchedulerBinding&amp;GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:86)
06-16 15:09:42.345 29524 29544 E flutter : #21     BindingBase&amp;SchedulerBinding&amp;GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:45)
06-16 15:09:42.345 29524 29544 E flutter : #22     BindingBase&amp;SchedulerBinding&amp;GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:38)
06-16 15:09:42.345 29524 29544 E flutter : #23     _dispatchPointerDataPacket (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:55)
06-16 15:09:44.684  1058  1068 I art     : Background sticky concurrent mark sweep GC freed 71424(4MB) AllocSpace objects, 42(4MB) LOS objects, 14% free, 50MB/59MB, paused 2.829ms total 102.627ms
06-16 15:09:44.862 29675 29874 W JSVM    : JSVM cleanup: hasContext=true, isCleaned=false
"><pre class="notranslate"><code class="notranslate">06-16 15:09:41.380 29675 29751 W GAv4    : Discarding hit. Too many hits sent too quickly, rate limiting invoked: sr=1080x1794,sf=100.0,ec=sync,ev=0,cid=6aeba2c7-3c46-492c-91a4-e84f0b5e5dae,_v=ma10.2.98,av=1.7.232.05.40,aip=1,v=1,a=1129632470,an=Slides,ul=en-us,t=event,tid=UA-21125203-7,aiid=com.android.vending,ea=entriesChanged,aid=com.google.android.apps.docs.editors.slides,el=null
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: Failed to handle method call
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1325)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:683)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:676)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.text.Selection.setSelection(Selection.java:76)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at io.flutter.plugin.editing.TextInputPlugin.setTextInputEditingState(TextInputPlugin.java:147)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at io.flutter.plugin.editing.TextInputPlugin.onMethodCall(TextInputPlugin.java:66)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:643)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.os.MessageQueue.nativePollOnce(Native Method)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.os.MessageQueue.next(MessageQueue.java:323)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.os.Looper.loop(Looper.java:136)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at android.app.ActivityThread.main(ActivityThread.java:6121)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at java.lang.reflect.Method.invoke(Native Method)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
06-16 15:09:42.255 29524 29524 E MethodChannel#flutter/textinput: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
06-16 15:09:42.277 29524 29544 I flutter : ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
06-16 15:09:42.295 29524 29544 I flutter : The following assertion was thrown during paint():
06-16 15:09:42.295 29524 29544 I flutter : 'package:flutter/src/rendering/object.dart': Failed assertion: line 2110: 'owner == null ||
06-16 15:09:42.295 29524 29544 I flutter : !owner.debugDoingPaint': is not true.
06-16 15:09:42.302 29524 29544 I flutter : 
06-16 15:09:42.302 29524 29544 I flutter : Either the assertion indicates an error in the framework itself, or we should provide substantially
06-16 15:09:42.302 29524 29544 I flutter : more information in this error message to help you determine and fix the underlying cause.
06-16 15:09:42.303 29524 29544 I flutter : In either case, please report this assertion by filing a bug on GitHub:
06-16 15:09:42.303 29524 29544 I flutter :   https://github.com/flutter/flutter/issues/new
06-16 15:09:42.303 29524 29544 I flutter : 
06-16 15:09:42.303 29524 29544 I flutter : When the exception was thrown, this was the stack:
06-16 15:09:42.311 29524 29544 I flutter : #2      RenderObject.markNeedsPaint (package:flutter/src/rendering/object.dart:2110)
06-16 15:09:42.312 29524 29544 I flutter : #3      _RenderInkFeatures._didChangeLayout (package:flutter/src/material/material.dart:315)
06-16 15:09:42.312 29524 29544 I flutter : #4      _MaterialState.build.&lt;anonymous closure&gt; (package:flutter/src/material/material.dart:228)
06-16 15:09:42.312 29524 29544 I flutter : #5      NotificationListener._dispatch (package:flutter/src/widgets/notification_listener.dart:110)
06-16 15:09:42.312 29524 29544 I flutter : #6      Notification.visitAncestor (package:flutter/src/widgets/notification_listener.dart:43)
06-16 15:09:42.312 29524 29544 I flutter : #7      LayoutChangedNotification&amp;ViewportNotificationMixin.visitAncestor (package:flutter/src/widgets/scroll_notification.dart:36)
06-16 15:09:42.312 29524 29544 I flutter : #8      Element.visitAncestorElements (package:flutter/src/widgets/framework.dart:3103)
06-16 15:09:42.312 29524 29544 I flutter : #9      Notification.dispatch (package:flutter/src/widgets/notification_listener.dart:57)
06-16 15:09:42.312 29524 29544 I flutter : #10     ScrollActivity.dispatchScrollStartNotification (package:flutter/src/widgets/scroll_activity.dart:90)
06-16 15:09:42.312 29524 29544 I flutter : #11     ScrollPosition.didStartScroll (package:flutter/src/widgets/scroll_position.dart:543)
06-16 15:09:42.312 29524 29544 I flutter : #12     ScrollPosition.beginActivity (package:flutter/src/widgets/scroll_position.dart:535)
06-16 15:09:42.312 29524 29544 I flutter : #13     ScrollPositionWithSingleContext.beginActivity (package:flutter/src/widgets/scroll_position_with_single_context.dart:119)
06-16 15:09:42.312 29524 29544 I flutter : #14     ScrollPositionWithSingleContext.animateTo (package:flutter/src/widgets/scroll_position_with_single_context.dart:186)
06-16 15:09:42.312 29524 29544 I flutter : #15     ScrollController.animateTo (package:flutter/src/widgets/scroll_controller.dart:143)
06-16 15:09:42.312 29524 29544 I flutter : #16     EditableTextState._handleCaretChanged (package:flutter/src/widgets/editable_text.dart:463)
06-16 15:09:42.312 29524 29544 I flutter : #17     RenderEditable._paintCaret (package:flutter/src/rendering/editable.dart:497)
06-16 15:09:42.312 29524 29544 I flutter : #18     RenderEditable._paintContents (package:flutter/src/rendering/editable.dart:515)
06-16 15:09:42.312 29524 29544 I flutter : #19     RenderEditable.paint (package:flutter/src/rendering/editable.dart:531)
06-16 15:09:42.312 29524 29544 I flutter : #20     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
06-16 15:09:42.313 29524 29544 I flutter : #21     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
06-16 15:09:42.313 29524 29544 I flutter : #22     RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
06-16 15:09:42.313 29524 29544 I flutter : #23     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
06-16 15:09:42.313 29524 29544 I flutter : #24     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
06-16 15:09:42.313 29524 29544 I flutter : #25     RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
06-16 15:09:42.313 29524 29544 I flutter : #26     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
06-16 15:09:42.313 29524 29544 I flutter : #27     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
06-16 15:09:42.313 29524 29544 I flutter : #28     RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
06-16 15:09:42.313 29524 29544 I flutter : #29     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
06-16 15:09:42.313 29524 29544 I flutter : #30     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
06-16 15:09:42.313 29524 29544 I flutter : #31     RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
06-16 15:09:42.313 29524 29544 I flutter : #32     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
06-16 15:09:42.313 29524 29544 I flutter : #33     PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:96)
06-16 15:09:42.313 29524 29544 I flutter : #34     PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1085)
06-16 15:09:42.313 29524 29544 I flutter : #35     BindingBase&amp;SchedulerBinding&amp;GestureBinding&amp;ServicesBinding&amp;RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:253)
06-16 15:09:42.313 29524 29544 I flutter : #36     BindingBase&amp;SchedulerBinding&amp;GestureBinding&amp;ServicesBinding&amp;RendererBinding&amp;WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:504)
06-16 15:09:42.313 29524 29544 I flutter : #37     BindingBase&amp;SchedulerBinding&amp;GestureBinding&amp;ServicesBinding&amp;RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:189)
06-16 15:09:42.314 29524 29544 I flutter : #38     BindingBase&amp;SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:688)
06-16 15:09:42.314 29524 29544 I flutter : #39     BindingBase&amp;SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:636)
06-16 15:09:42.314 29524 29544 I flutter : #40     _drawFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:70)
06-16 15:09:42.314 29524 29544 I flutter : (elided 2 frames from class _AssertionError)
06-16 15:09:42.334 29524 29544 I flutter : 
06-16 15:09:42.334 29524 29544 I flutter : The following RenderObject was being processed when the exception was fired:
06-16 15:09:42.334 29524 29544 I flutter :   RenderEditable#1023788513 relayoutBoundary=up14
06-16 15:09:42.334 29524 29544 I flutter :   creator: _Editable ← _ScrollableScope ← IgnorePointer-[GlobalKey#548512129] ← Listener ←
06-16 15:09:42.334 29524 29544 I flutter :   _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey&lt;RawGestureDetectorState&gt;#404540233] ←
06-16 15:09:42.334 29524 29544 I flutter :   RepaintBoundary ← CustomPaint ← RepaintBoundary ← NotificationListener&lt;ScrollNotification&gt; ←
06-16 15:09:42.334 29524 29544 I flutter :   GlowingOverscrollIndicator ← Scrollable ← ⋯
06-16 15:09:42.334 29524 29544 I flutter :   parentData: &lt;none&gt; (can use size)
06-16 15:09:42.334 29524 29544 I flutter :   constraints: BoxConstraints(w=339.4, 0.0&lt;=h&lt;=321.1)
06-16 15:09:42.334 29524 29544 I flutter :   size: Size(339.4, 38.0)
06-16 15:09:42.334 29524 29544 I flutter :   cursorColor: Color(0xff90caf9)
06-16 15:09:42.334 29524 29544 I flutter :   showCursor: ValueNotifier&lt;bool&gt;#369763540(true)
06-16 15:09:42.334 29524 29544 I flutter :   maxLines: 2
06-16 15:09:42.334 29524 29544 I flutter :   selectionColor: Color(0xff90caf9)
06-16 15:09:42.334 29524 29544 I flutter :   textScaleFactor: 1.0
06-16 15:09:42.334 29524 29544 I flutter :   selection: TextSelection(baseOffset: -1, extentOffset: -1, affinity: TextAffinity.downstream,
06-16 15:09:42.334 29524 29544 I flutter :   isDirectional: false)
06-16 15:09:42.334 29524 29544 I flutter :   offset: ScrollPositionWithSingleContext#309474994(offset: 0.0, range: 0.0..0.0, viewport: 38.0,
06-16 15:09:42.334 29524 29544 I flutter :   ScrollableState, ClampingScrollPhysics -&gt; ClampingScrollPhysics,
06-16 15:09:42.334 29524 29544 I flutter :   DrivenScrollActivity#359018454(AnimationController#111705517(▶ 0.000; for DrivenScrollActivity)),
06-16 15:09:42.334 29524 29544 I flutter :   ScrollDirection.idle)
06-16 15:09:42.334 29524 29544 I flutter : This RenderObject has no descendants.
06-16 15:09:42.334 29524 29544 I flutter : ════════════════════════════════════════════════════════════════════════════════════════════════════
06-16 15:09:42.345 29524 29544 E flutter : [ERROR:../../lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
06-16 15:09:42.345 29524 29544 E flutter : PlatformException(error, setSpan (-1 ... -1) starts before 0, null)
06-16 15:09:42.345 29524 29544 E flutter : #0      JSONMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:145)
06-16 15:09:42.345 29524 29544 E flutter : #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:154)
06-16 15:09:42.345 29524 29544 E flutter : &lt;asynchronous suspension&gt;
06-16 15:09:42.345 29524 29544 E flutter : #2      OptionalMethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:228)
06-16 15:09:42.345 29524 29544 E flutter : &lt;asynchronous suspension&gt;
06-16 15:09:42.345 29524 29544 E flutter : #3      TextInputConnection.setEditingState (package:flutter/src/services/text_input.dart:248)
06-16 15:09:42.345 29524 29544 E flutter : #4      EditableTextState._updateRemoteEditingValueIfNeeded (package:flutter/src/widgets/editable_text.dart:342)
06-16 15:09:42.345 29524 29544 E flutter : #5      EditableTextState._didChangeTextEditingValue (package:flutter/src/widgets/editable_text.dart:516)
06-16 15:09:42.345 29524 29544 E flutter : #6      ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:129)
06-16 15:09:42.345 29524 29544 E flutter : #7      ValueNotifier.value= (package:flutter/src/foundation/change_notifier.dart:184)
06-16 15:09:42.345 29524 29544 E flutter : #8      TextEditingController.clear (package:flutter/src/widgets/editable_text.dart:95)
06-16 15:09:42.345 29524 29544 E flutter : #9      ChatScreenState._handleSubmitted (file:///Users/nasir/flutter-work/my_friendlychat/lib/main.dart:67)
06-16 15:09:42.345 29524 29544 E flutter : #10     ChatScreenState._buildTextComposer.&lt;anonymous closure&gt; (file:///Users/nasir/flutter-work/my_friendlychat/lib/main.dart:58)
06-16 15:09:42.345 29524 29544 E flutter : #11     _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:229)
06-16 15:09:42.345 29524 29544 E flutter : #12     GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:67)
06-16 15:09:42.345 29524 29544 E flutter : #13     TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:149)
06-16 15:09:42.345 29524 29544 E flutter : #14     TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:92)
06-16 15:09:42.345 29524 29544 E flutter : #15     PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:268)
06-16 15:09:42.345 29524 29544 E flutter : #16     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:73)
06-16 15:09:42.345 29524 29544 E flutter : #17     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101)
06-16 15:09:42.345 29524 29544 E flutter : #18     BindingBase&amp;SchedulerBinding&amp;GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:127)
06-16 15:09:42.345 29524 29544 E flutter : #19     BindingBase&amp;SchedulerBinding&amp;GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:105)
06-16 15:09:42.345 29524 29544 E flutter : #20     BindingBase&amp;SchedulerBinding&amp;GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:86)
06-16 15:09:42.345 29524 29544 E flutter : #21     BindingBase&amp;SchedulerBinding&amp;GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:45)
06-16 15:09:42.345 29524 29544 E flutter : #22     BindingBase&amp;SchedulerBinding&amp;GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:38)
06-16 15:09:42.345 29524 29544 E flutter : #23     _dispatchPointerDataPacket (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:55)
06-16 15:09:44.684  1058  1068 I art     : Background sticky concurrent mark sweep GC freed 71424(4MB) AllocSpace objects, 42(4MB) LOS objects, 14% free, 50MB/59MB, paused 2.829ms total 102.627ms
06-16 15:09:44.862 29675 29874 W JSVM    : JSVM cleanup: hasContext=true, isCleaned=false

</code></pre></div>
<p dir="auto">I hit it first after making minor changes to the flutter code lab, and am hitting it now, while trying to put together a simpler flutter app.</p>
<p dir="auto">Hot reload is not working, cold launches sometimes work.</p>
<p dir="auto">Flutter run from IJ.</p>
<p dir="auto">Launching lib/main.dart on Nexus 6P in debug mode...<br>
Built build/app/outputs/apk/app-debug.apk (21.7MB).<br>
W/IInputConnectionWrapper(21208): reportFullscreenMode on inexistent InputConnection<br>
I/flutter (21208): executeQuery<br>
Restarted app in 1,286ms.<br>
E/MethodChannel#flutter/textinput(21208): Failed to handle method call<br>
E/MethodChannel#flutter/textinput(21208): java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0<br>
E/MethodChannel#flutter/textinput(21208): 	at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1325)<br>
E/MethodChannel#flutter/textinput(21208): 	at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:683)<br>
E/MethodChannel#flutter/textinput(21208): 	at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:676)<br>
E/MethodChannel#flutter/textinput(21208): 	at android.text.Selection.setSelection(Selection.java:76)<br>
E/MethodChannel#flutter/textinput(21208): 	at io.flutter.plugin.editing.TextInputPlugin.setTextInputEditingState(TextInputPlugin.java:147)<br>
E/MethodChannel#flutter/textinput(21208): 	at io.flutter.plugin.editing.TextInputPlugin.onMethodCall(TextInputPlugin.java:66)<br>
E/MethodChannel#flutter/textinput(21208): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)<br>
E/MethodChannel#flutter/textinput(21208): 	at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:643)<br>
E/MethodChannel#flutter/textinput(21208): 	at android.os.MessageQueue.nativePollOnce(Native Method)<br>
E/MethodChannel#flutter/textinput(21208): 	at android.os.MessageQueue.next(MessageQueue.java:323)<br>
E/MethodChannel#flutter/textinput(21208): 	at android.os.Looper.loop(Looper.java:136)<br>
E/MethodChannel#flutter/textinput(21208): 	at android.app.ActivityThread.main(ActivityThread.java:6121)<br>
E/MethodChannel#flutter/textinput(21208): 	at java.lang.reflect.Method.invoke(Native Method)<br>
E/MethodChannel#flutter/textinput(21208): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)<br>
E/MethodChannel#flutter/textinput(21208): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)</p>
<p dir="auto">flutter analyze:<br>
~/src/github/flutter/bin/flutter analyze<br>
Analyzing jwren/src/github/flutter_google_knowledge_graph...<br>
hint • The value of the local variable 'v' isn't used at lib/main.dart:97:9 • unused_local_variable<br>
1 issue found.<br>
(Ran in 4.5s)</p>