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

NSMallocException on iOS #1236

Open
kendo6666 opened this issue Nov 25, 2024 · 0 comments
Open

NSMallocException on iOS #1236

kendo6666 opened this issue Nov 25, 2024 · 0 comments

Comments

@kendo6666
Copy link

This issue reports an NSMallocException: Failed to grow buffer error encountered in a Flutter application on iOS. The crash occurs while browsing images using the AssetPicker package.

Steps to Reproduce:

Run the Flutter application on an iPhone X with iOS 16.4.
Use the AssetPicker to browse and select images.
The application crashes after selecting a certain number of images.

Crash Log:

*** Terminating app due to uncaught exception 'NSMallocException', reason: 'Failed to grow buffer'
*** First throw call stack:
(0x195f8957c 0x18f285050 0x19611c5f8 0x196114584 0x1960032d0 0x190387558 0x190371f14 0x19ac71104 0x19acb4924 0x1e1c7a9fc 0x1e1c98088 0x1e1c6c51c 0x1e1c68178 0x1e1c6688c 0x19acc6218 0x19acc5864 0x19acad2a4 0x19ac734a8 0x19ac4b098 0x19830da78 0x105508708 0x105510c2c 0x1a98c4fa8 0x1a9a5881c 0x1a98a8e68 0x1a98a8cf0 0x1a98a82e8 0x1a98a7d94 0x1a98a7b3c 0x1a98aa0d4 0x1a98ab884 0x1a98ab0f0 0x1a98b02d8 0x1a98b1c7c 0x1a98a9774 0x1a98b47b0 0x1a9b43c88 0x1a989ed9c 0x1a98cf9dc 0x1a98b3980 0x1a98b3238 0x1a98b2980 0x1a98a0ca0 0x1a98a2ea4 0x1a98a2cf0 0x1a98a2930 0x105510930 0x10550c3fc 0x10551c000 0x10551b08c 0x19cd237a8 0x19cd24780 0x19ccfb9f8 0x19cd08c68 0x19cd09430 0x1dfc20b94 0x1dfc20720)
libc++abi: terminating due to uncaught exception of type NSException
* thread fluttercandies/flutter_wechat_assets_picker#60, queue = 'com.apple.root.default-qos', stop reason = signal SIGABRT
    frame #0: 0x00000001d07e6158 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1d07e6158 <+8>:  b.lo   0x1d07e6174               ; <+36>
    0x1d07e615c <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1d07e6160 <+16>: mov    x29, sp
    0x1d07e6164 <+20>: bl     0x1d07e1b30               ; cerror_nocancel
Target 0: (Runner) stopped.
Lost connection to device.

Environment:
webchat_assets_picker: 9.0.0
Device: iPhone X
iOS Version: 16.4
Flutter Version: 3.19.2

Code Snippet:

  void onTapAlbum() async {
   final themeData = Theme.of(Get.context!); // 获取应用的主题
   
    AssetPickerPageRouteBuilder<List<AssetEntity>>? pageRouteBuilder;
    final AssetPickerPageRoute<List<AssetEntity>> route =
    pageRouteBuilder?.call(const SizedBox.shrink()) ??
        AssetPickerPageRoute<List<AssetEntity>>(
          builder: (_) => const SizedBox.shrink(),
        );
    final List<AssetEntity>? assets = await AssetPicker.pickAssetsWithDelegate(
      Get.context!,
      
      delegate: CustomAssetPickerBuilderDelegate(
        initialPermission: PermissionState.authorized,
        selectOriginalCallBack:selectOriginalCallBack, route: route,
        pickerConfig:AssetPickerConfig(
          themeColor:Styles.c_0DB1D7,
        ),
        locale: Localizations.maybeLocaleOf(Get.context!),
      ),
    );

Thank you for your time and support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants