Issue 1:
Steps to Reproduce

I selected text in a multi line Text Field and tested copy and pasting text and I moved the selection handles than I got this exception:

Note: The textfield is in scrollView and grows when lines are added until it reaches maxheights. Than it starts scrolling.

Scrollbar _renderInputField(BuildContext context) => new Scrollbar(
child: new SingleChildScrollView(
scrollDirection: Axis.vertical,
reverse: true,
child: new TextField(
focusNode: _textFieldFocusNode,
style: _appContext.customTheme.textInputStyle,
autofocus: true,
controller: _textController,
autocorrect: true,
onChanged: (text) {
// The first future does not have the
// updated height value of the text input field.
// On the second one the size is
// correctly updated. The height
// is necessary to update the
// scroll offset in the [ChatMessageListWidget]
new Future.delayed(
const Duration(milliseconds: 60),
() => setState(() {
updateAppContext(context);
})).then((_) => new Future.delayed(
const Duration(milliseconds: 60),
() => setState(() {
updateAppContext(context);
})));
groupController.messageComposeController.textChanged(text);
},
onSubmitted: _submitTextMessage,
maxLines: null, //unlimited lines

decoration: new InputDecoration.collapsed(
hintText:
/* _textFieldFocusNode.hasFocus
? 'has focus'
: */
'Send a message',
hintStyle: _customTheme.textInputHintStyle))));

Logs

[ +1 ms] W/IInputConnectionWrapper(23423): getTextAfterCursor on inactive InputConnection
[ ] W/IInputConnectionWrapper(23423): getSelectedText on inactive InputConnection
[ ] W/IInputConnectionWrapper(23423): endBatchEdit on inactive InputConnection
[ +35 ms] W/IInputConnectionWrapper(23423): getCursorCapsMode on inactive InputConnection
[ ] W/IInputConnectionWrapper(23423): beginBatchEdit on inactive InputConnection
[ ] W/IInputConnectionWrapper(23423): getTextBeforeCursor on inactive InputConnection
[ ] W/IInputConnectionWrapper(23423): getTextAfterCursor on inactive InputConnection
[ ] W/IInputConnectionWrapper(23423): getSelectedText on inactive InputConnection
[ ] W/IInputConnectionWrapper(23423): endBatchEdit on inactive InputConnection
[+17637 ms] W/IInputConnectionWrapper(23423): getCursorCapsMode on inactive InputConnection
[+6977 ms] W/IInputConnectionWrapper(23423): getCursorCapsMode on inactive InputConnection
[+7686 ms] W/IInputConnectionWrapper(23423): getCursorCapsMode on inactive InputConnection
[+18498 ms] W/IInputConnectionWrapper(23423): getCursorCapsMode on inactive InputConnection
[+30263 ms] I/flutter (23423): 1973 2018-01-31 21:40:37.134404 SEVERE lookatmybaby_flutter.sentry_error_reporter: Context: building _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#5b2d4](dirty, state: _OverlayEntryState#da995), library: widgets library
[ ] I/flutter (23423): error: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1457 pos 18: 'debugDoingThisResize || debugDoingThisLayout ||
[ ] I/flutter (23423): (RenderObject.debugActiveLayout == parent && _size._canBeUsedByParent)': is not true.
[ +624 ms] I/flutter (23423): #0 _AssertionError._doThrowNew (dart:core-patch/dart:core/errors_patch.dart:37)
[ ] I/flutter (23423): #1 _AssertionError._throwNew (dart:core-patch/dart:core/errors_patch.dart:33)
[ ] I/flutter (23423): #2 RenderBox.size.<anonymous closure> (package:flutter/src/rendering/box.dart:1457:18)
[ ] I/flutter (23423): #3 RenderBox.size (package:flutter/src/rendering/box.dart:1463:6)
[ ] I/flutter (23423): #4 RenderFractionalTranslation.applyPaintTransform (package:flutter/src/rendering/proxy_box.dart:2309:24)
[ ] I/flutter (23423): #5 RenderObject.getTransformTo (package:flutter/src/rendering/object.dart:2094:24)
[ ] I/flutter (23423): #6 RenderBox.localToGlobal (package:flutter/src/rendering/box.dart:1955:39)
[ ] I/flutter (23423): #7 TextSelectionOverlay._buildToolbar (package:flutter/src/widgets/text_selection.dart:365:20)
[ ] I/flutter (23423): #8 _OverlayEntryState.build (package:flutter/src/widgets/overlay.dart:170:25)
[ ] I/flutter (23423): #9 StatefulElement.build (package:flutter/src/widgets/framework.dart:3690:27)
[ ] I/flutter (23423): #10 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3602:15)
[ ] I/flutter (23423): #11 Element.rebuild (package:flutter/src/widgets/
[+3001 ms] I/flutter (23423): 1979 2018-01-31 21:40:40.763189 SEVERE lookatmybaby_flutter.sentry_error_reporter: Context: building _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#5b2d4](dirty, state: _OverlayEntryState#da995), library: widgets library
[ ] I/flutter (23423): error: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1457 pos 18: 'debugDoingThisResize || debugDoingThisLayout ||
[ ] I/flutter (23423): (RenderObject.debugActiveLayout == parent && _size._canBeUsedByParent)': is not true.
[ +789 ms] I/flutter (23423): #0 _AssertionError._doThrowNew (dart:core-patch/dart:core/errors_patch.dart:37)
[ ] I/flutter (23423): #1 _AssertionError._throwNew (dart:core-patch/dart:core/errors_patch.dart:33)
[ ] I/flutter (23423): #2 RenderBox.size.<anonymous closure> (package:flutter/src/rendering/box.dart:1457:18)
[ ] I/flutter (23423): #3 RenderBox.size (package:flutter/src/rendering/box.dart:1463:6)
[ ] I/flutter (23423): #4 RenderFractionalTranslation.applyPaintTransform (package:flutter/src/rendering/proxy_box.dart:2309:24)
[ ] I/flutter (23423): #5 RenderObject.getTransformTo (package:flutter/src/rendering/object.dart:2094:24)
[ ] I/flutter (23423): #6 RenderBox.localToGlobal (package:flutter/src/rendering/box.dart:1955:39)
[ ] I/flutter (23423): #7 TextSelectionOverlay._buildToolbar (package:flutter/src/widgets/text_selection.dart:365:20)
[ ] I/flutter (23423): #8 _OverlayEntryState.build (package:flutter/src/widgets/overlay.dart:170:25)
[ ] I/flutter (23423): #9 StatefulElement.build (package:flutter/src/widgets/framework.dart:3690:27)
[ ] I/flutter (23423): #10 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3602:15)
[ ] I/flutter (23423): #11 Element.rebuild (package:flutter/src/widgets/
[ +795 ms] I/flutter (23423): 1982 2018-01-31 21:40:42.349744 SEVERE lookatmybaby_flutter.sentry_error_reporter: Context: during layout, library: rendering library
[ ] I/flutter (23423): error: A RenderFlex overflowed by 128 pixels on the bottom.

Flutter Doctor

I used the Moto5 G below

C:\Projects\lambDev\lookatmybaby_flutter>flutter doctor

[√] Flutter (on Microsoft Windows [Version 10.0.16299.192], locale en-US, channel dev)

• Flutter version 0.0.21 at c:\sdks\flutter

• Framework revision 2e449f0 (2 days ago), 2018-01-29 14:26:51 -0800

• Engine revision 6921873

• Tools Dart version 2.0.0-dev.16.0

• Engine Dart version 2.0.0-edge.da1f52592ef73fe3afa485385cb995b9aec0181a

[√] Android toolchain - develop for Android devices (Android SDK 27.0.2)

• Android SDK at C:\Users\ride4\AppData\Local\Android\sdk

• Android NDK location not configured (optional; useful for native profiling support)

• Platform android-27, build-tools 27.0.2

• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java

• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] Android Studio (version 3.0)

• Android Studio at C:\Program Files\Android\Android Studio

• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] IntelliJ IDEA Community Edition (version 2017.2)

• Flutter plugin version 19.1

• Dart plugin version 172.4343.25

[√] Connected devices

• Moto G 5 Plus • ZY224DHFWG • android-arm • Android 7.0 (API 24)

• Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)

Issue 2:
Steps to Reproduce

Resizing a flutter app in large amounts most of the time causes a crash.

Starting in freeform mode and resizing small amounts seems to be ok, but larger amounts or changing an app from fullscreen to split/freeform causes a crash.

Flutter Doctor

[✓] Flutter (on Linux, channel alpha)
• Flutter at /home/dakun/dev/git/flutter/flutter
• Framework revision 9a0a0d9903 (13 days ago), engine revision f8d80c4617

[✓] Android toolchain - develop for Android devices (Android SDK 24.0.1)
• Android SDK at /home/dakun/dev/android-sdk-linux
• Platform android-24, build-tools 24.0.1
• OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)

Logs and Crash Reports

E/AndroidRuntime: FATAL EXCEPTION: main
E/AndroidRuntime: Process: com.yourcompany.myapp, PID: 28749
E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yourcompany.myapp/org.domokit.sky.shell.SkyActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void org.chromium.mojom.mojo.ServiceProvider$Proxy.connectToService(java.lang.String, org.chromium.mojo.system.MessagePipeHandle)' on a null object reference
E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
E/AndroidRuntime: at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4483)
E/AndroidRuntime: at android.app.ActivityThread.-wrap19(ActivityThread.java)
E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1466)
E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6077)
E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
E/AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void org.chromium.mojom.mojo.ServiceProvider$Proxy.connectToService(java.lang.String, org.chromium.mojo.system.MessagePipeHandle)' on a null object reference
E/AndroidRuntime: at io.flutter.view.FlutterView.createSemanticsServer(FlutterView.java:563)
E/AndroidRuntime: at io.flutter.view.FlutterView.ensureAccessibilityEnabled(FlutterView.java:555)
E/AndroidRuntime: at io.flutter.view.FlutterView.onAttachedToWindow(FlutterView.java:500)
E/AndroidRuntime: at android.view.View.dispatchAttachedToWindow(View.java:15391)
E/AndroidRuntime: at android.view.ViewGroup.addViewInner(ViewGroup.java:4493)
E/AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:4295)
E/AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:4267)
E/AndroidRuntime: at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:445)
E/AndroidRuntime: at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:426)
E/AndroidRuntime: at android.app.Activity.setContentView(Activity.java:2434)
E/AndroidRuntime: at org.domokit.sky.shell.SkyActivity.onCreate(SkyActivity.java:74)
E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6664)
E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
E/AndroidRuntime: ... 10 more
W/ActivityManager: Force finishing activity com.yourcompany.myapp/org.domokit.sky.shell.SkyActivity
W/ActivityManager: Force finishing activity com.yourcompany.myapp/org.domokit.sky.shell.SkyActivity
W/ActivityManager: Duplicate finish request for ActivityRecord{8610e5f u0 com.yourcompany.myapp/org.domokit.sky.shell.SkyActivity t6845 f}
W/ActivityManager: Activity pause timeout for ActivityRecord{8610e5f u0 com.yourcompany.myapp/org.domokit.sky.shell.SkyActivity t6845 f}