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

[camera][iOS] app crashes with Check failed: task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread(). Process 521 stopped * thread #4, queue = 'io.flutter.camera.dispatchqueue' when using startImageStream on master channel #94723

Closed
ljmatan opened this issue Dec 6, 2021 · 17 comments
Assignees
Labels
c: crash Stack traces logged to the console c: fatal crash Crashes that terminate the process c: regression It was better in the past than it is now found in release: 2.6 Found to occur in 2.6 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: camera The camera plugin P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically

Comments

@ljmatan
Copy link

ljmatan commented Dec 6, 2021

Unlike #44436, it crashes with any resolution preset.

Device is iPhone SE 2019, iOS 15.1

Flutter doctor

[✓] Flutter (Channel master, 2.6.0-12.0.pre.854, on macOS 12.0.1 21A559 darwin-arm, locale en-GB)
    • Flutter version 2.6.0-12.0.pre.854 at /Users/threeofthem/SDKs/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 361d416e6a (6 days ago), 2021-11-29 22:01:32 -0800
    • Engine revision 7ba215c2c6
    • Dart version 2.16.0 (build 2.16.0-55.0.dev)
    • DevTools version 2.8.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/threeofthem/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.62.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554             • android-arm64  • Android 12 (API 31) (emulator)
    • Matan’s iPhone (mobile)     • 00008030-000470342683802E • ios            • iOS 15.1 19B74
    • Chrome (web)                • chrome                    • web-javascript • Google Chrome 96.0.4664.55
    ! Device 52007e785ffc85c7 is not authorized.
      You might need to check your device for an authorization dialog.

• No issues found!

Logs:

The selected imageFormatGroup is not supported by iOS. Defaulting to brga8888
[VERBOSE-3:platform_message_handler_ios.mm(106)] Check failed: task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread().
* thread #29, queue = 'io.flutter.camera.dispatchqueue', stop reason = signal SIGABRT
    frame #0: 0x00000001b84a2964 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1b84a2964 <+8>:  b.lo   0x1b84a2984               ; <+40>
    0x1b84a2968 <+12>: pacibsp 
    0x1b84a296c <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1b84a2970 <+20>: mov    x29, sp
Target 0: (Runner) stopped.

Code is nothing special, same as in example but after the initialisation I'm calling the startImageStream method.

@ljmatan
Copy link
Author

ljmatan commented Dec 6, 2021

This would be my init method:

  Future<void> _initCameraServices() async {
    _deviceCameras = await availableCameras();
    _cameraController = CameraController(
      _deviceCameras!.firstWhere((e) => e.lensDirection == CameraLensDirection.back),
      Platform.isAndroid ? ResolutionPreset.max : ResolutionPreset.medium,
      enableAudio: false,
    );
    await _cameraController!.initialize();
    Future.delayed(
      const Duration(seconds: 2),
      () async => await _cameraController!.startImageStream(
        (image) {},
      ),
    );
  }

@ljmatan
Copy link
Author

ljmatan commented Dec 6, 2021

Obviously, this is another issue with just taking pictures manually #26960

@ljmatan
Copy link
Author

ljmatan commented Dec 6, 2021

So this would also be a blocker 🤔 #83856

@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Dec 7, 2021
@ljmatan ljmatan changed the title [camera] iOS app crashes when using startImageStream [camera] iOS app crashes when using startImageStream on master channel Dec 7, 2021
@ljmatan
Copy link
Author

ljmatan commented Dec 7, 2021

Sorry, startImageStream does actually work properly on the stable Flutter version.

Flutter doctor:

[✓] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-arm, locale en-GB)
    • Flutter version 2.5.3 at /Users/threeofthem/SDKs/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (8 weeks ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

⣽^[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/threeofthem/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 13.1, Build version 13A1030d
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.62.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554             • android-arm64  • Android 12 (API 31) (emulator)
    • Matan’s iPhone (mobile)     • 00008030-000470342683802E • ios            • iOS 15.1 19B74
    • Chrome (web)                • chrome                    • web-javascript • Google Chrome 96.0.4664.55
    ! Device 52007e785ffc85c7 is not authorized.
      You might need to check your device for an authorization dialog.

• No issues found!

@danagbemava-nc
Copy link
Member

Hi @ljmatan, thanks for filing the issue.

What version of camera are you experiencing this issue with?

@danagbemava-nc danagbemava-nc added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 7, 2021
@ljmatan
Copy link
Author

ljmatan commented Dec 7, 2021

Hi @danagbemava-nc

Both 0.9.4+5 and 0.9.4+4

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 7, 2021
@danagbemava-nc
Copy link
Member

Please provide the complete reproducible code sample as well.

However, to the best of my knowledge, the plugins are tested against the stable branch, so there's always the possibility that something like this could happen with a plugin.

@danagbemava-nc danagbemava-nc added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 7, 2021
@ljmatan
Copy link
Author

ljmatan commented Dec 7, 2021

Minimal code example:

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:camera/camera.dart';

List<CameraDescription> cameras;

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  cameras = await availableCameras();
  runApp(CameraApp());
}

class CameraApp extends StatefulWidget {
  @override
  _CameraAppState createState() => _CameraAppState();
}

class _CameraAppState extends State<CameraApp> {
  CameraController controller;

  @override
  void initState() {
    super.initState();
    controller = CameraController(cameras[0], ResolutionPreset.max);
    controller.initialize().then((_) {
      if (!mounted) {
        return;
      }
      setState(() {});
      controller.startImageStream((_) {});
    });
  }

  @override
  void dispose() {
    controller?.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    if (!controller.value.isInitialized) {
      return Container();
    }
    return MaterialApp(
      home: CameraPreview(controller),
    );
  }
}

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 7, 2021
@danagbemava-nc danagbemava-nc changed the title [camera] iOS app crashes when using startImageStream on master channel [camera] iOS app crashes with Check failed: task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread(). Process 521 stopped * thread #4, queue = 'io.flutter.camera.dispatchqueue' when using startImageStream on master channel Dec 7, 2021
@danagbemava-nc danagbemava-nc changed the title [camera] iOS app crashes with Check failed: task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread(). Process 521 stopped * thread #4, queue = 'io.flutter.camera.dispatchqueue' when using startImageStream on master channel [camera][iOS] app crashes with Check failed: task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread(). Process 521 stopped * thread #4, queue = 'io.flutter.camera.dispatchqueue' when using startImageStream on master channel Dec 7, 2021
@danagbemava-nc
Copy link
Member

Crash can be reproduced on master with sample below. stable works just fine.

updated sample
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:camera/camera.dart';

List<CameraDescription>? cameras;

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  cameras = await availableCameras();
  runApp(CameraApp());
}

class CameraApp extends StatefulWidget {
  @override
  _CameraAppState createState() => _CameraAppState();
}

class _CameraAppState extends State<CameraApp> {
  late CameraController controller;

  @override
  void initState() {
    super.initState();
    controller = CameraController(cameras![0], ResolutionPreset.max);
    controller.initialize().then((_) {
      if (!mounted) {
        return;
      }
      setState(() {});
      controller.startImageStream((_) {});
    });
  }

  @override
  void dispose() {
    controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    if (!controller.value.isInitialized) {
      return Container();
    }
    return MaterialApp(
      home: CameraPreview(controller),
    );
  }
}
logs

master_ios.txt
stable_ios.txt

flutter doctor -v
[✓] Flutter (Channel stable, 2.5.3, on macOS 11.6 20G165 darwin-arm, locale en-GB)
    • Flutter version 2.5.3 at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (8 weeks ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 13.0, Build version 13A233
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[☠] IntelliJ IDEA Community Edition (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about this issue at https://github.com/flutter/flutter/issues.
    ✗ FormatException: Unexpected extension byte (at offset 5)
    • #0      _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1788:7)
      #1      Utf8Decoder.convert (dart:convert/utf.dart:318:42)
      #2      InputStream.readString (package:archive/src/util/input_stream.dart:199:30)
      #3      new ZipDirectory.read (package:archive/src/zip/zip_directory.dart:40:30)
      #4      ZipDecoder.decodeBuffer (package:archive/src/zip_decoder.dart:19:30)
      #5      ZipDecoder.decodeBytes (package:archive/src/zip_decoder.dart:14:12)
      #6      IntelliJPlugins._findPluginXml (package:flutter_tools/src/intellij/intellij.dart:130:44)
      #7      IntelliJPlugins._readPackageVersion (package:flutter_tools/src/intellij/intellij.dart:141:40)
      #8      IntelliJPlugins.validatePackage (package:flutter_tools/src/intellij/intellij.dart:63:35)
      #9      IntelliJValidator.validate (package:flutter_tools/src/intellij/intellij_validator.dart:103:15)
      #10     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:111:32)
      #11     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:109:18)
      #12     _rootRun (dart:async/zone.dart:1428:13)
      #13     _CustomZone.run (dart:async/zone.dart:1328:19)
      #14     _runZoned (dart:async/zone.dart:1863:10)
      #15     runZonedGuarded (dart:async/zone.dart:1851:12)
      #16     runZoned (dart:async/zone.dart:1782:12)
      #17     asyncGuard (package:flutter_tools/src/base/async_guard.dart:109:3)
      #18     Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:200:9)
      #19     Doctor.diagnose (package:flutter_tools/src/doctor.dart:304:47)
      #20     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:50:47)
      #21     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1274:12)
      <asynchronous suspension>
      #22     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
      <asynchronous suspension>
      #23     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #24     CommandRunner.runCommand (package:args/command_runner.dart:209:13)
      <asynchronous suspension>
      #25     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
      <asynchronous suspension>
      #26     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #27     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
      <asynchronous suspension>
      #28     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
      <asynchronous suspension>
      #29     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #30     main (package:flutter_tools/executable.dart:92:3)
      <asynchronous suspension>


[✓] VS Code (version 1.62.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (5 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554                        • android-arm64  • Android 12 (API 31) (emulator)
    • Nexus (mobile)              • 00008020-001875E83A38002E            • ios            • iOS 15.0.2 19A404
    • iPhone 13 (mobile)          • 7515F01A-C1B6-456E-8559-8D2383D3719D • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • macOS (desktop)             • macos                                • darwin-arm64   • macOS 11.6 20G165 darwin-arm
    • Chrome (web)                • chrome                               • web-javascript • Google Chrome 96.0.4664.55

! Doctor found issues in 1 category.
[✓] Flutter (Channel master, 2.6.0-12.0.pre.935, on macOS 11.6 20G165 darwin-arm, locale en-GB)
    • Flutter version 2.6.0-12.0.pre.935 at /Users/nexus/dev/sdks/flutters
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 94385d79f2 (11 hours ago), 2021-12-06 20:46:12 -0800
    • Engine revision 66a281107b
    • Dart version 2.16.0 (build 2.16.0-80.0.dev)
    • DevTools version 2.9.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[☠] IntelliJ IDEA Community Edition (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about this issue at https://github.com/flutter/flutter/issues.
    ✗ FormatException: Unexpected extension byte (at offset 5)
    • #0      _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1789:7)
      #1      Utf8Decoder.convert (dart:convert/utf.dart:351:42)
      #2      InputStream.readString (package:archive/src/util/input_stream.dart:207:30)
      #3      new ZipDirectory.read (package:archive/src/zip/zip_directory.dart:40:30)
      #4      ZipDecoder.decodeBuffer (package:archive/src/zip_decoder.dart:19:30)
      #5      ZipDecoder.decodeBytes (package:archive/src/zip_decoder.dart:14:12)
      #6      IntelliJPlugins._findPluginXml (package:flutter_tools/src/intellij/intellij.dart:130:44)
      #7      IntelliJPlugins._readPackageVersion (package:flutter_tools/src/intellij/intellij.dart:141:40)
      #8      IntelliJPlugins.validatePackage (package:flutter_tools/src/intellij/intellij.dart:63:35)
      #9      IntelliJValidator.validate (package:flutter_tools/src/intellij/intellij_validator.dart:103:15)
      #10     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:111:32)
      #11     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:109:18)
      #12     _rootRun (dart:async/zone.dart:1426:13)
      #13     _CustomZone.run (dart:async/zone.dart:1328:19)
      #14     _runZoned (dart:async/zone.dart:1861:10)
      #15     runZonedGuarded (dart:async/zone.dart:1849:12)
      #16     runZoned (dart:async/zone.dart:1780:12)
      #17     asyncGuard (package:flutter_tools/src/base/async_guard.dart:109:3)
      #18     Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:198:9)
      #19     Doctor.diagnose (package:flutter_tools/src/doctor.dart:302:47)
      #20     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:50:48)
      #21     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1320:12)
      <asynchronous suspension>
      #22     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1161:27)
      <asynchronous suspension>
      #23     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #24     CommandRunner.runCommand (package:args/command_runner.dart:209:13)
      <asynchronous suspension>
      #25     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
      <asynchronous suspension>
      #26     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #27     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
      <asynchronous suspension>
      #28     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
      <asynchronous suspension>
      #29     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #30     main (package:flutter_tools/executable.dart:94:3)
      <asynchronous suspension>


[✓] VS Code (version 1.62.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (5 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554                        • android-arm64  • Android 12 (API 31) (emulator)
    • Nexus (mobile)              • 00008020-001875E83A38002E            • ios            • iOS 15.0.2 19A404
    • iPhone 13 (mobile)          • 7515F01A-C1B6-456E-8559-8D2383D3719D • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • macOS (desktop)             • macos                                • darwin-arm64   • macOS 11.6 20G165 darwin-arm
    • Chrome (web)                • chrome                               • web-javascript • Google Chrome 96.0.4664.55

! Doctor found issues in 1 category.

@danagbemava-nc danagbemava-nc added found in release: 2.6 Found to occur in 2.6 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: camera The camera plugin p: first party platform-ios iOS applications specifically c: crash Stack traces logged to the console c: fatal crash Crashes that terminate the process and removed in triage Presently being triaged by the triage team labels Dec 7, 2021
@hellohuanlin hellohuanlin self-assigned this Dec 9, 2021
@stuartmorgan stuartmorgan added P1 High-priority issues at the top of the work list c: regression It was better in the past than it is now labels Dec 9, 2021
@hellohuanlin
Copy link
Contributor

hellohuanlin commented Dec 9, 2021

I did some initial investigation. It turned out to be a threading issue. For now I plan to just fix this issue and stop the crash. It may worth our efforts to refactor it in the future, as some code is getting a bit complicated to maintain.

@jmagman
Copy link
Member

jmagman commented Dec 10, 2021

@hellohuanlin Before you get too deep into this issue, check out #52578, flutter/plugins#4007, flutter/plugins#4140,

@hellohuanlin
Copy link
Contributor

@jmagman This is helpful. Thank you!

@acoutts
Copy link

acoutts commented Feb 24, 2022

I'm having this issue in stable 2.10.1 the moment I call startImageStream.

[VERBOSE-3:platform_message_handler_ios.mm(106)] Check failed: task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread().
* thread #5, queue = 'io.flutter.camera.dispatchqueue', stop reason = signal SIGABRT
    frame #0: 0x00000001b7fbf964 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1b7fbf964 <+8>:  b.lo   0x1b7fbf984               ; <+40>
    0x1b7fbf968 <+12>: pacibsp
    0x1b7fbf96c <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1b7fbf970 <+20>: mov    x29, sp
Target 0: (Runner) stopped.

@hellohuanlin
Copy link
Contributor

@acoutts looks like you are on an old version of the plugin. We had multiple improvements since then. could you try the latest version?

@acoutts
Copy link

acoutts commented Feb 24, 2022

Thanks- indeed it's fixed on the latest one. I'm just now patching the android 12 capture bug that prevents captures on the Pixel 6 and will file a separate PR for that.

@ljmatan
Copy link
Author

ljmatan commented Mar 25, 2022

Seems to no longer crash!

@ljmatan ljmatan closed this as completed Mar 25, 2022
@github-actions
Copy link

github-actions bot commented Apr 8, 2022

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 Apr 8, 2022
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: crash Stack traces logged to the console c: fatal crash Crashes that terminate the process c: regression It was better in the past than it is now found in release: 2.6 Found to occur in 2.6 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: camera The camera plugin P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically
Projects
None yet
Development

No branches or pull requests

6 participants