Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep hitting an exception in rendering engine (I think) #10748

Closed
jwren opened this issue Jun 15, 2017 · 5 comments
Closed

Keep hitting an exception in rendering engine (I think) #10748

jwren opened this issue Jun 15, 2017 · 5 comments

Comments

@jwren
Copy link
Contributor

jwren commented Jun 15, 2017

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.

Hot reload is not working, cold launches sometimes work.

Flutter run from IJ.

Launching lib/main.dart on Nexus 6P in debug mode...
Built build/app/outputs/apk/app-debug.apk (21.7MB).
W/IInputConnectionWrapper(21208): reportFullscreenMode on inexistent InputConnection
I/flutter (21208): executeQuery
Restarted app in 1,286ms.
E/MethodChannel#flutter/textinput(21208): Failed to handle method call
E/MethodChannel#flutter/textinput(21208): java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0
E/MethodChannel#flutter/textinput(21208): at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1325)
E/MethodChannel#flutter/textinput(21208): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:683)
E/MethodChannel#flutter/textinput(21208): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:676)
E/MethodChannel#flutter/textinput(21208): at android.text.Selection.setSelection(Selection.java:76)
E/MethodChannel#flutter/textinput(21208): at io.flutter.plugin.editing.TextInputPlugin.setTextInputEditingState(TextInputPlugin.java:147)
E/MethodChannel#flutter/textinput(21208): at io.flutter.plugin.editing.TextInputPlugin.onMethodCall(TextInputPlugin.java:66)
E/MethodChannel#flutter/textinput(21208): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
E/MethodChannel#flutter/textinput(21208): at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:643)
E/MethodChannel#flutter/textinput(21208): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter/textinput(21208): at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#flutter/textinput(21208): at android.os.Looper.loop(Looper.java:136)
E/MethodChannel#flutter/textinput(21208): at android.app.ActivityThread.main(ActivityThread.java:6121)
E/MethodChannel#flutter/textinput(21208): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/textinput(21208): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
E/MethodChannel#flutter/textinput(21208): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

flutter analyze:
~/src/github/flutter/bin/flutter analyze
Analyzing jwren/src/github/flutter_google_knowledge_graph...
hint • The value of the local variable 'v' isn't used at lib/main.dart:97:9 • unused_local_variable
1 issue found.
(Ran in 4.5s)

@eseidelGoogle
Copy link
Contributor

Can you add the output of flutter doctor to the bug?

@jwren
Copy link
Contributor Author

jwren commented Jun 15, 2017

~/src/github/flutter/bin/flutter doctor
[✓] Flutter (on Linux, locale en_US.UTF-8, channel master)
• Flutter at /usr/local/google/home/jwren/src/github/flutter
• Framework revision 747e25e (5 hours ago), 2017-06-15 10:29:42 -0700
• Engine revision 18fdfb8
• Tools Dart version 1.24.0-dev.6.7

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.3)
• Android SDK at /usr/local/google/home/jwren/Android/Sdk
• Platform android-26, build-tools 25.0.3
• Java binary at: /opt/android-studio-with-blaze-2.3/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] Android Studio (version 2.3)
• Android Studio at /opt/android-studio-with-blaze-2.3
• Gradle version 3.2
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[-] IntelliJ IDEA Community Edition (version 2016.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about managing plugins, see
https://www.jetbrains.com/help/idea/managing-plugins.html
✗ This install is older than the minimum recommended version of 2017.1.0.

[✓] IntelliJ IDEA Ultimate Edition (version 2017.1)
• Flutter plugin version 14.0
• Dart plugin version 171.4424

[-] IntelliJ IDEA Ultimate Edition (version 2016.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
• Dart plugin version 163.13137
• For information about managing plugins, see
https://www.jetbrains.com/help/idea/managing-plugins.html
✗ This install is older than the minimum recommended version of 2017.1.0.

[-] WebStorm (version 2017.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
• For information about managing plugins, see
https://www.jetbrains.com/help/idea/managing-plugins.html

[-] IntelliJ IDEA Ultimate Edition (version 2017.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
• Dart plugin version 172.2273.2
• For information about managing plugins, see
https://www.jetbrains.com/help/idea/managing-plugins.html

[✓] Connected devices
• Nexus 6P • 8XV5T15A23006933 • android-arm • Android 7.1.2 (API 25)

@jwren
Copy link
Contributor Author

jwren commented Jun 15, 2017

Additional (longer) stack trace showing issue:

Launching lib/main.dart on Nexus 6P in debug mode...
Built build/app/outputs/apk/app-debug.apk (21.7MB).
W/IInputConnectionWrapper(22016): finishComposingText on inactive InputConnection
E/MethodChannel#flutter/textinput(22016): Failed to handle method call
E/MethodChannel#flutter/textinput(22016): java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0
E/MethodChannel#flutter/textinput(22016): at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1325)
E/MethodChannel#flutter/textinput(22016): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:683)
E/MethodChannel#flutter/textinput(22016): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:676)
E/MethodChannel#flutter/textinput(22016): at android.text.Selection.setSelection(Selection.java:76)
E/MethodChannel#flutter/textinput(22016): at io.flutter.plugin.editing.TextInputPlugin.setTextInputEditingState(TextInputPlugin.java:147)
E/MethodChannel#flutter/textinput(22016): at io.flutter.plugin.editing.TextInputPlugin.onMethodCall(TextInputPlugin.java:66)
E/MethodChannel#flutter/textinput(22016): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
E/MethodChannel#flutter/textinput(22016): at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:643)
E/MethodChannel#flutter/textinput(22016): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter/textinput(22016): at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#flutter/textinput(22016): at android.os.Looper.loop(Looper.java:136)
E/MethodChannel#flutter/textinput(22016): at android.app.ActivityThread.main(ActivityThread.java:6121)
E/MethodChannel#flutter/textinput(22016): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/textinput(22016): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
E/MethodChannel#flutter/textinput(22016): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
I/flutter (22016): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (22016): The following assertion was thrown during paint():
I/flutter (22016): 'package:flutter/src/rendering/object.dart': Failed assertion: line 2110: 'owner == null ||
I/flutter (22016): !owner.debugDoingPaint': is not true.
I/flutter (22016):
I/flutter (22016): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (22016): more information in this error message to help you determine and fix the underlying cause.
I/flutter (22016): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (22016): https://github.com/flutter/flutter/issues/new
I/flutter (22016):
I/flutter (22016): When the exception was thrown, this was the stack:
I/flutter (22016): #2 RenderObject.markNeedsPaint (package:flutter/src/rendering/object.dart:2110)
I/flutter (22016): #3 _RenderInkFeatures._didChangeLayout (package:flutter/src/material/material.dart:315)
I/flutter (22016): #4 _MaterialState.build. (package:flutter/src/material/material.dart:228)
I/flutter (22016): #5 NotificationListener._dispatch (package:flutter/src/widgets/notification_listener.dart:110)
I/flutter (22016): #6 Notification.visitAncestor (package:flutter/src/widgets/notification_listener.dart:43)
I/flutter (22016): #7 LayoutChangedNotification&ViewportNotificationMixin.visitAncestor (package:flutter/src/widgets/scroll_notification.dart:36)
I/flutter (22016): #8 Element.visitAncestorElements (package:flutter/src/widgets/framework.dart:3103)
I/flutter (22016): #9 Notification.dispatch (package:flutter/src/widgets/notification_listener.dart:57)
I/flutter (22016): #10 ScrollActivity.dispatchScrollStartNotification (package:flutter/src/widgets/scroll_activity.dart:90)
I/flutter (22016): #11 ScrollPosition.didStartScroll (package:flutter/src/widgets/scroll_position.dart:543)
I/flutter (22016): #12 ScrollPosition.beginActivity (package:flutter/src/widgets/scroll_position.dart:535)
I/flutter (22016): #13 ScrollPositionWithSingleContext.beginActivity (package:flutter/src/widgets/scroll_position_with_single_context.dart:119)
I/flutter (22016): #14 ScrollPositionWithSingleContext.animateTo (package:flutter/src/widgets/scroll_position_with_single_context.dart:186)
I/flutter (22016): #15 ScrollController.animateTo (package:flutter/src/widgets/scroll_controller.dart:143)
I/flutter (22016): #16 EditableTextState._handleCaretChanged (package:flutter/src/widgets/editable_text.dart:463)
I/flutter (22016): #17 RenderEditable._paintCaret (package:flutter/src/rendering/editable.dart:497)
I/flutter (22016): #18 RenderEditable._paintContents (package:flutter/src/rendering/editable.dart:515)
I/flutter (22016): #19 RenderEditable.paint (package:flutter/src/rendering/editable.dart:531)
I/flutter (22016): #20 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
I/flutter (22016): #21 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
I/flutter (22016): #22 RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
I/flutter (22016): #23 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
I/flutter (22016): #24 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
I/flutter (22016): #25 RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
I/flutter (22016): #26 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
I/flutter (22016): #27 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
I/flutter (22016): #28 RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
I/flutter (22016): #29 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
I/flutter (22016): #30 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:116)
I/flutter (22016): #31 RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:123)
I/flutter (22016): #32 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2259)
I/flutter (22016): #33 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:96)
I/flutter (22016): #34 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1085)
I/flutter (22016): #35 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:253)
I/flutter (22016): #36 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:504)
I/flutter (22016): #37 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:189)
I/flutter (22016): #38 BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:688)
I/flutter (22016): #39 BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:636)
I/flutter (22016): #40 _drawFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:70)
I/flutter (22016): (elided 2 frames from class _AssertionError)
I/flutter (22016):
I/flutter (22016): The following RenderObject was being processed when the exception was fired:
I/flutter (22016): RenderEditable#578461894 relayoutBoundary=up16
I/flutter (22016): creator: _Editable ← _ScrollableScope ← IgnorePointer-[GlobalKey#680538173] ← Listener ←
I/flutter (22016): _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey#131256439] ←
I/flutter (22016): RepaintBoundary ← CustomPaint ← RepaintBoundary ← NotificationListener ←
I/flutter (22016): GlowingOverscrollIndicator ← Scrollable ← ⋯
I/flutter (22016): parentData: (can use size)
I/flutter (22016): constraints: BoxConstraints(w=339.4, 0.0<=h<=Infinity)
I/flutter (22016): size: Size(339.4, 19.0)
I/flutter (22016): cursorColor: Color(0xff90caf9)
I/flutter (22016): showCursor: ValueNotifier#264766424(true)
I/flutter (22016): maxLines: 1
I/flutter (22016): selectionColor: Color(0xff90caf9)
I/flutter (22016): textScaleFactor: 1.0
I/flutter (22016): selection: TextSelection(baseOffset: -1, extentOffset: -1, affinity: TextAffinity.downstream,
I/flutter (22016): isDirectional: false)
I/flutter (22016): offset: ScrollPositionWithSingleContext#796004756(offset: 0.0, range: 0.0..0.0, viewport: 339.4,
I/flutter (22016): ScrollableState, ClampingScrollPhysics -> ClampingScrollPhysics,
I/flutter (22016): DrivenScrollActivity#749855830(AnimationController#390775325(▶ 0.000; for DrivenScrollActivity)),
I/flutter (22016): ScrollDirection.idle)
I/flutter (22016): This RenderObject has no descendants.
I/flutter (22016): ════════════════════════════════════════════════════════════════════════════════════════════════════
W/IInputConnectionWrapper(22016): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper(22016): getTextBeforeCursor on inactive InputConnection

@jason-simmons
Copy link
Member

The second stack trace is a duplicate of #10681

The first one is a problem in the new version of the Android text input plugin. I think we need to call Selection.removeSelection() instead of setSelection(-1)

@github-actions
Copy link

github-actions bot commented Sep 4, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants