Skip to content

canvas_test.dart crashes in test harness #248

Description

@FlutterIssues

Issue by Hixie
Tuesday Nov 03, 2015 at 00:31 GMT
Originally opened as https://github.com/flutter/engine/issues/1906


The canvas_test.dart test currently crashes, and has been disabled.
It doesn't crash outside the test harness, as far as I can tell.

Steps to get a stack trace:

  • make a new branch for flutter/engine
  • open a shell at the root of that repository (inside the src directory)
  • git mv sky/unit/test/engine/canvas_test_disabled.dart sky/unit/test/engine/canvas_test.dart
  • git revert 54cbc1b84ed9a6d83b76cb8d210ffaebbb94b4d0
  • echo -e " sky_tools:\n path: ../../../../tools" >> sky/unit/pubspec.yaml
  • (cd sky/unit && pub upgrade)
  • make a new branch for flutter/tools, where the directory of the repo is tools and is a peer to the directory that contains your engine src directory.
  • apply the following patch to your tools repo (paste into git apply):
diff --git a/lib/src/test/loader.dart b/lib/src/test/loader.dart
index 0b6e090..7860689 100644
--- a/lib/src/test/loader.dart
+++ b/lib/src/test/loader.dart
@@ -55,6 +55,10 @@ Future<_ServerInfo> _createServer() async {

 Future<Process> _startProcess(String path, { String packageRoot }) {
   assert(_kSkyShell != null); // Please provide the path to the shell in the SKY_SHELL environment variable.
+
+  print("$_kSkyShell --enable-checked-mode --non-interactive --package-root=$packageRoot $path");
+  return Process.start('/bin/sleep', ['1h']);
+
   return Process.start(_kSkyShell, [
     '--enable-checked-mode',
     '--non-interactive',
  • from the root of your flutter/engine repo, run sky/tools/run_tests test/engine/canvas_test.dart
  • copy and paste the command line it outputs, and run it in a separate shell, prefixed with gdb --args. It will look something like:
    gdb --args src/out/Debug/sky_shell --enable-checked-mode --non-interactive --package-root=src/sky/unit/packages /tmp/dart_test_listenerJJf58p/listener.dar
  • execute run in GDB
  • execute bt in GDB

The stack trace looks like:

#0  __memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:33
#1  0x000000000163bfca in blink::Canvas::getTotalMatrix (this=0x3838774380a0) at ../../sky/engine/core/painting/Canvas.cpp:110
#2  0x000000000124916e in blink::DartCanvasInternal::getTotalMatrixCallback (args=0x7ffff34cc3d0) at gen/sky/bindings/DartCanvas.cpp:253
#3  0x000000000141ad07 in dart::NativeEntry::NativeCallWrapper (args=0x7ffff34cc3d0, func=0x1249140 <blink::DartCanvasInternal::getTotalMatrixCallback(_Dart_NativeArguments*)>)
    at ../../dart/runtime/vm/native_entry.cc:116

Activity

  1. added
    a: tests"flutter test", flutter_test, or one of our tests
    c: crashStack traces logged to the console
    on Nov 9, 2015
  2. Hixie commented on Dec 16, 2015

    @Hixie
    Contributor

    I just checked and this still crashes.

  3. modified the milestone: on Dec 16, 2015
  4. added a commit that references this issue on Feb 12, 2016
  5. github-actions commented on Aug 17, 2021

    @github-actions

    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.

  6. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: tests"flutter test", flutter_test, or one of our testsc: crashStack traces logged to the console

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions