Repository: flutter
Issue: SIGSEGV Fatal Signal 11 in DartVM (Null Pointer Dereference)
Labels: waiting for customer response,in triage

**Description:**

I'm encountering a fatal crash (SIGSEGV) in my Flutter application due to a null pointer dereference within the DartVM. The crash occurs during a hot reload after making changes to a file related to order payment processing.

**Steps to Reproduce:**
1.  Run the Flutter application on an Android emulator (sdk_gphone64_arm64) or physical device.
4.  Initiate a multiple hot reloads.
5.  The application crashes with the SIGSEGV error.


### Expected results

App should not crash randomly because of doing a hot-reload.

### Actual results

App should is crash randomly because of doing a hot-reload in debug mode. There is not much information about what exactly is causing this issue.

### Code sample

No reproducible steps found yet.

### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

```
[+2963 ms] Skipping target: gen_localizations
[        ] Skipping target: gen_dart_plugin_registrant
[        ] Skipping target: _composite
[        ] complete
[  +78 ms] Scanned through 2011 files in 54ms
[   +1 ms] Compiling dart to kernel with 1 updated files
[        ] Processing bundle.
[        ] <- recompile package:app/main.dart d812b473-2083-4f7c-b566-2293279dcef5
[        ] package:app/view_binder.dart
[        ] <- d812b473-2083-4f7c-b566-2293279dcef5
[   +5 ms] Bundle processing done.
[+1712 ms] Updating files.
[        ] Pending asset builds completed. Writing dirty entries.
[ +237 ms] DevFS: Sync finished
[        ] Synced 12.2MB.
[+1186 ms] E/DartVM  (  624): become: Cannot forward to multiple targets
[        ] E/DartVM  (  624): before: 7813544831
[        ] E/DartVM  (  624): after: 7815e2d491
[        ] E/DartVM  (  624): before header: 3236
[        ] E/DartVM  (  624): after header: 104c236
[        ] F/libc    (  624): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2b8 in tid 985 (DartWorker), pid 624 (taurant.pos.uat)
[ +705 ms] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[        ] Build fingerprint: 'google/sdk_gphone64_arm64/emu64a:14/UPB5.230623.003/10615560:userdebug/dev-keys'
[        ] Revision: '0'
[        ] ABI: 'arm64'
[        ] Timestamp: 2024-11-26 15:29:25.776258813+0530
[        ] Process uptime: 207s
[        ] Cmdline: ###################
[        ] pid: 624, tid: 985, name: DartWorker  >>> ################### <<<
[        ] uid: 10189
[        ] 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 0x00000000000002b8
[        ] Cause: null pointer dereference
[        ]     x0  b400007b8017cda0  x1  0000007815e2d491  x2  0000000000000004  x3  0000000000000003
[        ]     x4  00000079c34f9070  x5  0000000000714f90  x6  0000000000000010  x7  7f7f7f7f7f7f7f7f
[        ]     x8  0000000000000000  x9  0000007a08785790  x10 b400007b8017cda0  x11 0000000000000001
[        ]     x12 00000079c34f91a0  x13 0000000000000017  x14 00000079c34f9250  x15 000019b028ecf368
[        ]     x16 0000007a08763ff0  x17 0000007d3b72e280  x18 00000079c24d8000  x19 0000007a06365b4e
[        ]     x20 b400007b8017cdb0  x21 b400007b8017cda0  x22 0000007815e2d491  x23 0000007813544831
[        ]     x24 0000007813544830  x25 0000000000002574  x26 0000007a086eeb58  x27 0000007a086eef98
[        ]     x28 0000007a08785000  x29 0000000000000000
[        ]     lr  0000007a084b4e3c  sp  00000079c34fa950  pc  0000007a084b4e48  pst 0000000020001000
[        ] 16 total frames
[        ] backtrace:
[        ]       #00 pc 0000000002353e48  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #01 pc 0000000002353da4  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #02 pc 00000000022291ec  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #03 pc 00000000022254b0  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #04 pc 000000000221ebf0  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #05 pc 00000000023183f0  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #06 pc 000000000230ef68  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #07 pc 000000000230f458  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #08 pc 000000000221cdbc  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #09 pc 00000000022408e8  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #10 pc 0000000002240d48  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #11 pc 000000000233781c  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #12 pc 0000000002337a6c  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #13 pc 00000000022ca1fc  /data/app/~~ts6acVdx08zbNGTVPAOatA==/###################-ueS568_-88gSl5IxHOpDXQ==/base.apk!libflutter.so (offset 0xa0a8000) (BuildId: 78551bb34007bb924e8d0a744b490d6df4d1e038)
[        ]       #14 pc 00000000000be6a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: c74277f481a383c87215b672f6465e24)
[        ]       #15 pc 000000000005b21c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: c74277f481a383c87215b672f6465e24)
[ +152 ms] Service protocol connection closed.
[        ] Lost connection to device.
[        ] DevFS: Deleting filesystem on the device (file:///data/user/0/###################/code_cache/EXAMPLE_APPWDXONW/EXAMPLE_APP/)
[        ] DevFS: Deleted filesystem on the device (file:///data/user/0/###################/code_cache/EXAMPLE_APPWDXONW/EXAMPLE_APP/)
[   +5 ms] "flutter run" took 2,33,939ms.
[ +120 ms] ensureAnalyticsSent: 95ms
[        ] Running 2 shutdown hooks
[  +15 ms] Shutdown hooks complete
[  +99 ms] exiting with code 0

Exited.
```

### Flutter Doctor output

**Flutter Doctor Output:**

```
[✓] Flutter (Channel stable, 3.24.5, on macOS 15.0.1 24A348 darwin-arm64, locale en-IN)
    • Flutter version 3.24.5 on channel stable at /Users/development/flutter_v3.24.4
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dec2ee5c1f (13 days ago), 2024-11-13 11:13:06 -0800
    • Engine revision a18df97ca5
    • Dart version 3.5.4
    • DevTools version 2.37.3

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/macos-android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • 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 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.95.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.100.0

[✓] Connected device (4 available)
    • D3 PRO (mobile)                 • adb-DP02P45Q10201-ecYAkE._adb-tls-connect._tcp. • android-arm64  • Android 13 (API 33)
    • sdk gphone64 arm64 (mobile)     • emulator-5554                                   • android-arm64  • Android 14 (API 34) (emulator)
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                           • darwin         • macOS 15.0.1 24A348 darwin-arm64
    • Chrome (web)                    • chrome                                          • web-javascript • Google Chrome 131.0.6778.86
    ! Error: Browsing on the local area network for 401E iPhone14. 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.
```

**Device Information:**

*   Device: Android 13, Android Emulator
*   OS Version: Mac os sequoia 15.0.1 (24A348)
*   Flutter Version: 3.24.5

**Additional Notes:**

*   The crash occurs consistently after modifying any file and performing a hot reload.
*   I have tested on android 13 & 14 and observed the same behavior.

**Please let me know if you require any further information to investigate this issue.**