Skip to content

canvas_test.dart crashes in test harness #248

@FlutterIssues

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

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