Skip to content

Impeller (Vulkan) Crash: Out-of-Memory on Samsung S23 (Adreno), Works Fine Without Impeller #160941

Closed as not planned

Description

@corepuncher

Steps to reproduce

  1. Device/OS: Samsung Galaxy S23, Android 14 (One UI-based).
  2. Impeller: Enabled by default in Flutter debug mode.
  3. App: A data-intensive Flutter app that displays many map tiles/overlay images (36 time frames × multiple image layers).

==> UPDATE: I am getting same Out of memory error even with 6 frames loaded.

  1. Run flutter run (with Impeller on) in debug mode.
  2. Interact with the app (panning the map, loading large or multiple overlays).
  3. After some usage, the driver prints “Out of memory” logs and issues a SIGSEGV in vulkan.adreno.so.

Expected results

The app should not crash due to GPU memory errors when using Impeller. Even though the app is memory-intensive, the older Skia/OpenGL backend can handle it without forcibly crashing. Impeller should gracefully handle or fail to allocate resources without causing a SIGSEGV.

Actual results

With Impeller (Vulkan) on Samsung S23, repeated GPU allocation failures eventually trigger a native crash (SIGSEGV) in the Adreno Vulkan driver (vulkan.adreno.so).

The app immediately crashes with a GPU-level OOM error.

Logs show Out of memory, kgsl_sharedmem_alloc() failed, followed by a segmentation fault in the Vulkan driver.

Code sample

Code sample
//  If Impeller is enabled on a Samsung S23 (Adreno GPU),
// cycling the frames often can lead to GPU "Out of memory" and a native crash.
//
// Try running:
//    flutter run --enable-impeller
// Then press "Cycle Frame" multiple times. Watch logcat for GPU memory issues.
// Alternatively, if you switch to `--enable-impeller=false`, the app won't crash.
//
// Adjust `numFrames` or `tileLayersPerFrame` to intensify resource usage.
//
// This is a simplified example. My real app loads many real tiles/overlays, up to 36 frames, etc.
// It has always run just fine in previous flutter versions, with even more frames of data loaded. 
// Devtools "memory" remains at about 500 mb, but this is a GPU issue.

import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart';

void main() {
  runApp(const MyImpellerBugDemo());
}

class MyImpellerBugDemo extends StatelessWidget {
  const MyImpellerBugDemo({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Impeller Crash Demo',
      theme: ThemeData(useMaterial3: true),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  /// Suppose we have 36 frames total (like time steps).
  static const int numFrames = 36;

  /// Current frame index that we're displaying.
  int frameIndex = 0;

  /// We can add multiple tile layers each frame to simulate heavier usage.
  static const int tileLayersPerFrame = 12;

  /// Whether we auto-cycle frames or not.
  bool autoCycle = false;

  @override
  void initState() {
    super.initState();
    // Optionally start an auto-cycle
    // _startAutoCycle();
  }

  // Example: a quick timer to repeatedly cycle frames for stress testing.
  void _startAutoCycle() async {
    autoCycle = true;
    while (autoCycle) {
      await Future.delayed(const Duration(milliseconds: 125));
      setState(() {
        frameIndex = (frameIndex + 1) % numFrames;
      });
    }
  }

  // Build a list of "TileLayer" widgets for the current frame.
  List<Widget> buildTileLayers(int currentFrame) {
    List<Widget> layers = [];
    for (int i = 0; i < tileLayersPerFrame; i++) {
      /// Fake tile URL with a query param to show different text or image each frame
      final tileUrl = 'https://via.placeholder.com/512x512?text=Frame_${currentFrame}_Layer_${i}';

      layers.add(
        // Each frame has an Opacity that is 1.0 if it's the active frame,
        //  or 0.0 otherwise. Imagine we keep all frames in the widget tree at once.
        Opacity(
          opacity: (currentFrame == frameIndex) ? 1.0 : 0.0,
          // Use flutter_map's TileLayer or even an Image.network(...) for demonstration
          child: TileLayer(
            // Typically you'd do: urlTemplate: 'https://myserver.com/{z}/{x}/{y}.png'
            // But for the minimal sample we just supply the placeholder image:
            urlTemplate: tileUrl,
            userAgentPackageName: 'impeller.crash.demo',

            // TMS or standard - doesn't matter here, we won't truly see map tiles,
            // but we simulate large texture usage.
            tms: false,
            // Freed if an error, just in case:
            evictErrorTileStrategy: EvictErrorTileStrategy.dispose,
            tileBounds: LatLngBounds(const LatLng(-85, -180), const LatLng(85, 180)),
          ),
        ),
      );
    }
    return layers;
  }

  @override
  Widget build(BuildContext context) {
    // We create a flutter_map with 36 frames worth of tile layers,
    // each layer is fully or zero opacity depending on the frameIndex.
    List<Widget> allFramesLayers = [];
    for (int f = 0; f < numFrames; f++) {
      allFramesLayers.addAll(buildTileLayers(f));
    }

    return Scaffold(
      appBar: AppBar(
        title: const Text('Impeller Crash Demo'),
      ),
      body: FlutterMap(
        options: MapOptions(
          center: const LatLng(0, 0),
          zoom: 7.0,
          maxZoom: 12,
        ),
        children: allFramesLayers,
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          setState(() {
            frameIndex = (frameIndex + 1) % numFrames;
          });
        },
        child: const Text('Cycle Frame'),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
D/InputMethodManagerUtils(10136): startInputInner - Id : 0
I/InputMethodManager(10136): startInputInner - IInputMethodManagerGlobalInvoker.startInputOrWindowGainedFocus
D/InputTransport(10136): Input channel destroyed: 'ClientS', fd=184
D/InputMethodManagerUtils(10136): startInputInner - Id : 0
I/InputMethodManager(10136): startInputInner - IInputMethodManagerGlobalInvoker.startInputOrWindowGainedFocus

W/Adreno-GSL( 7583): <sharedmem_gpuobj_alloc:3396>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
E/Adreno-GSL( 7583): <gsl_memory_alloc_pure_64:3091>: ERROR: kgsl_sharedmem_alloc() failed! Allocation size: (8 KB); Flags: (0x890c2500)
F/libc    ( 7583): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1c in tid 7638 (1.raster), pid 7583 (aware.myApp)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/<my S23>/release-keys'
Revision: '13'
ABI: 'arm64'
Processor: '7'
Timestamp: 2024-12-28 02:07:19.067284518-0600
Process uptime: 153s
Cmdline: com.myApp.myApp
pid: 7583, tid: 7638, name: 1.raster  >>> com.myApp.myApp <<<
uid: 11034
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x000000000000001c
Cause: null pointer dereference
    x0  0000000000000000  x1  b400007b2f118f00  x2  0000000000000000  x3  0000000000000011
    x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000007e08136d10
    x8  7c92a49c46d65e06  x9  7c92a49c46d65e06  x10 0000007e24b018e0  x11 0000000000000001
    x12 0000000000000000  x13 0000000000004000  x14 0000000000000000  x15 b400007bb180cb10
    x16 0000007f38732a18  x17 0000007f38720eb8  x18 0000007e0e8ee000  x19 b400007be1d64600
    x20 0000000000000004  x21 b400007be38d3fc0  x22 0000000000000000  x23 0000000000000018
    x24 0000000000000004  x25 00000000ffffffff  x26 0000000000000005  x27 0000000000000000
    x28 0000000000000009  x29 0000007e0ecfd650
    lr  0000007e07fdb8e4  sp  0000007e0ecfd640  pc  0000007e07fdb7ac  pst 0000000060001000
45 total frames
backtrace:
      #00 pc 000000000013a7ac  /vendor/lib64/hw/vulkan.adreno.so (!!!0000!65bb4f16e1c4caf7a56f18c58bd23d!7b26bdd942!+252) (BuildId: caba33a715132306f80f4b92e45322d2)
      #01 pc 00000000001719a4  /vendor/lib64/hw/vulkan.adreno.so (!!!0000!1545b1a16d6339206c1ae1cda4ddca!7b26bdd942!+1780) (BuildId: caba33a715132306f80f4b92e45322d2)
      #02 pc 000000000016cb90  /vendor/lib64/hw/vulkan.adreno.so (!!!0000!2b54ec3f889e47c947f5102d244cd8!7b26bdd942!+768) (BuildId: caba33a715132306f80f4b92e45322d2)
      #03 pc 000000000016c5d4  /vendor/lib64/hw/vulkan.adreno.so (qglinternal::vkCmdBeginRenderPass(VkCommandBuffer_T*, VkRenderPassBeginInfo const*, VkSubpassContents)+116) (BuildId: caba33a715132306f80f4b92e45322d2)
      #04 pc 0000000000028428  /system/lib64/libvulkan.so (vulkan::api::(anonymous namespace)::CmdBeginRenderPass(VkCommandBuffer_T*, VkRenderPassBeginInfo const*, VkSubpassContents)+136) (BuildId: 9b06a1f4deaf795678bf690c75f1f9af)
      #05 pc 00000000020c0768  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #06 pc 00000000020a8758  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #07 pc 0000000001d383e4  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #08 pc 000000000208acd4  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #09 pc 00000000020547a0  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #10 pc 000000000205300c  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #11 pc 0000000002052f24  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #12 pc 00000000020598c4  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #13 pc 0000000001d1228c  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #14 pc 000000000205a144  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #15 pc 0000000001d12f24  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #16 pc 0000000001d1228c  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #17 pc 000000000205a144  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #18 pc 0000000001d12f24  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #19 pc 0000000001d1228c  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #20 pc 0000000001d12738  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #21 pc 000000000205b0e4  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #22 pc 0000000002151450  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #23 pc 0000000001fd73ac  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #24 pc 0000000001fd728c  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #25 pc 0000000001fd7314  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #26 pc 00000000020dc93c  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #27 pc 00000000020dc3f0  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #28 pc 00000000020db28c  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #29 pc 00000000020dbc60  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #30 pc 00000000020dd834  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #31 pc 00000000020db6fc  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #32 pc 00000000020db494  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #33 pc 00000000020e9c9c  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #34 pc 0000000001cacfe8  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #35 pc 0000000001cb2a28  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #36 pc 0000000000018b70  /system/lib64/libutils.so (android::Looper::pollInner(int)+1252) (BuildId: a0e0ad47138267db6c479fc556e32d00)
      #37 pc 0000000000018628  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+124) (BuildId: a0e0ad47138267db6c479fc556e32d00)
      #38 pc 000000000001a184  /system/lib64/libandroid.so (ALooper_pollOnce+104) (BuildId: 8bdbd2f8698c97b6953f5d0bea62411c)
      #39 pc 0000000001cb29b0  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #40 pc 0000000001cacf34  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #41 pc 0000000001cb0c94  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #42 pc 0000000001cb0b2c  /data/app/~~MKsJyXBCSupFybl0KLgn-A==/com.myApp.myApp-z5qEAVIXO0nEgbkvQDlpZQ==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #43 pc 00000000000fd254  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 8aaf102cfbdac2f120bf95c648547386)
      #44 pc 0000000000096a04  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 8aaf102cfbdac2f120bf95c648547386)
Lost connection to device.



==> UPDATE: Similar crash with ONLY 6 frames of data loaded.  The app had been running a while with no interaction, then I panned the map and got:

W/Adreno-GSL(10136): <sharedmem_gpuobj_alloc:3396>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
E/Adreno-GSL(10136): <gsl_memory_alloc_pure_64:3091>: ERROR: kgsl_sharedmem_alloc() failed! Allocation size: (8 KB); Flags: (0x890c2500)
F/libc    (10136): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1c in tid 10192 (1.raster), pid 10136 (aware.myApp)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/<my S23>/release-keys'
Revision: '13'
ABI: 'arm64'
Processor: '5'
Timestamp: 2024-12-29 14:56:29.113141551-0600
Process uptime: 3069s
Cmdline: com.myApp.myApp
pid: 10136, tid: 10192, name: 1.raster  >>> com.myApp.myApp <<<
uid: 11034
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x000000000000001c
Cause: null pointer dereference
    x0  0000000000000000  x1  b400007bdb347880  x2  0000000000000000  x3  0000000000000011
    x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000007e032d9d10
    x8  159d0ab32180276a  x9  159d0ab32180276a  x10 0000007e24af98e0  x11 0000000000000001
    x12 0000000000000000  x13 0000000000004000  x14 0000000000000000  x15 b400007be3a28960
    x16 0000007f38732a18  x17 0000007f38720eb8  x18 0000007e098f0000  x19 b400007d412e2600
    x20 0000000000000004  x21 b400007d39ad8f20  x22 0000000000000000  x23 0000000000000018
    x24 0000000000000004  x25 00000000ffffffff  x26 0000000000000005  x27 0000000000000000
    x28 0000000000000009  x29 0000007e1633da20
    lr  0000007e0317e8e4  sp  0000007e1633da10  pc  0000007e0317e7ac  pst 0000000060001000
45 total frames
backtrace:
      #00 pc 000000000013a7ac  /vendor/lib64/hw/vulkan.adreno.so (!!!0000!65bb4f16e1c4caf7a56f18c58bd23d!7b26bdd942!+252) (BuildId: caba33a715132306f80f4b92e45322d2)
      #01 pc 00000000001719a4  /vendor/lib64/hw/vulkan.adreno.so (!!!0000!1545b1a16d6339206c1ae1cda4ddca!7b26bdd942!+1780) (BuildId: caba33a715132306f80f4b92e45322d2)
      #02 pc 000000000016cb90  /vendor/lib64/hw/vulkan.adreno.so (!!!0000!2b54ec3f889e47c947f5102d244cd8!7b26bdd942!+768) (BuildId: caba33a715132306f80f4b92e45322d2)
      #03 pc 000000000016c5d4  /vendor/lib64/hw/vulkan.adreno.so (qglinternal::vkCmdBeginRenderPass(VkCommandBuffer_T*, VkRenderPassBeginInfo const*, VkSubpassContents)+116) (BuildId: caba33a715132306f80f4b92e45322d2)
      #04 pc 0000000000028428  /system/lib64/libvulkan.so (vulkan::api::(anonymous namespace)::CmdBeginRenderPass(VkCommandBuffer_T*, VkRenderPassBeginInfo const*, VkSubpassContents)+136) (BuildId: 9b06a1f4deaf795678bf690c75f1f9af)
      #05 pc 00000000020c0768  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #06 pc 00000000020a8758  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #07 pc 0000000001d383e4  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #08 pc 0000000002065f0c  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #09 pc 0000000002065e68  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #10 pc 0000000002075ec0  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #11 pc 0000000002074504  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #12 pc 00000000020743e8  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #13 pc 0000000002086bac  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #14 pc 00000000020547b4  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #15 pc 0000000002055ddc  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #16 pc 0000000001d1228c  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #17 pc 000000000205a144  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #18 pc 0000000001d12f24  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #19 pc 0000000001d1228c  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #20 pc 0000000001d12738  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #21 pc 000000000205b0e4  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #22 pc 0000000002151450  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #23 pc 0000000001fd73ac  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #24 pc 0000000001fd728c  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #25 pc 0000000001fd7314  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #26 pc 00000000020dc93c  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #27 pc 00000000020dc3f0  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #28 pc 00000000020db28c  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #29 pc 00000000020dbc60  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #30 pc 00000000020dd834  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #31 pc 00000000020db6fc  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #32 pc 00000000020db494  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #33 pc 00000000020e9c9c  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #34 pc 0000000001cacfe8  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #35 pc 0000000001cb2a28  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #36 pc 0000000000018b70  /system/lib64/libutils.so (android::Looper::pollInner(int)+1252) (BuildId: a0e0ad47138267db6c479fc556e32d00)
      #37 pc 0000000000018628  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+124) (BuildId: a0e0ad47138267db6c479fc556e32d00)
      #38 pc 000000000001a184  /system/lib64/libandroid.so (ALooper_pollOnce+104) (BuildId: 8bdbd2f8698c97b6953f5d0bea62411c)
      #39 pc 0000000001cb29b0  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #40 pc 0000000001cacf34  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #41 pc 0000000001cb0c94  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #42 pc 0000000001cb0b2c  /data/app/~~O8jUELOhK5ix4-JlEwCMYg==/com.myApp.myApp-di6QFKdberyJJNGS9AdK4A==/base.apk!libflutter.so (offset 0x1f0c000) (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
      #43 pc 00000000000fd254  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 8aaf102cfbdac2f120bf95c648547386)
      #44 pc 0000000000096a04  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 8aaf102cfbdac2f120bf95c648547386)
Lost connection to device.

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.27.1, on Microsoft Windows [Version 10.0.22621.4317], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.3)
[√] Android Studio (version 2023.2)
[√] VS Code (version 1.96.2)
[√] Connected device (4 available)
[√] Network resources

• No issues found!

Activity

  1. adil192 commented on Dec 28, 2024

    @adil192
    Contributor

    I'm experiencing a similar issue on my Samsung S24 Ultra, thought I'd share logs here if they're useful

    I/scudo   ( 1201): Scudo OOM: The process has exhausted 256M for size class 131088.
    I/nney.ricochlime( 1201): Waiting for a blocking GC NativeAlloc
    I/nney.ricochlime( 1201): WaitForGcToComplete blocked NativeAlloc on NativeAlloc for 23.408ms
    I/scudo   ( 1201): Stats: SizeClassAllocator64: 1359M mapped (0M rss) in 14331697 allocations; remains 900791
    // [ spam of memory allocations goes here ]
    I/scudo   ( 1201): Scudo OOM: The process has exhausted 256M for size class 163856.
    W/Adreno-GSL( 1201): <sharedmem_gpuobj_alloc:3544>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
    E/Adreno-GSL( 1201): <gsl_memory_alloc_pure_64:3791>: ERROR: kgsl_sharedmem_alloc() failed! Allocation size: (345 KB); Flags: (0x88083300)
    E/flutter ( 1201): [ERROR:flutter/impeller/renderer/backend/vulkan/descriptor_pool_vk.cc(185)] Break on 'ImpellerValidationBreak' to inspect point of failure: Unable to create a descriptor pool
    F/libc    ( 1201): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfffffffffffffff8 in tid 1369 (1.raster), pid 1201 (nney.ricochlime)
    *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 'samsung/e3qxeea/e3q:14/UP1A.231005.007/S928BXXS4AXKA:user/release-keys'
    Revision: '13'
    ABI: 'arm64'
    Processor: '3'
    Timestamp: 2024-12-28 22:37:52.726538006+0000
    Process uptime: 28s
    Cmdline: com.adilhanney.ricochlime
    pid: 1201, tid: 1369, name: 1.raster  >>> com.adilhanney.ricochlime <<<
    uid: 10486
    tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
    pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xfffffffffffffff8
        x0  b40000738d121bd0  x1  b4000072bd133588  x2  000000753baec4c4  x3  000000719ec02c98
        x4  0000000000000020  x5  0000000005f56b08  x6  71647164636d6471  x7  7f7f7f7f7f7f7f7f
        x8  0000000000000022  x9  0000000000000000  x10 0000000000000030  x11 0000000000000009
        x12 000000000000dcdd  x13 0000000000000000  x14 000000719ec018f0  x15 000005c108e92cf9
        x16 0000000000000001  x17 000000753ba4f488  x18 000000719bda8000  x19 000000719ec031f8
        x20 b40000738d121bd0  x21 b40000744d124898  x22 b40000723d20c268  x23 b40000744d124740
        x24 0000000000001900  x25 000000719ec06000  x26 0000000000000000  x27 b40000730d1180c8
        x28 0000000000000001  x29 b4000073ed127fe8
        lr  00000071a1ec4d60  sp  000000719ec02f10  pc  00000071a1ec4d7c  pst 0000000060001000
    46 total frames
    backtrace:
          #00 pc 00000000020b4d7c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #01 pc 00000000020c1398  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #02 pc 000000000208442c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #03 pc 000000000206deb4  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #04 pc 0000000002065f4c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #05 pc 0000000002065e68  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #06 pc 000000000206da24  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #07 pc 0000000002083e7c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #08 pc 00000000020785f0  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #09 pc 000000000206e3f4  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #10 pc 0000000002074504  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #11 pc 00000000020743e8  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #12 pc 0000000002086bac  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #13 pc 00000000020547b4  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #14 pc 0000000002054af8  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #15 pc 0000000002059c9c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #16 pc 0000000001d12c9c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #17 pc 0000000001d127e8  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #18 pc 000000000205a144  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #19 pc 0000000001d12f24  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #20 pc 0000000001d1228c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #21 pc 0000000001d12738  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #22 pc 000000000205b0e4  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #23 pc 0000000002151450  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #24 pc 0000000001fd73ac  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #25 pc 0000000001fd728c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #26 pc 0000000001fd7314  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #27 pc 00000000020dc93c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #28 pc 00000000020dc3f0  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #29 pc 00000000020db28c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #30 pc 00000000020dbc60  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #31 pc 00000000020dd834  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #32 pc 00000000020db6fc  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #33 pc 00000000020db494  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #34 pc 00000000020e9c9c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #35 pc 0000000001cacfe8  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #36 pc 0000000001cb2a28  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #37 pc 0000000000018b70  /system/lib64/libutils.so (android::Looper::pollInner(int)+1252) (BuildId: a0e0ad47138267db6c479fc556e32d00)
          #38 pc 0000000000018628  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+124) (BuildId: a0e0ad47138267db6c479fc556e32d00)
          #39 pc 000000000001a184  /system/lib64/libandroid.so (ALooper_pollOnce+104) (BuildId: 8bdbd2f8698c97b6953f5d0bea62411c)
          #40 pc 0000000001cb29b0  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #41 pc 0000000001cacf34  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #42 pc 0000000001cb0c94  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #43 pc 0000000001cb0b2c  /data/app/~~f8qwqXYnNYuFLz5yQUU0iA==/com.adilhanney.ricochlime-qDmkcPvwXgKftuLodSQG1w==/lib/arm64/libflutter.so (BuildId: b0c8ea18145e86f27eccbf0956cff58f847fee5b)
          #44 pc 00000000000c3914  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: edc1b601d9f8344c1eccd3d77a458f65)
          #45 pc 000000000005d084  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: edc1b601d9f8344c1eccd3d77a458f65)
    Lost connection to device.
    
    Exited.
    flutter doctor -v

    [✓] Flutter (Channel stable, 3.27.1, on macOS 15.2 24C101 darwin-arm64, locale en-GB)
    • Flutter version 3.27.1 on channel stable at /Volumes/m2/ExternUsers/ahann/Documents/Sources/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd (12 days ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.40.2

    [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Volumes/m2/ExternUsers/ahann/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
    • All Android licenses accepted.

    [✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

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

    [✓] Android Studio (version 2024.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 21.0.3+-79915917-b509.11)

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

    [✓] Connected device (4 available)
    • SM S928B (mobile) • R3CXC00DVZD • android-arm64 • Android 14 (API 34)
    • macOS (desktop) • macos • darwin-arm64 • macOS 15.2 24C101 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.2 24C101 darwin-arm64
    • Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.140
    ! Error: Browsing on the local area network for Adil’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
    The device must be opted into Developer Mode to connect wirelessly. (code -27)

    [✓] Network resources
    • All expected network resources are available.

    • No issues found!

  2. corepuncher commented on Dec 29, 2024

    @corepuncher
    Author

    As an addendum to my original post, I get these prints when app starts:

    log
    
    
    I/AdrenoVK-0(  309): Application Name    : Impeller
    I/AdrenoVK-0(  309): Application Version : 0x00400000
    I/AdrenoVK-0(  309): Engine Name         : Impeller
    I/AdrenoVK-0(  309): Engine Version      : 0x00400000
    I/AdrenoVK-0(  309): Api Version         : 0x00401000
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3b9ff250 provided to vkGetPhysicalDeviceFeatures2
    I/AdrenoVK-0(  309): Unknown struct with type 0x3ba17508 provided to vkGetPhysicalDeviceFeatures2
    I/flutter (  309): [IMPORTANT:flutter/shell/platform/android/android_context_vk_impeller.cc(60)] Using the Impeller rendering backend (Vulkan).
    
    I also get these prints when changing device orientation:
    
    I/InsetsSourceConsumer(  309): applyRequestedVisibilityToControl: visible=false, type=navigationBars, host=com.myApp.myApp/com.myApp.myApp.MainActivity
    I/InsetsSourceConsumer(  309): applyRequestedVisibilityToControl: visible=false, type=statusBars, host=com.myApp.myApp/com.myApp.myApp.MainActivity
    I/InsetsController(  309): controlAnimationUncheckedInner: Added types=statusBars navigationBars, animType=0, host=com.myApp.myApp/com.myApp.myApp.MainActivity, from=android.view.InsetsController.controlAnimationUnchecked:1480 android.view.InsetsController.applyAnimation:2040 android.view.InsetsController.applyAnimation:2003 
    E/qdgralloc(  309): GetSize: Unrecognized pixel format: 0x3b
    W/qdgralloc(  309): gralloc failed to allocate buffer for size 0 format 59 AWxAH 1x1 usage 2816
    E/Gralloc4(  309): isSupported(1, 1, 59, 1, ...) failed with 7
    E/GraphicBufferAllocator(  309): Failed to allocate (4 x 4) layerCount 1 format 59 usage b00: 7
    E/AHardwareBuffer(  309): GraphicBuffer(w=4, h=4, lc=1) failed (Unknown error -7), handle=0x0
    E/qdgralloc(  309): GetSize: Unrecognized pixel format: 0x3b
    W/qdgralloc(  309): gralloc failed to allocate buffer for size 0 format 59 AWxAH 1x1 usage 2816
    E/Gralloc4(  309): isSupported(1, 1, 59, 1, ...) failed with 7
    E/GraphicBufferAllocator(  309): Failed to allocate (4 x 4) layerCount 1 format 59 usage b00: 7
    E/AHardwareBuffer(  309): GraphicBuffer(w=4, h=4, lc=1) failed (Unknown error -7), handle=0x0
    E/Surface (  309): freeAllBuffers: 1 buffers were freed while being dequeued!
    5
    W/qdgralloc(  309): getInterlacedFlag: getMetaData returned 3, defaulting to interlaced_flag = 0
    I/InsetsController(  309): cancelAnimation: types=statusBars navigationBars, animType=0, host=com.myApp.myApp/com.myApp.myApp.MainActivity, from=android.view.InsetsController.notifyFinished:1783 android.view.InsetsAnimationControlImpl.applyChangeInsets:312 android.view.InsetsController.lambda$new$3:926 
    
    
  3. corepuncher commented on Jan 2, 2025

    @corepuncher
    Author

    Here is a related issue I filed with flutter_map. When using Impeller, the amount of unreleased GPU memory is quite a bit higher compared to SKIA:

    fleaflet/flutter_map#2006

  4. FaFre commented on Jan 2, 2025

    @FaFre

    I came here from a similar issue I experience in one of my projects. For me the issue only appears inside the emulator, where I matched the RAM options with my physical device where I can debug correctly. I also suspect this is a GPU memory issue possibly.

  5. corepuncher commented on Jan 2, 2025

    @corepuncher
    Author

    I did some more testing with my app, while keeping a close eye on output from:

    adb shell dumpsys meminfo com.myapp.myapp

    SKIA: (flutter run --debug --no-enable-impeller
    The GL mtrack memory periodically goes down during map panning/zooming, and the TOTAL memory seemed to stabilize. Typically around 2 GB GL mtrack and around 3GB TOTAL. And it's more common for these values to drop by a few hundred MB from time to time, meaning it's keeping itself from crashing and reclaiming when necessary.

    IMPELLER:
    No matter what I do, the GL mtrack and TOTAL memory ONLY go up. Nothing ever seems to get removed from the GPU and eventually, the app is killed at around 3.5 GB GL mtrack and 5.3 GB TOTAL used.

    Those two examples above are same app, same settings, same general usage/map behavior. Worlds apart.

    For example, SKIA at a stabilized level:

    ** MEMINFO in pid 27981 [com.myApp.myApp] **
                       Pss  Private  Private  SwapPss      Rss     Heap     Heap     Heap
                     Total    Dirty    Clean    Dirty    Total     Size    Alloc     Free
                    ------   ------   ------   ------   ------   ------   ------   ------
      Native Heap   249735   249676       16       46   250256   305480   288735    16744
      Dalvik Heap     8464     3416     4720       42     9464    11241     5097     6144
     Dalvik Other    11908     4056       44        1    20044
            Stack     3472     3472        0        0     3480
           Ashmem       73        0        0        0      452
          Gfx dev        0        0        0        0        4
        Other dev      474      400       24        0     1008
         .so mmap     9949      320     4384       12    34376
        .jar mmap    11977        0     5532        0    41480
        .apk mmap    47316      628    45696        0    49516
        .ttf mmap      782        0      428        0     2876
        .dex mmap       97        0       32        0      712
        .oat mmap      258        0       96        0     1336
        .art mmap    13251     8172     3876      107    24448
       Other mmap   229167   150152     3108        0   305760
       EGL mtrack    57352    57352        0        0    57352
        GL mtrack  1529560  1529560        0        0  1529560
          Unknown   794357   794100      200        4   794748
            TOTAL  2968404  2801304    68156      212  3126872   316721   293832    22888
    
     App Summary
                           Pss(KB)                        Rss(KB)
                            ------                         ------
               Java Heap:    15464                          33912
             Native Heap:   249676                         250256
                    Code:    57476                         146264
                   Stack:     3472                           3480
                Graphics:  1586912                        1586916
           Private Other:   956460
                  System:    98944
                 Unknown:                                 1106044
    
               TOTAL PSS:  2968404            TOTAL RSS:  3126872       TOTAL SWAP PSS:      212
    
     Objects
                   Views:        8         ViewRootImpl:        1
             AppContexts:       14           Activities:        1
                  Assets:       35        AssetManagers:        0
           Local Binders:       51        Proxy Binders:       53
           Parcel memory:       16         Parcel count:       63
        Death Recipients:        3             WebViews:        0
    
     SQL
             MEMORY_USED:      110
      PAGECACHE_OVERFLOW:       44          MALLOC_SIZE:       46
    
     DATABASES
          pgsz     dbsz   Lookaside(b) cache hits cache misses cache size  Dbname
    PER CONNECTION STATS
             4       56             70    33    44     6  /data/user/0/com.myApp.myApp/databases/com.google.android.datatransport.events
    POOL STATS
         cache hits  cache misses    cache size  Dbname
                 33            45            78  /data/user/0/com.myApp.myApp/databases/com.google.android.datatransport.events
    
     Asset Allocations
        : 1607K
        : 1277K
        : 17K
    
    

    Impeller right before crashing:

    ** MEMINFO in pid 27981 [com.myApp.myApp] **
                       Pss  Private  Private  SwapPss      Rss     Heap     Heap     Heap
                     Total    Dirty    Clean    Dirty    Total     Size    Alloc     Free
                    ------   ------   ------   ------   ------   ------   ------   ------
      Native Heap   107070   100892     6124   146393   107228   285064   259763    25300
      Dalvik Heap      459      144      200     3450      896    11217     5073     6144
     Dalvik Other     7217     5408      468     3233     8564
            Stack     1128      992      136     2080     1136
           Ashmem        0        0        0        0       32
          Gfx dev        0        0        0        0        4
        Other dev        8        0        8        0      376
         .so mmap     1237      100      432      247     7968
        .jar mmap      144        0        0        0     2076
        .apk mmap     6864      276     6588      156     6864
        .ttf mmap        0        0        0        0       40
        .oat mmap       12        0        0        0      320
        .art mmap     2305       12     1304     8271     7044
       Other mmap   475071   474888      180        1   475136
       EGL mtrack    57352    57352        0        0    57352
        GL mtrack  3541452  3541452        0        0  3541452
          Unknown   617252   614100     3148   295266   617328
            TOTAL  5276668  4795616    18588   459097  4833816   296281   264836    31444
    
     App Summary
                           Pss(KB)                        Rss(KB)
                            ------                         ------
               Java Heap:     1460                           7940
             Native Heap:   100892                         107228
                    Code:    12740                          25004
                   Stack:      992                           1136
                Graphics:  3598804                        3598808
           Private Other:  1099316
                  System:   462464
                 Unknown:                                 1093700
    
               TOTAL PSS:  5276668            TOTAL RSS:  4833816       TOTAL SWAP PSS:   459097
    
     Objects
                   Views:        8         ViewRootImpl:        1
             AppContexts:       14           Activities:        1
                  Assets:       35        AssetManagers:        0
           Local Binders:       51        Proxy Binders:       52
           Parcel memory:       17         Parcel count:       65
        Death Recipients:        3             WebViews:        0
    
     SQL
             MEMORY_USED:      110
      PAGECACHE_OVERFLOW:       44          MALLOC_SIZE:       46
    
     DATABASES
          pgsz     dbsz   Lookaside(b) cache hits cache misses cache size  Dbname
    PER CONNECTION STATS
             4       56             70    33   125     6  /data/user/0/com.myApp.myApp/databases/com.google.android.datatransport.events
    POOL STATS
         cache hits  cache misses    cache size  Dbname
                 33           126           159  /data/user/0/com.myApp.myApp/databases/com.google.android.datatransport.events
    
     Asset Allocations
        : 1607K
        : 1277K
        : 17K
    
  6. added
    in triage
    on Jan 3, 2025
  7. darshankawar commented on Jan 3, 2025

    @darshankawar
    Member

    @corepuncher
    Can you switch to latest master and re-run your scenario to check if it still crashes or not ?

    flutter channel master
    flutter upgrade

  8. added
    waiting for response
    on Jan 3, 2025
  9. corepuncher commented on Jan 4, 2025

    @corepuncher
    Author

    @darshankawar
    I tried the master channel.

    Summary: Not any significant change. App still crashes when GPU memory gets too high.

    I went back and forth using the same test with no impeller, then back to impeller (both on 3.271 and master).

    IN GENERAL: Running in debug with --no-enable-impeller crashed LATER in the test, meaning I was able to handle more textures.

    STRANGELY, when I would then build a release version with impeller DISABLED via AndroidManifest, it seemed to crash the same as impeller during debug.

    In other words: The debug "no impeller" version clearly seems more stable than release "no impeller".
    I've done this several times, and each time, I get the feeling that impeller is not "actually" off in release build. Or, something else is different.

    After two days of testing, I downgraded back to 3.24.5 and did the same procedure.

    RESULT: Much less crashing! Clearly so.

    Final Thoughts: My overall impression is that in flutter 3.27, GPU memory is higher than in 3.24. At any rate, the device is better able to manage GPU memory in 3.24 for Android. Some of it may be when the global imageCache gets cleared.

  10. removed
    waiting for response
    on Jan 4, 2025
  11. darshankawar commented on Jan 6, 2025

    @darshankawar
    Member

    @corepuncher Thanks for the update. Since flutter_map is third party package, does the same behavior occur while using google_maps_flutter? which is Flutter's first party package.

  12. added
    waiting for response
    on Jan 6, 2025
  13. JaffaKetchup commented on Jan 7, 2025

    @JaffaKetchup
    Contributor

    flutter_map just boils down to a bunch of RawImages in a stack with a custom ImageProvider (https://github.com/fleaflet/flutter_map/blob/master/lib%2Fsrc%2Flayer%2Ftile_layer%2Ftile_provider%2Fnetwork_image_provider.dart). The google_maps package uses platform views and native code, which is a completely different case altogether. FM proves that this occurs in native Flutter with no special business other than an ImageProvider (which is setup correctly AFAIK).

  14. corepuncher commented on Jan 8, 2025

    @corepuncher
    Author

    flutter_map just boils down to a bunch of RawImages in a stack with a custom ImageProvider (https://github.com/fleaflet/flutter_map/blob/master/lib%2Fsrc%2Flayer%2Ftile_layer%2Ftile_provider%2Fnetwork_image_provider.dart). The google_maps package uses platform views and native code, which is a completely different case altogether. FM proves that this occurs in native Flutter with no special business other than an ImageProvider (which is setup correctly AFAIK).

    As per the above message, the two methods are not really apples to apples so I do not believe I would be able to try google maps.

    But assuming flutter_map as a constant in this test, and comparing results between 3.24.5 and 3.27, I run out of memory much less frequently on 3.24.5, if at all (at least for Android).

  15. removed
    waiting for response
    on Jan 8, 2025
  16. 10 remaining items

  17. jonahwilliams commented on Jan 14, 2025

    @jonahwilliams
    Contributor

    At any rate, on an S9, an S24, and various pixels I am neither able to reproduce an OOM nor can I reproduce a memory leak on stable or master. Unless the network requests need to complete?

  18. added
    waiting for response
    on Jan 14, 2025
  19. JaffaKetchup commented on Jan 14, 2025

    @JaffaKetchup
    Contributor

    The network request needs to complete as that's where the image comes from. It's a placeholder URL as you can see.
    I can't suggest a server that I know would be OK with this stress testing (I'm not OP), and not sure exactly what he had in mind (@corepuncher ?).

  20. jonahwilliams commented on Jan 14, 2025

    @jonahwilliams
    Contributor

    okay I misunderstood. I can throw lorem picsum in there as an example

  21. jonahwilliams commented on Jan 14, 2025

    @jonahwilliams
    Contributor

    Using the following update I am still not able to trigger OOM, and I can observe that memory goes up / down as expected. As a side note this application is extremely slow on all backends (UI thread issues) such that it is difficult to interact with. A better example for stress testing would be fine. its also possible the application memory usage is stable and the OOM crash is only triggered if you have a certain set of other applications open.

    //  If Impeller is enabled on a Samsung S23 (Adreno GPU),
    // cycling the frames often can lead to GPU "Out of memory" and a native crash.
    //
    // Try running:
    //    flutter run --enable-impeller
    // Then press "Cycle Frame" multiple times. Watch logcat for GPU memory issues.
    // Alternatively, if you switch to `--enable-impeller=false`, the app won't crash.
    //
    // Adjust `numFrames` or `tileLayersPerFrame` to intensify resource usage.
    //
    // This is a simplified example. My real app loads many real tiles/overlays, up to 36 frames, etc.
    // It has always run just fine in previous flutter versions, with even more frames of data loaded.
    // Devtools "memory" remains at about 500 mb, but this is a GPU issue.
    
    import 'package:flutter/material.dart';
    import 'package:flutter_map/flutter_map.dart';
    import 'package:latlong2/latlong.dart';
    
    void main() {
      runApp(const MyImpellerBugDemo());
    }
    
    class MyImpellerBugDemo extends StatelessWidget {
      const MyImpellerBugDemo({super.key});
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'Impeller Crash Demo',
          theme: ThemeData(useMaterial3: true),
          home: const MyHomePage(),
        );
      }
    }
    
    class MyHomePage extends StatefulWidget {
      const MyHomePage({super.key});
    
      @override
      State<MyHomePage> createState() => _MyHomePageState();
    }
    
    class _MyHomePageState extends State<MyHomePage> {
      /// Suppose we have 36 frames total (like time steps).
      static const int numFrames = 36;
    
      /// Current frame index that we're displaying.
      int frameIndex = 0;
    
      /// We can add multiple tile layers each frame to simulate heavier usage.
      static const int tileLayersPerFrame = 12;
    
      /// Whether we auto-cycle frames or not.
      bool autoCycle = false;
    
      @override
      void initState() {
        super.initState();
        // Optionally start an auto-cycle
        // _startAutoCycle();
      }
    
      // Example: a quick timer to repeatedly cycle frames for stress testing.
      void _startAutoCycle() async {
        autoCycle = true;
        while (autoCycle) {
          await Future.delayed(const Duration(milliseconds: 125));
          setState(() {
            frameIndex = (frameIndex + 1) % numFrames;
          });
        }
      }
    
      // Build a list of "TileLayer" widgets for the current frame.
      List<Widget> buildTileLayers(int currentFrame) {
        List<Widget> layers = [];
        for (int i = 0; i < tileLayersPerFrame; i++) {
          /// Fake tile URL with a query param to show different text or image each frame
          final tileUrl = 'https://picsum.photos/100/100?random=${currentFrame}';
    
          layers.add(
            // Each frame has an Opacity that is 1.0 if it's the active frame,
            //  or 0.0 otherwise. Imagine we keep all frames in the widget tree at once.
            Opacity(
              opacity: (currentFrame == frameIndex) ? 1.0 : 0.0,
              // Use flutter_map's TileLayer or even an Image.network(...) for demonstration
              child: TileLayer(
                // Typically you'd do: urlTemplate: 'https://myserver.com/{z}/{x}/{y}.png'
                // But for the minimal sample we just supply the placeholder image:
                urlTemplate: tileUrl,
                userAgentPackageName: 'impeller.crash.demo',
    
                // TMS or standard - doesn't matter here, we won't truly see map tiles,
                // but we simulate large texture usage.
                tms: false,
                // Freed if an error, just in case:
                evictErrorTileStrategy: EvictErrorTileStrategy.dispose,
                tileBounds: LatLngBounds(const LatLng(-85, -180), const LatLng(85, 180)),
              ),
            ),
          );
        }
        return layers;
      }
    
      @override
      Widget build(BuildContext context) {
        // We create a flutter_map with 36 frames worth of tile layers,
        // each layer is fully or zero opacity depending on the frameIndex.
        List<Widget> allFramesLayers = [];
        for (int f = 0; f < numFrames; f++) {
          allFramesLayers.addAll(buildTileLayers(f));
        }
    
        return Scaffold(
          appBar: AppBar(
            title: const Text('Impeller Crash Demo'),
          ),
          body: FlutterMap(
            options: MapOptions(
              initialCenter: const LatLng(0, 0),
              minZoom: 7.0,
              maxZoom: 12,
            ),
            children: allFramesLayers,
          ),
          floatingActionButton: FloatingActionButton(
            onPressed: () {
              setState(() {
                frameIndex = (frameIndex + 1) % numFrames;
              });
            },
            child: const Text('Cycle Frame'),
          ),
        );
      }
    }
    
    
  22. added
    P3
    and removed
    P2
    on Jan 14, 2025
  23. corepuncher commented on Jan 18, 2025

    @corepuncher
    Author

    @jonahwilliams Thank you for taking a look, sorry about the less than optimal code example.

    I think the key point is what I said earlier:

    After two days of testing, I downgraded back to 3.24.5 and did the same tests.
    RESULT: Much less crashing! Clearly so.

    Basically just use a map tile display package (flutter_map, google, etc), and load about 5 different map layers at the same time, some transparent, then rapidly pan and zoom around and watch the GPU memory consumption rise as images are cached.

    • On an Android device using 3.24.5 / skia, you will see GL mtrack go up AND down
    • But when using 3.27.1 with impeller, usage only goes UP, eventually exhausting it.

    At any rate, please be on the lookout for memory release logic issues with the new version of flutter, when run on Android S23. Thanks.

  24. removed
    waiting for response
    on Jan 18, 2025
  25. jonahwilliams commented on Jan 24, 2025

    @jonahwilliams
    Contributor

    Okay. I understanding you've reproduced these problems yourself but we are all having problems because of the quality of the app you've provided. If you want to file a new bug with a better repro, feel free to. Otherwise I'm closing this as infeasible

  26. added
    r: invalid
    needs repro info
    on Jan 28, 2025
  27. github-actions commented on Feb 11, 2025

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

  28. locked as resolved and limited conversation to collaborators on Feb 11, 2025
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

    P3e: impellerengineneeds repro infoplatform-androidr: invalidteam-enginetriaged-engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions