Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
P3Issues that are less important to the Flutter projecte: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.needs repro infoAutomated crash report whose cause isn't yet knownplatform-androidAndroid applications specificallyr: invalidIssue is closed as not validteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team
Description
Steps to reproduce
- Device/OS: Samsung Galaxy S23, Android 14 (One UI-based).
- Impeller: Enabled by default in Flutter debug mode.
- 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.
- Run flutter run (with Impeller on) in debug mode.
- Interact with the app (panning the map, loading large or multiple overlays).
- 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!Reacted by Adil Hanney, mityax, corepuncher and Mehmet Filiz
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projecte: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.needs repro infoAutomated crash report whose cause isn't yet knownplatform-androidAndroid applications specificallyr: invalidIssue is closed as not validteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team
Activity
adil192 commentedon Dec 28, 2024
I'm experiencing a similar issue on my Samsung S24 Ultra, thought I'd share logs here if they're useful
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!
corepuncher commentedon Dec 29, 2024
As an addendum to my original post, I get these prints when app starts:
log
corepuncher commentedon Jan 2, 2025
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
FaFre commentedon Jan 2, 2025
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.
corepuncher commentedon Jan 2, 2025
I did some more testing with my app, while keeping a close eye on output from:
adb shell dumpsys meminfo com.myapp.myappSKIA: (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:
Impeller right before crashing:
darshankawar commentedon Jan 3, 2025
@corepuncher
Can you switch to latest master and re-run your scenario to check if it still crashes or not ?
flutter channel masterflutter upgradecorepuncher commentedon Jan 4, 2025
@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.
darshankawar commentedon Jan 6, 2025
@corepuncher Thanks for the update. Since
flutter_mapis third party package, does the same behavior occur while usinggoogle_maps_flutter? which is Flutter's first party package.JaffaKetchup commentedon Jan 7, 2025
flutter_map just boils down to a bunch of
RawImages in a stack with a customImageProvider(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 anImageProvider(which is setup correctly AFAIK).corepuncher commentedon Jan 8, 2025
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).
10 remaining items
jonahwilliams commentedon Jan 14, 2025
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?
JaffaKetchup commentedon Jan 14, 2025
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 ?).
jonahwilliams commentedon Jan 14, 2025
okay I misunderstood. I can throw lorem picsum in there as an example
jonahwilliams commentedon Jan 14, 2025
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.
corepuncher commentedon Jan 18, 2025
@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.
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.
jonahwilliams commentedon Jan 24, 2025
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
github-actions commentedon Feb 11, 2025
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 -vand a minimal reproduction of the issue.