Skip to content

FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x<sanitized>) in Playstore Crash logs #118094

Closed

Description

@pavankumar-clasc

Steps to Reproduce

  1. Our app is using video_player plugin and hive database for local storage.
  2. We have released the app in playstore.
  3. We are seeing followings logs in crashes section

Expected results:

Actual results:

Pubspec.yaml
version: 2.0.3+30


environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.5
  dio: ^4.0.6
  bloc: ^8.1.0
  rxdart: ^0.27.5
  eva_icons_flutter: ^3.1.0
  flutter_rating_bar: ^4.0.1
  page_indicator: ^0.4.1
  font_awesome_flutter: ^10.2.1
  http: ^0.13.5
  flutter_windowmanager: ^0.2.0
  flutter_automation: ^2.0.0
  flutter_bloc: ^8.1.1
  pedantic: ^1.11.1
  device_info_plus: ^6.0.0
  fluttertoast: ^8.0.9
  eventify: ^1.0.1
  flutter_launcher_icons: ^0.10.0
  chewie: ^1.3.5
  google_fonts: ^3.0.1
  video_player: ^2.4.7
  flutter_markdown: ^0.6.12
  markdown_widget: ^1.3.0+2
  animations: ^2.0.7
  material_design_icons_flutter: ^5.0.6996
  url_launcher: ^6.1.7
  typicons_flutter: ^0.5.0
  infinite_listview: ^1.1.0
  device_display_brightness: ^0.0.6
  package_info_plus: ^2.0.0
  cached_network_image: ^3.2.1
  firebase_core: ^2.4.1
  firebase_messaging: ^14.2.1
  progress_dialog_null_safe: ^1.0.7
  material_floating_search_bar: ^0.3.7
  firebase_dynamic_links: ^5.0.11
  path_provider: ^2.0.11
  flutter_typeahead: ^4.1.1
  firebase_analytics: ^10.1.0
  url_strategy: ^0.2.0
  hive: ^2.2.3
  hive_flutter: ^1.1.0
  shimmer: ^2.0.0
  otp_text_field: ^1.1.3
  uuid: ^3.0.6
  flutter_local_notifications: ^6.0.0
  encrypt: ^5.0.1
  tuple: ^2.0.1
  share_plus: ^6.3.0
  perfect_volume_control: ^1.0.5






flutter_icons:
  android: true
  ios: true
  image_path: "assets/images/app icon.png"
  adaptive_icon_background: "#0b0b0b"
  adaptive_icon_foreground: "assets/images/logo_foreground.png"

dev_dependencies:
  flutter_test:
    sdk: flutter
  build_runner: ^2.3.0
  json_serializable: ^6.5.1
  hive_generator: ^2.0.0


# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/images/
    - assets/videos/
    - assets/images/finallogo.png
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: EmailCI
      fonts:
        - asset: assets/fonts/EmailCI.ttf
    #       - asset: fonts/Schyler-Italic.ttf
    #         style: italic
    - family: AvenirLTStd-Book
      fonts:
        - asset: assets/fonts/AvenirLTStd.ttf
        - asset: assets/fonts/Custom.ttf
    - family: Lato
      fonts:
        - asset: assets/fonts/Lato-Regular.ttf
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages
Logs
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 7300 >>> com.clasc <<<

backtrace:
  #00  pc 0x000000000004ff74  /apex/com.android.runtime/lib64/bionic/libc.so (abort+180)
  #01  pc 0x0000000000051fe4  /apex/com.android.runtime/lib64/bionic/libc.so (__fortify_fatal(char const*, ...)+124)
  #02  pc 0x00000000000b4954  /apex/com.android.runtime/lib64/bionic/libc.so (HandleUsingDestroyedMutex(pthread_mutex_t*, char const*)+60)
  #03  pc 0x00000000000b4788  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_lock+176)
  #04  pc 0x00000000000b2b1c  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_wait+108)
  #05  pc 0x000000000005697c  /system/lib64/libc++.so (std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&)+20)
  #06  pc 0x00000000000e1e74  /system/lib64/libgui.so (android::FenceMonitor::loop()+124)
  #07  pc 0x00000000000e26bc  /system/lib64/libgui.so (void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (android::FenceMonitor::*)(), android::FenceMonitor*> >(void*)+60)
  #08  pc 0x00000000000b3900  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+312)
  #09  pc 0x0000000000051a20  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
app/build.gradle

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')


def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    throw new GradleException("versionName not found. Define flutter.versionName in the local.properties file.")
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    throw new GradleException("versionCode not found. Define flutter.versionCode in the local.properties file.")
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
    compileSdkVersion 33

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.clasc"
        minSdkVersion 23
        targetSdkVersion 32
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
    }
    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
            storePassword keystoreProperties['storePassword']
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }
    /*buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.release
            minifyEnabled true
            useProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }*/
}

flutter {
    source '../..'
}


subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex') ) {
                details.useVersion "27.1.1"
            }
            if (details.requested.group == 'androidx.core'
                    && !details.requested.name.contains('androidx') ) {
                details.useVersion "1.0.1"
            }
        }
    }
}

dependencies {
    implementation "androidx.core:core-ktx:1.5.0"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.razorpay:checkout:1.6.4'
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'androidx.annotation:annotation:1.0.2'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'com.google.guava:guava:27.0.1-android'
    implementation platform('com.google.firebase:firebase-bom:28.3.0')
    implementation 'com.google.firebase:firebase-analytics' //Put version here incomplete
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.firebase:firebase-dynamic-links'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

}

[√] Flutter (Channel stable, 3.3.4, on Microsoft Windows [Version 10.0.22000.1335], locale en-IN)
    • Flutter version 3.3.4 on channel stable at C:\Users\pavan\fvm\versions\3.3.4
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision eb6d86ee27 (3 months ago), 2022-10-04 22:31:45 -0700
    • Engine revision c08d7d5efc
    • Dart version 2.18.2
    • DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\pavan\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\pavan\Desktop\sdk-tools-windows-4333796
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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.74.2)
    • VS Code at C:\Users\pavan\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.52.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.1335]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 108.0.5359.125
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 108.0.1462.54

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Activity

  1. darshankawar commented on Jan 6, 2023

    @darshankawar
    Member

    @flutter-symbolizer-bot #118094 (comment) force flutter#v3.3.4 android release arm64

  2. darshankawar commented on Jan 6, 2023

    @darshankawar
    Member

    @pavankumar-clasc
    Looking at the error log, none of the frames from the stacktrace are from Flutter and seems to be coming from native Android framework. It could be that, one of the plugins you are using might be calling exit() directly and hence the exception.
    I am going ahead and tentatively closing as not a Flutter issue.

  3. added
    r: invalidIssue is closed as not valid
    and removed
    in triagePresently being triaged by the triage team
    on Jan 6, 2023
  4. github-actions commented on Mar 4, 2023

    @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.

  5. locked as resolved and limited conversation to collaborators on Mar 4, 2023
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

    r: invalidIssue is closed as not valid

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions