Write iOS&Android Code using Dart. This package liberates you from redundant glue code and low performance of Flutter Channel.

Last update: Aug 4, 2022

Dart_Native

Dart_Native operates as both a code generator tool and a bridge to communicate between Dart and native APIs.

Replaces the low-performing Flutter channel with faster and more concise code.

  • Under development

pub package Build Status Dart CI

This package is the blue part(DartNative Bridge):

Requirements

Dart_Native Version Flutter Requirements Codegen Version
0.4.x Flutter 2.2.0 (Dart 2.13.0) 2.x
0.3.x Flutter 1.20.0 (Dart 2.9.1) 1.2.x
0.2.x Flutter 1.12.13 (Dart 2.7) 1.x

Supported Platforms

iOS & Android

Usage

  1. Add dart_native to dependencies and build_runner to dev_dependencies.

  2. Generate Dart wrapper code with @dartnative/codegen or write Dart code manually.

  3. Generate code for automatic type conversion using dart_native_gen with the following steps (3.1-3.3):

    3.1 Annotate a Dart wrapper class with @native.

    @native
    class RuntimeSon extends RuntimeStub {
      RuntimeSon([Class isa]) : super(Class('RuntimeSon'));
      RuntimeSon.fromPointer(Pointer<Void> ptr) : super.fromPointer(ptr);
    }

    3.2 Annotate your own entry (such asmain()) with @nativeRoot.

    @nativeRoot
    void main() {
      runApp(App());
    }

    3.3 Run

    flutter packages pub run build_runner build --delete-conflicting-outputs 

    to generate files into your source directory.

    Note: we recommend running clean first:

    flutter packages pub run build_runner clean
  4. Call autogenerated function in <generated-name>.dn.dart in 3.3. The function name is determined by name in pubspec.yaml.

    @nativeRoot
    void main() {
      // Function name is generated by name in pubspec.yaml.
      runDartNativeExample(); 
      runApp(App());
    }

Features

High-performance synchronous & asynchronous channeling

Dart_Native costs significantly less time than the Flutter channel and supports both synchronous and asynchronous channeling. A comparison of two native channeling tasks using Flutter channel and Dart_Native is shown below.

Both tasks were executed 10,000 times in the same environment using either Flutter channel or Dart_Native:

Task Total time cost (ms) (Channel/Dart_Native) Channeling time cost (ms) (Channel/Dart_Native)
Checking if an app needs to be installed 5202/4166 919/99
Logging 2480/2024 1075/432

Autogenerate succinct bridging code

Dart_Native supports automatic type conversion so its bridging code is shorter & simpler than the Flutter channel.

A comparison of the task of "checking if an app needs to be installed" is shown below:

# of lines of bridging code Coding complexity
Dart_Native Dart 1 + Native 1 Autogenerated code returns BOOL directly
Channel Dart 15 + Native 30 Needs to manually define return format, convert INT to BOOL, determine channel & methodName

Automatic object marshalling between Dart and native

Examples

iOS:

Dart code (generated):

// new Objective-C object.
RuntimeStub stub = RuntimeStub();

// Dart function will be converted to Objective-C block.
stub.fooBlock((NSObject a) {
    print('hello block! ${a.toString()}');
    return 101;
});

// support built-in structs.
CGRect rect = stub.fooCGRect(CGRect(4, 3, 2, 1));
print(rect);

Corresponding Objective-C code:

typedef int(^BarBlock)(NSObject *a);

@interface RuntimeStub

- (CGRect)fooCGRect:(CGRect)rect;
- (void)fooBlock:(BarBlock)block;

@end

More iOS examples see: ios_unit_test.dart

Android:

Dart code (generated):

// new Java object.
RuntimeStub stub = RuntimeStub();

// get java list.
List list = stub.getList([1, 2, 3, 4]);

// support interface.
stub.setDelegateListener(DelegateStub());

Corresponding Java code:

public class RuntimeStub {

    public List<Integer> getList(List<Integer> list) {
        List<Integer> returnList = new ArrayList<>();
        returnList.add(1);
        returnList.add(2);
        return returnList;
     }

    public void setDelegateListener(SampleDelegate delegate) {
         delegate.callbackInt(1);
    }
}

More android examples see: android_unit_test.dart

Documentation

Readme

  1. dart_native README.md
  2. dart_native_gen README.md

Further reading

FAQs

Q: Failed to lookup symbol (dlsym(RTLD_DEFAULT, InitDartApiDL): symbol not found) on iOS archive.

A: Select one solution:

  1. Use dynamic library: Add use_frameworks! in Podfile.
  2. Select Target Runner -> Build Settings -> Strip Style -> change from "All Symbols" to "Non-Global Symbols"

Contribution

  • If you need help or you'd like to ask a general question, open an issue.
  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

License

DartNative is available under the BSD 3-Clause License. See the LICENSE file for more info.

GitHub

https://github.com/dart-native/dart_native
Comments
  • 1. 【android】native_basic_type.dart定义的long、double类型数据,在安卓仅构建armeabi-v7a架构的包时,传参数据存在转换丢失的情况

    问题

    native_basic_type定义的long类型数据,在安卓仅构建armeabi-v7a架构的包时,如果long类型数据值大于2147483647(2^31-1),java侧获取的数据存在转换丢失的情况

    double类型数据也不太对

    具体案例

    Dart_Native 版本:0.3.22

    flutter环境 Flutter version 1.22.6 Dart version 2.10.5

    修改如下几个文件

    • example/android/app/build.gradle
        defaultConfig {
            // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
            applicationId "com.dartnative.dart_native_example"
            minSdkVersion 16
            targetSdkVersion 28
            versionCode flutterVersionCode.toInteger()
            versionName flutterVersionName
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
            // 仅armeabi-v7a架构
            ndk {
                abiFilters "armeabi-v7a"
            }
        }
    
    • example/lib/android/unit_test.dart
      bool resultCall =
      stub.complexCall("test", 2147483647, 'a', 10.0, 12.0, 1, 2, 2147483647, false);
      print('call result:$resultCall');
    
      resultCall =
          stub.complexCall("test", 2147483648, 'a', 10.0, 12.0, 1, 2, 2147483648, false);
      print('call result:$resultCall');
    
      resultCall =
          stub.complexCall("test", 4294967295, 'a', 10.0, 12.0, 1, 2, 4294967295, false);
      print('call result:$resultCall');
    
      resultCall =
      stub.complexCall("test", 4294967296, 'a', 10.0, 12.0, 1, 2, 4294967296, false);
      print('call result:$resultCall');
    
      resultCall =
      stub.complexCall("test", 42949672960, 'a', 10.0, 12.0, 1, 2, 42949672960, false);
      print('call result:$resultCall');
    
    
    • lib/src/android/runtime/jobject.dart
      NativeArguments _parseNativeArguments(List args, {List argsSignature}) {
        Pointer<Pointer<Void>> pointers = nullptr.cast();
    
        /// extend a bit for string
        Pointer<Pointer<Utf8>> typePointers =
            allocate<Pointer<Utf8>>(count: (args?.length ?? 0) + 1);
        int stringTypeBitmask = 0;
        if (args != null) {
          pointers = allocate<Pointer<Void>>(count: args.length);
    
          for (var i = 0; i < args.length; i++) {
            var arg = args[i];
            if (arg == null) {
              throw 'One of args list is null';
            }
    
            Pointer<Utf8> argSignature =
                argsSignature == null || !(argsSignature[i] is Pointer<Utf8>)
                    ? null
                    : argsSignature[i];
    
            if (arg is String) {
              stringTypeBitmask |= (0x1 << i);
            }
    
            storeValueToPointer(arg, pointers.elementAt(i),
                typePtr: typePointers.elementAt(i), argSignature: argSignature);
    
            //方便打印看save后再load的值
            if (arg is long) {
              int value = pointers.elementAt(i).cast<Int64>().value;
              var loadValue = loadValueFromPointer(pointers.elementAt(i).value, "J", typePtr: typePointers);
              print("DartNative _parseNativeArguments arg=$arg, storeValueToPointer value=$value, loadValueFromPointer value=$loadValue");
            }
          }
        }
        typePointers.elementAt(args?.length ?? 0).value = Utf8.toUtf8("0");
        return NativeArguments(pointers, typePointers, stringTypeBitmask);
      }
    

    打印结果

    
    
    2021-09-06 22:19:29.891 15223-16988/com.dartnative.dart_native_example I/flutter: DartNative _parseNativeArguments arg=2147483647, storeValueToPointer value=2147483647, loadValueFromPointer value=2147483647
    2021-09-06 22:19:29.891 15223-16988/com.dartnative.dart_native_example D/dart_java: tag :test + 2147483647 + a + 2097152.0 + 12.0 + 1 + 2 + 2147483647 + false
    2021-09-06 22:19:29.891 15223-16988/com.dartnative.dart_native_example I/flutter: call result:true
    2021-09-06 22:19:29.891 15223-16988/com.dartnative.dart_native_example I/flutter: DartNative _parseNativeArguments arg=2147483648, storeValueToPointer value=2147483648, loadValueFromPointer value=2147483648
    2021-09-06 22:19:29.892 15223-16988/com.dartnative.dart_native_example D/dart_java: tag :test + -2147483648 + a + 2097152.0 + 12.0 + 1 + 2 + -2147483648 + false
    2021-09-06 22:19:29.892 15223-16988/com.dartnative.dart_native_example I/flutter: call result:true
    2021-09-06 22:19:29.892 15223-16988/com.dartnative.dart_native_example I/flutter: DartNative _parseNativeArguments arg=4294967295, storeValueToPointer value=4294967295, loadValueFromPointer value=4294967295
    2021-09-06 22:19:29.892 15223-16988/com.dartnative.dart_native_example D/dart_java: tag :test + -1 + a + 2097152.0 + 12.0 + 1 + 2 + -1 + false
    2021-09-06 22:19:29.892 15223-16988/com.dartnative.dart_native_example I/flutter: call result:true
    2021-09-06 22:19:29.892 15223-16988/com.dartnative.dart_native_example I/flutter: DartNative _parseNativeArguments arg=4294967296, storeValueToPointer value=4294967296, loadValueFromPointer value=0
    2021-09-06 22:19:29.892 15223-16988/com.dartnative.dart_native_example D/dart_java: tag :test + 0 + a + 2097152.0 + 12.0 + 1 + 2 + 0 + false
    2021-09-06 22:19:29.892 15223-16988/com.dartnative.dart_native_example I/flutter: call result:true
    2021-09-06 22:19:29.892 15223-16988/com.dartnative.dart_native_example I/flutter: DartNative _parseNativeArguments arg=42949672960, storeValueToPointer value=42949672960, loadValueFromPointer value=0
    2021-09-06 22:19:29.892 15223-16988/com.dartnative.dart_native_example D/dart_java: tag :test + 0 + a + 2097152.0 + 12.0 + 1 + 2 + 0 + false
    
    // java long赋值打印结果
    2021-09-06 22:34:20.989 16940-19032/com.dartnative.dart_native_example D/dart_java: java long:2147483647 + 2147483648 + 4294967295 + 4294967295 + 4294967296 + 42949672960
    
    
    Reviewed by ddrccw at 2021-09-06 14:35
  • 2. dart调用安卓原生方法失败

    你好,我们flutter module和原生是同一级目录依赖的,然后flutter需要调用原生的方法 dart代码 @native(javaClass : "com/addcn/android/flutterservice/TWInfoService") class AndroidAppInfoService extends JObject{ ... } @nativeRoot @pragma('vm:entry-point') void main() { DartNative.init(); runTw591FlutterModules();//类型example的runDartNativeExample()方法 runApp(const MyApp()); } 可是当调用AndroidAppInfoService的时候闪退,请问是因为项目在同一级导致的路径不对吗?请问要怎么改呢

    Reviewed by LiuDongCai at 2021-12-17 02:17
  • 3. type 'Bool' not found

    Describe the bug ../../.pub-cache/hosted/pub.flutter-io.cn/dart_native-0.7.3/lib/src/darwin/runtime/internal/native_runtime.dart:24:5: Error: Type 'Bool' not found. Bool returnString, ^^^^ ../../.pub-cache/hosted/pub.flutter-io.cn/dart_native-0.7.3/lib/src/darwin/runtime/internal/native_runtime.dart:110:5: Error: Type 'Bool' not found. Bool shouldReturnAsync, ^^^^ ../../.pub-cache/hosted/pub.flutter-io.cn/dart_native-0.7.3/lib/src/android/runtime/functions.dart:75:21: Error: 'Bool' isn't a type. Bool isInterface)>>('InvokeNativeMethod') ^^^^ ../../.pub-cache/hosted/pub.flutter-io.cn/dart_native-0.7.3/lib/src/android/runtime/functions.dart:76:10: Error: Expected type 'NativeFunction<Pointer Function(Pointer, Pointer, Pointer<Pointer>, Pointer<Pointer>, Int32, Pointer, Uint32, Pointer<NativeFunction<Void Function(Pointer, Pointer, Pointer<Pointer>, Int32)>>, Int64, Int32, invalid-type)>' to be a valid and instantiated subtype of 'NativeType'.

    • 'NativeFunction' is from 'dart:ffi'.
    • 'Pointer' is from 'dart:ffi'.
    • 'Void' is from 'dart:ffi'.
    • 'Utf8' is from 'package:ffi/src/utf8.dart' ('../../.pub-cache/hosted/pub.flutter-io.cn/ffi-1.2.1/lib/src/utf8.dart').
    • 'Int32' is from 'dart:ffi'.
    • 'Uint32' is from 'dart:ffi'.
    • 'Int64' is from 'dart:ffi'. .asFunction(); ^ ../../.pub-cache/hosted/pub.flutter-io.cn/dart_native-0.7.3/lib/src/darwin/runtime/internal/native_runtime.dart:35:17: Error: Expected type 'NativeFunction<Int32 Function(Pointer, Pointer, Pointer, invalid-type, Pointer<NativeFunction<Void Function(Pointer<Pointer<Pointer>>, Pointer<Pointer>, Int32, Pointer<Pointer>, Int32)>>, Int64)>' to be a valid and instantiated subtype of 'NativeType'.
    • 'NativeFunction' is from 'dart:ffi'.
    • 'Int32' is from 'dart:ffi'.
    • 'Pointer' is from 'dart:ffi'.
    • 'Void' is from 'dart:ffi'.
    • 'Utf8' is from 'package:ffi/src/utf8.dart' ('../../.pub-cache/hosted/pub.flutter-io.cn/ffi-1.2.1/lib/src/utf8.dart').
    • 'Int64' is from 'dart:ffi'. nativeDylib.lookupFunction<AddMethodC, AddMethodD>('native_add_method'); ^ ../../.pub-cache/hosted/pub.flutter-io.cn/dart_native-0.7.3/lib/src/darwin/runtime/internal/native_runtime.dart:118:6: Error: Expected type 'NativeFunction<Pointer Function(Pointer, Pointer<NativeFunction<Void Function(Pointer<Pointer<Pointer>>, Pointer<Pointer>, Int32, Int32, Int64)>>, invalid-type, Int64)>' to be a valid and instantiated subtype of 'NativeType'.
    • 'NativeFunction' is from 'dart:ffi'.
    • 'Pointer' is from 'dart:ffi'.
    • 'Void' is from 'dart:ffi'.
    • 'Utf8' is from 'package:ffi/src/utf8.dart' ('../../.pub-cache/hosted/pub.flutter-io.cn/ffi-1.2.1/lib/src/utf8.dart').
    • 'Int32' is from 'dart:ffi'.
    • 'Int64' is from 'dart:ffi'. .lookupFunction<BlockCreateC, BlockCreateD>('native_block_create'); ^

    To Reproduce Steps to reproduce the behavior:

    1. dart_native: 0.7.3
    2. flutter:2.5.3
    3. dart:2.14.4
    Reviewed by yilugesanghua at 2022-08-09 08:54
  • 4. 安卓系统某些字符串在flutter获取是乱码

    [✓] Flutter (Channel flutter-2.8-candidate.16, 2.10.5, on macOS 12.4 21F79 darwin-arm, locale zh-Hans-CN) Android SDK version 31.0.0 在安卓系统下,获取这个字符串,会返回乱码,请帮忙排查一下。 可以用自带的example项目unit_test.dart里getStringAsync处输入该字符串复现。

    '[{"id":16,"regionid":1,"sectionid":"1","name":"台北車站生活圈","lat":"25.0440392","lng":"121.5139124"},{"id":17,"regionid":1,"sectionid":"1","name":"善導寺站生活圈","lat":"25.0432715","lng":"121.5247305"},{"id":22,"regionid":1,"sectionid":"1,5","name":"東門生活圈","lat":"25.0350275","lng":"121.5257406"},{"id":23,"regionid":1,"sectionid":"1","name":"植物園生活圈","lat":"25.0316631","lng":"121.5090781"},{"id":24,"regionid":1,"sectionid":"1","name":"古亭生活圈","lat":"25.0258859","lng":"121.5184339"},{"id":26,"regionid":1,"sectionid":"1,5","name":"公館生活圈","lat":"25.0155842","lng":"121.5298605"}]'

    Reviewed by ruiq at 2022-07-18 10:16
  • 5. android 工程测试代码跑不过,会报错

    错误方法在unit_test.dart文件的

      Map map = stub.getMap({"1": 10, "2": 20, "3": 30});
      map.forEach((key, value) {
        print("map from native $key : $value");
      });
    

    这块代码

    错误日志

    2021-08-19 17:28:51.109 30499-30533/com.dartnative.dart_native_example E/_native_exampl: JNI ERROR (app bug): attempt to pass an instance of java.util.HashMap$KeySet as argument 1 to java.util.List com.dartnative.dart_native.ArrayListConverter.setToList(java.util.HashSet)
    2021-08-19 17:28:51.109 30499-30533/com.dartnative.dart_native_example A/_native_exampl: java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: bad arguments passed to java.util.List com.dartnative.dart_native.ArrayListConverter.setToList(java.util.HashSet) (see above for details)
    2021-08-19 17:28:51.157 30499-30533/com.dartnative.dart_native_example A/_native_exampl: runtime.cc:655] Runtime aborting...
        runtime.cc:655] Dumping all threads without mutator lock held
        runtime.cc:655] All threads:
        runtime.cc:655] DALVIK THREADS (20):
        runtime.cc:655] "Thread-3" prio=6 tid=26 Runnable
        runtime.cc:655]   | group="" sCount=0 dsCount=0 flags=0 obj=0x131c0dc8 self=0x77208ef400
        runtime.cc:655]   | sysTid=30533 nice=-1 cgrp=top-app sched=0/0 handle=0x7788795cc0
        runtime.cc:655]   | state=R schedstat=( 1180773104 13527663 132 ) utm=87 stm=30 core=7 HZ=100
        runtime.cc:655]   | stack=0x778869e000-0x77886a0000 stackSize=995KB
        runtime.cc:655]   | held mutexes= "abort lock" "mutator lock"(shared held)
        runtime.cc:655]   native: #00 pc 000000000049fed8  /apex/com.android.art/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+140)
        runtime.cc:655]   native: #01 pc 00000000005ace00  /apex/com.android.art/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const+376)
        runtime.cc:655]   native: #02 pc 00000000005c9f38  /apex/com.android.art/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+924)
        runtime.cc:655]   native: #03 pc 00000000005c3e78  /apex/com.android.art/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+528)
        runtime.cc:655]   native: #04 pc 00000000005c3044  /apex/com.android.art/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool)+1920)
    
    Reviewed by WizzXu at 2021-08-19 09:32
  • 6. How to call global function

    I've been trying to figure out how to call global functions using your perform method but have been having a lot of trouble. How would I go about doing this? The method I'm trying to call:

     AudioFileOpenURL (
        CFURLRef inFileRef, 
        AudioFilePermissions inPermissions,
        AudioFileTypeID inFileTypeHint,
        AudioFileID	__nullable * __nonnull	outAudioFile
    )
    

    Thanks in advance!

    Reviewed by relf108 at 2020-11-12 07:10
  • 7. iOS Failed to lookup symbol (dlsym(RTLD_DEFAULT, InitDartApiDL): symbol not found)

    ref: https://github.com/dart-lang/ffi/issues/41

    There are two Workarounds:

    1. Use dynamic library: Add use_frameworks! in Podfile.
    2. Select Target Runner -> Build Settings -> Strip Style -> change from "All Symbols" to "Non-Global Symbols"
    Reviewed by yulingtianxia at 2020-09-25 06:46
  • 8. iOS 调用含有异步block的方法会崩

    dart_native was compiled with optimization - stepping may behave oddly; variables may not be available. OC

    + (void)test:(void (^)())t {
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            if (t) {
                t();
            }
        });
    }
    

    dart

    A.test(() {
    print('hello');
    });
    
    Reviewed by ljh740 at 2020-08-18 09:35
  • 9. 某些字符串从iOS返回dart会报错

    Flutter version 2.10.4 dart_native: ^0.6.3

    发现在iOS下(安卓不会),返回某些字符串会报错,比如"鎮",我把example里的示例改动了一下:

    • (NSString *)fooNSString:(NSString *)str { // DDLogInfo(@"%s arg: %@", FUNCTION, str); return @"鎮"; }

    发现报错了,真机模拟器都如此。

    Reviewed by ruiq at 2022-04-18 08:55
  • 10. x86虚拟机运行调用异步消息报错

    D/CallbackHandler(32439): invoke method: callbackComplex E/_native_exampl(32439): JNI ERROR (app bug): accessed stale Local 0xc9 (index 12 in a table of size 11) F/_native_exampl(32439): java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: use of deleted local reference 0xc9 F/_native_exampl(32439): java_vm_ext.cc:577] from java.lang.Object com.dartnative.dart_native.CallbackInvocationHandler.hookCallback(long, java.lang.String, int, java.lang.String[], java.lang.Object[], java.lang.String) F/_native_exampl(32439): runtime.cc:655] Runtime aborting... F/_native_exampl(32439): runtime.cc:655] Dumping all threads without mutator lock held F/_native_exampl(32439): runtime.cc:655] All threads: F/_native_exampl(32439): runtime.cc:655] DALVIK THREADS (19): F/_native_exampl(32439): runtime.cc:655] "main" prio=10 tid=1 Runnable

    Reviewed by wuguangyong at 2021-12-07 10:30
  • 11. How to use dart native for swift?

    I noticed dart native has used runtime of Objective-C(not sure), but swift is more popular now.

    The dart native market needs a lot of components and using swift to write compoents is a good way.

    This is my personal opinion. Thx.

    Reviewed by wanhmr at 2021-03-08 13:42
  • 12. Android 莫名其妙偶现崩溃

    接入这个后,偶尔出现崩溃,下面是日志,请问能看出是什么原因吗

    2022-01-06 13:39:03.723 28751-28751/com.addcn.android.house591 E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted
    2022-01-06 13:39:03.972 6721-27866/? E/MiuiFastConnectService: check adv data not fast connect
    2022-01-06 13:39:04.031 28751-12801/com.addcn.android.house591 A/libc: fdsan: attempted to close file descriptor 125, expected to be unowned, actually owned by SocketImpl 0x759c69f
    2022-01-06 13:39:04.384 6721-27866/? E/MiuiFastConnectService: check adv data not fast connect
    2022-01-06 13:39:04.436 12939-12939/? E/chromium: [0106/133904.436127:ERROR:elf_dynamic_array_reader.h(64)] tag not found
    2022-01-06 13:39:04.456 28751-12801/com.addcn.android.house591 A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 12801 (OkHttp Connecti), pid 28751 (ndroid.house591)
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG: Build fingerprint: 'Xiaomi/mars/mars:11/RKQ1.201112.002/V12.5.20.0.RKACNXM:user/release-keys'
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG: Revision: '0'
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG: ABI: 'arm64'
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG: Timestamp: 2022-01-06 13:39:04+0800
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG: pid: 28751, tid: 12801, name: OkHttp Connecti  >>> com.addcn.android.house591 <<<
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG: uid: 10352
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG: Abort message: 'fdsan: attempted to close file descriptor 125, expected to be unowned, actually owned by SocketImpl 0x759c69f'
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG:     x0  0000000000000000  x1  0000000000003201  x2  0000000000000006  x3  000000710bad99f0
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG:     x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000000000000030
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG:     x8  00000000000000f0  x9  7a005ffe29fc8c48  x10 0000000000000001  x11 0000000000000000
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG:     x12 0000000000000028  x13 0000034b422f43b8  x14 00019196fc3131f5  x15 0000000034155555
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG:     x16 0000007208ecb948  x17 0000007208eaa350  x18 00000070e5e54000  x19 000000000000704f
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG:     x20 0000000000003201  x21 000000710badf000  x22 000000720c8eab5c  x23 0000000000000003
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG:     x24 000000710bad9ae0  x25 ffffff80ffffffc8  x26 000000710bad9760  x27 000000710bad9720
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG:     x28 000000710bad9bc0  x29 000000710bad9a80
    2022-01-06 13:39:04.673 12949-12949/? A/DEBUG:     lr  0000007208e61f0c  sp  000000710bad96a0  pc  0000007208e61f2c  pst 0000000000001000
    2022-01-06 13:39:04.765 28751-28751/com.addcn.android.house591 E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG: backtrace:
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #00 pc 000000000008df2c  /apex/com.android.runtime/lib64/bionic/libc.so (fdsan_error(char const*, ...)+588) (BuildId: 5f57d25b37c043ed36c0e4147dcc8b3f)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #01 pc 000000000008dc28  /apex/com.android.runtime/lib64/bionic/libc.so (android_fdsan_close_with_tag+740) (BuildId: 5f57d25b37c043ed36c0e4147dcc8b3f)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #02 pc 000000000008e390  /apex/com.android.runtime/lib64/bionic/libc.so (close+16) (BuildId: 5f57d25b37c043ed36c0e4147dcc8b3f)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #03 pc 00000000000362c0  /apex/com.android.conscrypt/lib64/libjavacrypto.so (NativeCrypto_SSL_free(_JNIEnv*, _jclass*, long, _jobject*)+124) (BuildId: fd088ae72990178e580d5ab157316338)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #04 pc 000000000013ced4  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #05 pc 00000000001337e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #06 pc 00000000001a8a94  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #07 pc 0000000000319390  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #08 pc 000000000030f6bc  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #09 pc 000000000014a0c8  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+33960) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #10 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #11 pc 0000000000023634  /apex/com.android.conscrypt/javalib/conscrypt.jar (com.android.org.conscrypt.NativeSsl.close)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #12 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #13 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #14 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #15 pc 00000000001489d0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+28080) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #16 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #17 pc 000000000001a08c  /apex/com.android.conscrypt/javalib/conscrypt.jar (com.android.org.conscrypt.ConscryptEngine.closeAndFreeResources)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #18 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #19 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #20 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #21 pc 00000000001489d0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+28080) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #22 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #23 pc 000000000001a22c  /apex/com.android.conscrypt/javalib/conscrypt.jar (com.android.org.conscrypt.ConscryptEngine.freeIfDone)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #24 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #25 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #26 pc 0000000000310760  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<true, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+668) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #27 pc 000000000014894c  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+27948) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #28 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #29 pc 00000000000195c0  /apex/com.android.conscrypt/javalib/conscrypt.jar (com.android.org.conscrypt.ConscryptEngine.wrap)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #30 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #31 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #32 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #33 pc 00000000001489d0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+28080) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #34 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #35 pc 0000000000240450  /apex/com.android.art/javalib/core-oj.jar (javax.net.ssl.SSLEngine.wrap)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #36 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #37 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #38 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #39 pc 00000000001489d0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+28080) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #40 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #41 pc 0000000000019564  /apex/com.android.conscrypt/javalib/conscrypt.jar (com.android.org.conscrypt.ConscryptEngine.wrap)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #42 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #43 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #44 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #45 pc 00000000001489d0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+28080) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #46 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #47 pc 000000000001725c  /apex/com.android.conscrypt/javalib/conscrypt.jar (com.android.org.conscrypt.ConscryptEngineSocket$SSLOutputStream.writeInternal)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #48 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #49 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #50 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #51 pc 00000000001489d0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+28080) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #52 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #53 pc 00000000000170a8  /apex/com.android.conscrypt/javalib/conscrypt.jar (com.android.org.conscrypt.ConscryptEngineSocket$SSLOutputStream.access$200)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #54 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #55 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #56 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #57 pc 000000000014a0c8  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+33960) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #58 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #59 pc 0000000000017ce8  /apex/com.android.conscrypt/javalib/conscrypt.jar (com.android.org.conscrypt.ConscryptEngineSocket.drainOutgoingQueue)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #60 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #61 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #62 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #63 pc 00000000001489d0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+28080) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #64 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #65 pc 0000000000017ac0  /apex/com.android.conscrypt/javalib/conscrypt.jar (com.android.org.conscrypt.ConscryptEngineSocket.close)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #66 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #67 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #68 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #69 pc 00000000001489d0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+28080) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #70 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #71 pc 0000000000020ec4  /apex/com.android.art/javalib/okhttp.jar (com.android.okhttp.internal.Util.closeQuietly)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #72 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #73 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #74 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #75 pc 000000000014a0c8  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+33960) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #76 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #77 pc 00000000000156d4  /apex/com.android.art/javalib/okhttp.jar (com.android.okhttp.ConnectionPool.cleanup)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #78 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #79 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #80 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #81 pc 00000000001489d0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+28080) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #82 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #83 pc 000000000001539c  /apex/com.android.art/javalib/okhttp.jar (com.android.okhttp.ConnectionPool$1.run)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #84 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #85 pc 000000000066c054  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #86 pc 000000000013cff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.883 12949-12949/? A/DEBUG:       #87 pc 00000000021eb2e4  /memfd:jit-cache (deleted) (offset 0x2000000) (java.util.concurrent.ThreadPoolExecutor.runWorker+388)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #88 pc 0000000000133564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #89 pc 00000000001a8a78  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #90 pc 0000000000319390  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #91 pc 000000000030f6bc  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #92 pc 00000000001489d0  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+28080) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #93 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #94 pc 00000000001f8df8  /apex/com.android.art/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor$Worker.run)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #95 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #96 pc 000000000030eca8  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #97 pc 000000000030f6a0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #98 pc 000000000014846c  /apex/com.android.art/lib64/libart.so (void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*)+26700) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #99 pc 000000000013f7d8  /apex/com.android.art/lib64/libart.so (ExecuteSwitchImplAsm+8) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #100 pc 00000000000eb838  /apex/com.android.art/javalib/core-oj.jar (java.lang.Thread.run)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #101 pc 0000000000306dc0  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.11487796752256266877)+532) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #102 pc 000000000066c054  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #103 pc 000000000013cff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #104 pc 0000000000133564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #105 pc 00000000001a8a78  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #106 pc 0000000000555ac4  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #107 pc 00000000005a4e60  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1308) (BuildId: 5b103c304a50c13c7fbeaacc0e0df496)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #108 pc 00000000000eb828  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 5f57d25b37c043ed36c0e4147dcc8b3f)
    2022-01-06 13:39:04.884 12949-12949/? A/DEBUG:       #109 pc 000000000008ba48  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 5f57d25b37c043ed36c0e4147dcc8b3f)
    
    Reviewed by LiuDongCai at 2022-01-06 05:55
  • 13. DartNative's memory management strategy is strongly discouraged by the official Dart team :(

    Hi, I was implementing the fully automatic memory management between Dart/Flutter and Rust (see https://github.com/fzyzcjy/flutter_rust_bridge/issues/243), so I asked some questions to the Dart team, and I find the following reply also applies to your case (http://yulingtianxia.com/blog/2020/08/22/DartNative-Automatic-Memory-Management/):

    I would strongly discourage anyone from using GC to manage non-Dart objects. If you want to manage native object lifetimes, have an explicit method like close or dispose to release native resources. GC might not ever run, or run too late.

    The VM can be aware of external object size, but GC pressure comes from new allocations. It's really not that hard to get into a scenario where you have an external object that takes up very close to a ceiling of memory you want to use, but not enough to trigger a GC. Then, new allocations happen quickly and kick off a GC, but you then run out of memory (or file handles, or some other native limited resource) before the GC can finish.

    Flutter had this problem with images for example - we were relying on the GC to clean them up, which works pretty often but does not work so well when you try to load larger images in memory constrained environments. The more we tried to make the GC clean this up for us, the worse it got - the GC sometimes couldn't work fast enough (so new images could get allocated before the GC-able ones got cleaned up, leading to OOMs), and we also were artificially running the GC too often (Because it saw these huge objects it thought it was responsible for cleaning up). So now we explicitly and eagerly dispose images/graphics resources, and you can't get into that race anymore (and we don't need as many GCs, which are pretty resource intensive to run).

    Link: https://github.com/dart-lang/language/issues/1847#issuecomment-1002860171

    Reviewed by fzyzcjy at 2022-01-05 00:49
  • 14. [documentation] provide benchmark to demostrate statement in readme

    your readme states

    Replaces the low-performing Flutter channel with faster and more concise code.

    I care less about the "concise" part, but your claim that your solution is faster than the first party implementation is interesting could you provide benchmarks that demonstrate your claim?

    Additionally, how does this solution perform against pigeon?

    Reviewed by iapicca at 2021-12-11 19:00
  • 15. Flutter 单元测试库引用问题

    dylib is null, open dyLibrary path + libdart_native.so

    Invalid argument(s): Failed to load dynamic library (dlopen(libdart_native.so, 0x0001): tried: '/Users/civelxu/Library/Application Support/fvm/versions/flutter/bin/cache/artifacts/engine/darwin-x64/./libdart_native.so' (no such file), '/Users/civelxu/Library/Application Support/fvm/versions/flutter/bin/cache/artifacts/engine/darwin-x64/../../../libdart_native.so' (no such file), '/Users/civelxu/Library/Application Support/fvm/versions/flutter/bin/cache/artifacts/engine/darwin-x64/Frameworks/libdart_native.so' (no such file), '/Users/civelxu/Library/Application Support/fvm/versions/flutter/bin/cache/artifacts/engine/darwin-x64/./libdart_native.so' (no such file), '/Users/civelxu/Library/Application Support/fvm/versions/flutter/bin/cache/artifacts/engine/darwin-x64/../../../libdart_native.so' (no such file), '/Users/civelxu/Library/Application Support/fvm/versions/flutter/bin/cache/artifacts/engine/darwin-x64/Frameworks/libdart_native.so' (no such file), 'libdart_native.so' (no such file), '/usr/local/lib/libdart_native.so' (no such file), '/usr/lib/libdart_native.so' (no such file), '/Users/civelxu/xxx/xxx/xxx/libdart_native.so' (no such file), '/usr/local/lib/libdart_native.so' (no such file), '/usr/lib/libdart_native.so' (no such file))

    Reviewed by CivelXu at 2021-11-12 03:42

Related

Flutter blue plus - Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android and iOS
Flutter blue plus - Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android and iOS

Introduction FlutterBluePlus is a bluetooth plugin for Flutter, a new app SDK to

Aug 12, 2022
Klutter plugin makes it possible to write a Flutter plugin for both Android and iOS using Kotlin only.

The Klutter Framework makes it possible to write a Flutter plugin for both Android and iOS using Kotlin Multiplatform. Instead of writing platform spe

Aug 10, 2022
Feb 10, 2022
dna, dart native access. A lightweight dart to native super channel plugin

dna, dart native access. A lightweight dart to native super channel plugin, You can use it to invoke any native code directly in contextual and chained dart code.

Jul 11, 2022
SMS Receiver Channel For Android
SMS Receiver Channel For Android

SMS Receiver Channel SMS Receiver Channel For Android Getting Started Use channel on the client_side (flutter) and the platform_side (android) and inv

Feb 26, 2022
The repo contains the source code for all the tutorials on the FilledStacks Youtube channel.
The repo contains the source code for all the tutorials on the FilledStacks Youtube channel.

Flutter tutorials The repo contains the source code for all the written tutorials by Filledstacks. All Tutorials plus additional snippets and shorter

Aug 16, 2022
Low-level link (text, URLs, emails) parsing library in Dart

linkify Low-level link (text, URLs, emails) parsing library in Dart. Required Dart >=2.12 (has null-safety support). Flutter library. Pub - API Docs -

Dec 11, 2021
Ozzie is your testing friend. Ozzie will take an screenshot during integration tests whenever you need. Ozzie will capture performance reports for you.
Ozzie is your testing friend. Ozzie will take an screenshot during integration tests whenever you need. Ozzie will capture performance reports for you.

ozzie.flutter Ozzie is your testing friend. Ozzie will take an screenshot during integration tests whenever you need. Ozzie will capture performance r

Nov 8, 2021
The classic to-do application where a user can write down all the things he wants to accomplish. Android only.
The classic to-do application where a user can write down all the things he wants to accomplish. Android only.

todo-app The classic to-do application where a user can write down all the things he wants to accomplish. Android only. Table of Contents todo-app Tab

Mar 3, 2022
This repository is meant to save all the code I may write about this course.

COD3R - Aprenda Flutter & Dart e Construa APPs iOS e Android ?? Idea: This repository is meant to save all the code and projects I may write with this

Mar 9, 2022
An open source food delivery product and service that will be developed on the FilledStacks YouTube channel

Box't Out An open source food delivery product and service that will be developed on the FilledStacks YouTube channel. The repo will contain all the s

Aug 15, 2022
Flutter tutorial - This is my first Flutter tutorial app. Thanks to The Net Ninja youtube channel for this wonderful tutorial

ninja_id A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Jun 9, 2022
Master Channel cannot use Glass Floating Action Button
Master Channel cannot use Glass Floating Action Button

Problem Master Channel cannot use GlassFloatingActionButton. About This package

Jan 21, 2022
This is an open source Tips & Tricks for Flutter, that helps flutter Developers write simple but powerful dart codes.

Showcasing-flutter - This is an open source Tips & Tricks for Flutter, that helps flutter Developers write simple but powerful dart codes.

Jan 4, 2022
A collection of useful algorithms in Dart with keeping performance and flexibility on mind.

algorithmic A collection of useful algorithms in Dart with keeping performance and flexibility on mind. Usage The following import will give you acces

Feb 15, 2022
Write and debug tests easily, built on integration_test
Write and debug tests easily, built on integration_test

flutter_convenient_test: Write and debug tests easily, built on integration_test Quick demo full_video.mov Have questions? Though used in production e

Aug 15, 2022
A super effective dart library delivering performance & ensuring greater build speed.
A super effective dart library delivering performance & ensuring greater build speed.

A super effective Dart and Flutter library for delivering performante app ?? & ensuring greater build speed ?? . The package has some cook utilizes wh

Nov 22, 2021
A Todo Notes Application developed with flutter, with basic functionalities to write quick Notes.
A Todo Notes Application developed with flutter, with basic functionalities to write quick Notes.

Notes Application - Flutter A Todo Notes Application developed with flutter, with basic functionalities to write quick Notes. NOTES PASSWORD-PROTECTED

May 14, 2022
The v2ex client write in flutter.
The v2ex client write in flutter.

Language: English | 中文简体 V2LF V2LF is a v2ex unofficial app. 'V2LF' means 'way to love flutter'. The original intention of developing this app is to l

Aug 6, 2022