Repository: flutter
Issue: App crashes often in Emulator while Hot Reload, occurs mainly when new variable declared
Labels: c: crash,platform-android,engine,dependency: dart,P2,team-android,triaged-android

Occurs mainly when new variable declared and used in UI but sometimes crashes on some other changes too.
I checked its not NullException. I checked issue #15196 and #31274 answer not found.

```bash
Performing hot reload...
Syncing files to device AOSP on IA Emulator...
W/Thread-8( 9575): type=1400 audit(0.0:37): avc: denied { search } for name="power_supply" dev="sysfs" ino=11715 scontext=u:r:untrusted_app:s0:c87,c256,c512,c768 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=0
F/libc    ( 9575): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x41017 in tid 9622 (Thread-8), pid 9575 (.am_flutter_app)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.117/5875966:user/release-keys'
Revision: '0'
ABI: 'x86'
pid: 9575, tid: 9622, name: Thread-8  >>> com.example.am_flutter_app <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x41017
    eax b50e08c5  ebx c81eef94  ecx 00041018  edx c81a5164
    edi dd8a674c  esi c4357400
    ebp c670a838  esp c670a810  eip c7d246da
backtrace:
    #00 pc 016186da  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #01 pc 01698d98  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #02 pc 01697685  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #03 pc 01691d7d  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #04 pc 0178bf7e  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #05 pc 017848f3  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #06 pc 01784f21  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #07 pc 0168ee0c  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #08 pc 016b690c  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #09 pc 016b6eee  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #10 pc 017a8958  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #11 pc 0177cb3a  /data/app/com.example.am_flutter_app-5mcQ-xDkdJX_8DYG4-YZvQ==/lib/x86/libflutter.so (offset 0x1190000)
    #12 pc 00000639  <anonymous:c5600000>
Lost connection to device.

```

### Emulator Details

```console
Name: Pixel_2_API_28
CPU/ABI: Google Play Intel Atom (x86)
Path: C:\Users\NAVOKI\.android\avd\Pixel_2_API_28.avd
Target: google_apis_playstore [Google Play] (API level 28)
Skin: pixel_2
SD Card: 512M
fastboot.chosenSnapshotFile: 
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: pixel_2
hw.lcd.width: 1080
hw.initialOrientation: Portrait
image.androidVersion.api: 28
tag.id: google_apis_playstore
hw.mainKeys: no
hw.camera.front: emulated
avd.ini.displayname: Pixel 2 API 28
hw.gpu.mode: auto
hw.ramSize: 1536
PlayStore.enabled: true
fastboot.forceColdBoot: yes
hw.cpu.ncore: 4
hw.keyboard: yes
hw.sensors.proximity: yes
hw.dPad: no
hw.lcd.height: 1920
vm.heapSize: 256
skin.dynamic: yes
hw.device.manufacturer: Google
hw.gps: yes
hw.audioInput: yes
image.sysdir.1: system-images\android-28\google_apis_playstore\x86\
showDeviceFrame: yes
hw.camera.back: virtualscene
AvdId: Pixel_2_API_28
hw.lcd.density: 420
hw.arc: false
hw.device.hash2: MD5:55acbc835978f326788ed66a5cd4c9a7
fastboot.forceChosenSnapshotBoot: no
fastboot.forceFastBoot: no
hw.trackBall: no
hw.battery: yes
hw.sdCard: yes
tag.display: Google Play
runtime.network.latency: none
disk.dataPartition.size: 6442450944
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes
```

flutter doctor -v
```console
C:\Users\NAVOKI>flutter doctor -v
[√] Flutter (Channel master, v1.15.4-pre.139, on Microsoft Windows [Version 10.0.18363.657], locale en-IN)
    • Flutter version 1.15.4-pre.139 at C:\Users\NAVOKI\flutter
    • Framework revision 4df8fdb7df (2 days ago), 2020-02-22 18:24:03 -0800
    • Engine revision f2f8c342be
    • Dart version 2.8.0 (build 2.8.0-dev.9.0 0f141be8bd)


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\NAVOKI\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.4.5)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.4.29806.167

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 43.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] IntelliJ IDEA Community Edition (version 2019.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.2.4
    • Flutter plugin version 42.2.2
    • Dart plugin version 192.7761

[√] Connected device (4 available)
    • AOSP on IA Emulator • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
    • Windows             • Windows       • windows-x64    • Microsoft Windows [Version 10.0.18363.657]
    • Chrome              • chrome        • web-javascript • Google Chrome 80.0.3987.116
    • Web Server          • web-server    • web-javascript • Flutter Tools

• No issues found!
```