Skip to content

[Impeller] Null pointer dereference crash in raster thread #165119

@LennoxGong

Description

@LennoxGong

Steps to reproduce

There is no stable reproducible path. Application crashed while running.

Expected results

No FC No ANR

Actual results

Null pointer crash in raster thread

Code sample

Code sample
import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';


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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      body: Padding(
        padding: const EdgeInsets.all(8.0),
        child: GridView.builder(
          itemCount: _lottieFiles.length,
          gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
            crossAxisCount: 3, 
            crossAxisSpacing: 8.0,
            mainAxisSpacing: 8.0,
          ),
          itemBuilder: (context, index) => LottieItem(assetName: _lottieFiles[index]),
        ),
      ),
    );
  }
}


class LottieItem extends StatelessWidget {
  final String assetName;

  const LottieItem({super.key, required this.assetName});

  @override
  Widget build(BuildContext context) {
    return Card(
      elevation: 4.0,
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(12.0),
      ),
      child: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Lottie.asset(
          assetName,
          repeat: true,
          fit: BoxFit.contain,
          frameRate: FrameRate.max,
          errorBuilder: (context, error, stackTrace) => const Icon(
            Icons.error,
            color: Colors.red,
            size: 50.0,
          ),
        ),
      ),
    );
  }
}

/// Resource List
const List<String> _lottieFiles = [
  'assets/Mobilo/A.json',
  'assets/Mobilo/B.json',
  'assets/Mobilo/C.json',
  'assets/Mobilo/D.json',
  'assets/Mobilo/E.json',
  'assets/Mobilo/F.json',
  'assets/Mobilo/G.json',
  'assets/Mobilo/H.json',
  'assets/Mobilo/I.json',
  'assets/Mobilo/J.json',
  'assets/Mobilo/K.json',
  'assets/Mobilo/L.json',
  'assets/Mobilo/M.json',
  'assets/Mobilo/N.json',
  'assets/Mobilo/O.json',
  'assets/Mobilo/P.json',
  'assets/Mobilo/Q.json',
  'assets/Mobilo/R.json',
  'assets/Mobilo/S.json',
  'assets/Mobilo/T.json',
  'assets/Mobilo/U.json',
  'assets/Mobilo/V.json',
  'assets/Mobilo/W.json',
  'assets/Mobilo/X.json',
  'assets/Mobilo/Y.json',
  'assets/Mobilo/Z.json',
  'assets/Mobilo/Apostrophe.json',
  'assets/Mobilo/Colon.json',
  'assets/Mobilo/Comma.json',
  'assets/Mobilo/BlinkingCursor.json',
  'assets/Mobilo/yoga_carpet.json',
  'assets/Mobilo/books.json',
  'assets/Mobilo/bitcoin_to_the_moon.json',
  'assets/Mobilo/powerupp_app_onboard.json',
  'assets/Mobilo/loading_copy.json',
];

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
 libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 15258 (1.raster), pid 12049 (flutter_example)
 DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 DEBUG   : Build fingerprint: 'Xiaomi/haotian/haotian:15/AQ3A.240812.002/OS2.0.108.0.VOBCNXM:user/release-keys'
 DEBUG   : Revision: '0'
 DEBUG   : ABI: 'arm64'
 DEBUG   : Timestamp: 2025-03-13 19:23:08.570458275+0800
 DEBUG   : Process uptime: 384s
 DEBUG   : Cmdline: com.example.flutter_example
 DEBUG   : pid: 12049, tid: 15258, name: 1.raster  >>> com.example.flutter_example <<<
 DEBUG   : uid: 10404
 DEBUG   : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
 DEBUG   : pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
 DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
 DEBUG   : Cause: null pointer dereference
 DEBUG   :     x0  0000000000000000  x1  0000000000000000  x2  0000000000000000  x3  0000000000000000
 DEBUG   :     x4  0000000000000010  x5  00000000003bbe26  x6  71647164636d6471  x7  0000000000000000
 DEBUG   :     x8  0000000000000000  x9  0000007d0f3f4000  x10 0000000000000003  x11 0000000000060006
 DEBUG   :     x12 00000079ed1a24f0  x13 00000000000000b1  x14 00000079ed1a25a0  x15 00000042e07325ef
 DEBUG   :     x16 00000079e6386c00  x17 0000007d0f3494a0  x18 00000079de270000  x19 00000079ed1a3f90
 DEBUG   :     x20 00000079ed1a43e0  x21 0000000000000000  x22 00000079ed1a3c10  x23 0000000000000006
 DEBUG   :     x24 00000079ed1a4350  x25 b400007ababfb2a8  x26 0000000000000000  x27 00000079ed1a5a80
 DEBUG   :     x28 0000000000000000  x29 b400007c2ab23b30
 DEBUG   :     lr  00000079e5fdb09c  sp  00000079ed1a3ab0  pc  00000079e62cc26c  pst 0000000040001000
 DEBUG   : 27 total frames
 DEBUG   : backtrace:
 DEBUG   :       #00 pc 0000000000e6d26c  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #01 pc 0000000000b7c098  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #02 pc 0000000000b7b9c4  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #03 pc 0000000000b7e164  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #04 pc 00000000008f08e0  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #05 pc 0000000000b8135c  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #06 pc 00000000008f0cc4  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #07 pc 00000000008f08e0  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #08 pc 00000000008f10a4  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #09 pc 0000000000b83b9c  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #10 pc 0000000000c6681c  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #11 pc 0000000000b1c784  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #12 pc 0000000000be8c7c  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #13 pc 0000000000be8620  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #14 pc 0000000000be9b10  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #15 pc 0000000000be9614  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #16 pc 0000000000bf7978  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #17 pc 00000000008a11c0  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #18 pc 00000000008a4dd4  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #19 pc 0000000000014094  /system/lib64/libutils.so (android::Looper::pollInner(int)+1232) (BuildId: d7ed03e879117ff480fc16379edd7de0)
 DEBUG   :       #20 pc 0000000000013b60  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+124) (BuildId: d7ed03e879117ff480fc16379edd7de0)
 DEBUG   :       #21 pc 000000000001f560  /system/lib64/libandroid.so (ALooper_pollOnce+104) (BuildId: 5be46694a25e10fc564dce2da56e89f4)
 DEBUG   :       #22 pc 00000000008a4ee0  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #23 pc 00000000008a3014  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #24 pc 00000000008a2e48  /data/app/~~7JaUpJ_V3gdMRiiK_E2Tkw==/com.example.flutter_example-xh4F4Vp9HKzFjLrvPZ0wqg==/lib/arm64/libflutter.so (BuildId: b60bb021e149d74d22acc0a2ff635ec6d7d776ba)
 DEBUG   :       #25 pc 0000000000071fd4  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+196) (BuildId: 0c3d9b35fadf597551b6670ef6dcf565)
 DEBUG   :       #26 pc 00000000000640f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 0c3d9b35fadf597551b6670ef6dcf565)

Flutter Doctor output

Doctor output
[!] Flutter (Channel [user-branch], 3.29.0, on Ubuntu 24.04.2 LTS
    6.11.0-19-generic, locale zh_CN.UTF-8) [270ms]
    ! Flutter version 3.29.0 on channel [user-branch] at
      /home/mi/workspace/devkit/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an
      official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions
      at https://flutter.dev/setup.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss
      this error.
    • Framework revision 35c388afb5 (4 周前), 2025-02-10 12:48:41 -0800
    • Engine revision 010c8a806b
    • Dart version 3.7.0 (build 3.7.0-323.0.dev)
    • DevTools version 2.42.0
    • If those were intentional, you can disregard the above warnings; however
      it is recommended to use "git" directly to perform update checks and
      upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [5.1s]
    • Android SDK at /home/mi/Android/Sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /home/mi/Android/Sdk
    • Java binary at: /home/mi/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [112ms]
    • Chrome at google-chrome

[✗] Linux toolchain - develop for Linux desktop [638ms]
    • Ubuntu clang version 18.1.3 (1ubuntu1)
    • cmake version 3.31.6
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
    • pkg-config version 1.8.1
    ✗ GTK 3.0 development libraries are required for Linux development.
      They are likely available from your distribution (e.g.: apt install libgtk-3-dev)

[✓] Android Studio (version 2024.2) [109ms]
    • Android Studio at /home/mi/.local/share/JetBrains/Toolbox/apps/android-studio
    • Flutter plugin version 81.1.3
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.3) [16ms]
    • IntelliJ at /home/mi/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate
    • 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

[✓] VS Code (version 1.98.1) [16ms]
    • VS Code at /usr/share/code
    • Flutter extension version 3.106.0

[!] Proxy Configuration [53ms]
    • HTTP_PROXY is set
    • NO_PROXY is localhost,127.0.0.0/8,::1
    • NO_PROXY contains localhost
    ! NO_PROXY does not contain 127.0.0.1
    • NO_PROXY contains ::1

[✓] Connected device (3 available) [425ms]
    • 2410DPN6CC (mobile) • 3df54007 • android-arm64  • Android 15 (API 35)
    • Linux (desktop)     • linux    • linux-x64      • Ubuntu 24.04.2 LTS 6.11.0-19-generic
    • Chrome (web)        • chrome   • web-javascript • Google Chrome 134.0.6998.88

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

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: crashStack traces logged to the consolee: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions