flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
164.98k stars 27.18k forks source link

Application is crashed without any log #85608

Open pamirismail opened 3 years ago

pamirismail commented 3 years ago

Hello,

I have a problem with my application. The application is shutting down on some Android devices without any useful crash logs. Also crashlytics does not sent logs in any cases. I have tried to observe different things and I want to give more information about what I have so far. It is commonly occured when I open video player from the application. I tried to have a small application with video player, that I used, to reproduce the error but error did not happen with this app. When crash is occurred I get logs like this:

logs ``` D/ViewRootImpl@7eaca8c[MainActivity](30160): ViewPostImeInputStage processPointer 0 D/ViewRootImpl@7eaca8c[MainActivity\](30160): ViewPostImeInputStage processPointer 1 I/ExoPlayerImpl(30160): Init 108e3e3 [ExoPlayerLib/2.13.1] [a3xelte, SM-A310F, samsung, 24] I/Choreographer(30160): Skipped 43 frames! The application may be doing too much work on its main thread. I/System.out(30160): (HTTPLog)-Static: isSBSettingEnabled false I/System.out(30160): (HTTPLog)-Static: isSBSettingEnabled false D/ViewRootImpl@7eaca8c[MainActivity\](30160): Relayout returned: oldFrame=[0,0][720,1280] newFrame=[0,0][720,1280] result=0x1 surface={isValid=true -880830464} surfaceGenerationChanged=false D/ViewRootImpl@7eaca8c[MainActivity\](30160): ViewPostImeInputStage processPointer 0 D/ViewRootImpl@7eaca8c[MainActivity\](30160): ViewPostImeInputStage processPointer 1 I/System.out(30160): (HTTPLog)-Static: isSBSettingEnabled false I/System.out(30160): (HTTPLog)-Static: isSBSettingEnabled false Lost connection to device. ```

There was not any crash report. It just says “Lost connection to device”. Then I tried to track pid of the application from logcat of Android device. I did not encounter any useful logs here either. The last thing I saw about the application’s pid was “06-23 17:05:48.253 2738 13601 I ActivityManager: Process [Application package name] (pid 3573) has died(379,50)”. I thought that this might be a memory problem and that the operating system might kill the process of my application, so that I wanted to monitor the memory used by the application. I tried the application with a phone that has 6 gb RAM. And my application's memory consumption was 1.6 GB at most. and I do not know what can cause such a big memory consumption.

The problem is observed with different phone models and different Android versions. The problem is not encountered on any iOS device. Devices with the problem and their Android versions can be seen below (but probably it can be encountered on other devices):

You can see packages that I used on my project below:

Packages ``` dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter intl: ^0.17.0 firebase_core: ^1.1.1 firebase_crashlytics: ^2.0.3 cupertino_icons: ^1.0.3 auto_route: ^0.6.9 google_fonts: ^2.1.0 dartx: injectable: get_it: ^5.0.6 freezed_annotation: ^0.12.0 http: ^0.13.3 dio: ^4.0.0 pretty_dio_logger: ^1.2.0-beta-1 flutter_screenutil: ^5.0.0 form_field_validator: ^1.1.0 shared_preferences: ^2.0.5 hive: ^2.0.4 quick_log: ^5.2.0 path_provider: ^2.0.1 package_info: ^2.0.0 flutter_spinkit: ^5.0.0 flutter_localized_locales: flutter_secure_storage: ^4.2.0 synchronized: ^3.0.0 ezbloc_flutter: ^0.5.2 flutter_svg: ^0.22.0 equatable: ^2.0.0 jiffy: ^4.1.0 seekbar: ^0.0.2 just_audio: ^0.7.4+1 flare_flutter: ^3.0.0 flutter_blurhash: ^0.6.0 test_coverage_badge: ^0.2.0 rxdart: ^0.26.0 wakelock: ^0.5.2 duration: ^3.0.6 animations: ^2.0.0 shimmer: ^2.0.0 flutter_picker: ^2.0.1 flutter_keyboard_visibility: ^5.0.2 flutter_feather_icons: ^2.0.0+1 url_launcher: ^6.0.3 flutter_markdown: ^0.6.2 pin_input_text_field: ^4.0.0 pull_to_refresh: ^2.0.0 audio_service: ^0.17.0 fl_chart: ^0.36.1 copy_with_extension: ^1.4.0 cached_video_player: 2.0.0-dev.1 visibility_detector: ^0.2.0 flick_video_player: clock: ^1.1.0 dev_dependencies: flutter_test: sdk: flutter integration_test: sdk: flutter pedantic: ^1.0.0 effective_dart: ^1.0.0 auto_route_generator: injectable_generator: build_runner: ^1.0.0 freezed: ^0.12.7 json_serializable: ^3.5.1 mockito: ^4.1.4 i18n: ^2.0.0 flutter_launcher_icons: ^0.9.0 flutter_native_splash: ^1.1.7+1 test: ^1.16.5 copy_with_extension_gen: ^1.4.0 dependency_overrides: quick_log: ^5.2.0 crypto: ^3.0.0 mockito: ^4.1.4 json_annotation: ^3.0.0 test: ^1.16.5 args: 1.6.0 archive: ^3.0.0 xml: ^5.0.2 glob: ^2.0.1 yaml: ^2.1.2 analyzer: ^1.1.0 convert: ^3.0.0 test_api: 0.3.0 ```

It would be very nice if you have any idea what is wrong with the application to help me about that issue.

aDrIaNo34500 commented 3 years ago

H

TahaTesser commented 3 years ago

Hi @pamirismail Can you please provide your flutter doctor -v from which this build was pushed and flutter run --release logs running in any device, just for checking the build process Thank you

pamirismail commented 3 years ago

Hi @TahaTesser, thank you for your response. You can see logs below.

flutter doctor -v ```console [✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en-TR) • Flutter version 2.2.3 at /Users/pamir/Desktop/dev/flutter • Framework revision f4abaa0735 (5 days ago), 2021-07-01 12:46:11 -0700 • Engine revision 241c87ad80 • Dart version 2.13.4 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/pamir/Library/Android/sdk • Platform android-30, build-tools 30.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.5.1, Build version 12E507 • CocoaPods version 1.10.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.2) • 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.8+10-b944.6916264) [✓] Connected device (1 available) • Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114 ```

flutter run --release

logs ```console Launching lib/main.dart on SM A310F in release mode... Running Gradle task 'assembleRelease'... Note: /Users/pamir/Desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.0/android/src/main/java/com/ryanheise/audio_session/AudioSessionPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/pamir/Desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_isolate-2.0.0/android/src/main/java/com/rmawatson/flutterisolate/FlutterIsolatePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/pamir/Desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_isolate-2.0.0/android/src/main/java/com/rmawatson/flutterisolate/FlutterIsolatePlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: /Users/pamir/Desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.1.1/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/pamir/Desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_keyboard_visibility-5.0.2/android/src/main/java/com/jrai/flutter_keyboard_visibility/FlutterKeyboardVisibilityPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/pamir/Desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-4.2.0/android/src/main/java/com/it_nomads/fluttersecurestorage/FlutterSecureStoragePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/pamir/Desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-2.0.3/android/src/main/java/io/flutter/plugins/firebase/crashlytics/FlutterFirebaseCrashlyticsPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/pamir/Desktop/dev/flutter/.pub-cache/hosted/pub.dartlang.org/audio_service-0.17.0/android/src/main/java/com/ryanheise/audioservice/AudioServicePlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. WARNING: [Processor] Library '/Users/pamir/.gradle/caches/modules-2/files-2.1/org.robolectric/shadows-framework/4.3/150103d5732c432906f6130b734e7452855dd67b/shadows-framework-4.3.jar' contains references to both AndroidX and old support library. This seems like the library is partially migrated. Jetifier will try to rewrite the library anyway. Example of androidX reference: 'androidx/test/runner/lifecycle/Stage' Example of support library reference: 'android/support/annotation/NonNull' w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath: /Users/pamir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.3.50/50ad05ea1c2595fb31b800e76db464d08d599af3/kotlin-stdlib-jdk7-1.3.50.jar (version 1.3) /Users/pamir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.10/6b84d926e28493be69daf673e40076f89492ef7/kotlin-stdlib-common-1.5.10.jar (version 1.5) /Users/pamir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.5.10/c49d0703d16c6cb1526cc07b9b46486da1dd8a60/kotlin-stdlib-jdk7-1.5.10.jar (version 1.5) /Users/pamir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar (version 1.5) /Users/pamir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.50/b529d1738c7e98bbfa36a4134039528f2ce78ebf/kotlin-stdlib-1.3.50.jar (version 1.3) /Users/pamir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.50/3d9cd3e1bc7b92e95f43d45be3bfbcf38e36ab87/kotlin-stdlib-common-1.3.50.jar (version 1.3) w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath ✓ Built build/app/outputs/flutter-apk/app-release.apk (14.3MB). Installing build/app/outputs/flutter-apk/app.apk... ```
chinmaygarde commented 3 years ago

Is there a reduced test case?

pamirismail commented 3 years ago

I tried to reproduced it with reduced app but I could not because I do not know exact cause of the problem due to no logs.

tech4242 commented 3 years ago

is there any progress on this?