Repository: flutter
Issue: SIGABRT Abort message: '[FATAL:flutter/shell/platform/android/image_external_texture_gl.cc(90)] Check failed: display != EGL_NO_DISPLAY. '
Labels: c: crash,platform-android,engine,P2,needs repro info,team-engine,triaged-engine

### Steps to reproduce

Sometimes during close app I got SIGABRT and app crashes

### Expected results

close app without crash

### Actual results

Sometimes during close app I got SIGABRT and app crashes

### Code sample

<details open><summary>Code sample</summary>

```dart
[Paste your code here]
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

```
05-29 15:24:26.707 29426 29426 F DEBUG   : pid: 28735, tid: 28842, name: 1.raster  >>> pl.myapp <<<
05-29 15:24:26.707 29426 29426 F DEBUG   : uid: 10369
05-29 15:24:26.707 29426 29426 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
05-29 15:24:26.707 29426 29426 F DEBUG   : Abort message: '[FATAL:flutter/shell/platform/android/image_external_texture_gl.cc(90)] Check failed: display != EGL_NO_DISPLAY. '
05-29 15:24:26.707 29426 29426 F DEBUG   :     x0  0000000000000000  x1  00000000000070aa  x2  0000000000000006  x3  00000071fd052cd0
05-29 15:24:26.707 29426 29426 F DEBUG   :     x4  00000075d9d88000  x5  00000075d9d88000  x6  00000075d9d88000  x7  00000000009c54ea
05-29 15:24:26.707 29426 29426 F DEBUG   :     x8  00000000000000f0  x9  00000075b0167b68  x10 0000000000000001  x11 00000075b01a613c
05-29 15:24:26.707 29426 29426 F DEBUG   :     x12 00000000000005b8  x13 0000000000000073  x14 0000000000000000  x15 000052cb2988da46
05-29 15:24:26.707 29426 29426 F DEBUG   :     x16 00000075b020ad60  x17 00000075b01e8060  x18 00000071fc312000  x19 000000000000703f
05-29 15:24:26.707 29426 29426 F DEBUG   :     x20 00000000000070aa  x21 00000000ffffffff  x22 00000071fd053100  x23 0000000000000001
05-29 15:24:26.707 29426 29426 F DEBUG   :     x24 0000703f00000016  x25 0000000000000000  x26 00000073612ba190  x27 0000137b7e1f1f42
05-29 15:24:26.707 29426 29426 F DEBUG   :     x28 0000000000000033  x29 00000071fd052d50
05-29 15:24:26.707 29426 29426 F DEBUG   :     lr  00000075b0197cbc  sp  00000071fd052cb0  pc  00000075b0197ce8  pst 0000000000001000
05-29 15:24:26.707 29426 29426 F DEBUG   : backtrace:
05-29 15:24:26.707 29426 29426 F DEBUG   :       #00 pc 0000000000051ce8  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 39de735713a979219b391e7611970823)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #01 pc 0000000000446804  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #02 pc 0000000000473fd4  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #03 pc 0000000000458d74  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #04 pc 00000000004589c8  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #05 pc 00000000006de4d8  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #06 pc 00000000006d9a44  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #07 pc 00000000006de718  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #08 pc 00000000006d9a44  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #09 pc 00000000006d91f0  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #10 pc 00000000006d9a44  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #11 pc 00000000006de718  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #12 pc 00000000006d9a44  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #13 pc 00000000006de718  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #14 pc 00000000006d9a44  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #15 pc 00000000006de718  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #16 pc 00000000006d9a44  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #17 pc 00000000006dd498  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #18 pc 00000000007c7898  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #19 pc 0000000000474bf4  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #20 pc 0000000000478784  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #21 pc 00000000000177ac  /system/lib64/libutils.so (android::Looper::pollInner(int)+1060) (BuildId: a5ca39eaeeeb017be4afa358811e69fb)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #22 pc 0000000000017328  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: a5ca39eaeeeb017be4afa358811e69fb)
05-29 15:24:26.707 29426 29426 F DEBUG   :       #23 pc 000000000001813c  /system/lib64/libandroid.so (ALooper_pollOnce+100) (BuildId: eefbecc0a84037bb57e1eaa290a71334)
05-29 15:24:26.708 29426 29426 F DEBUG   :       #24 pc 0000000000478890  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.708 29426 29426 F DEBUG   :       #25 pc 0000000000476938  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.708 29426 29426 F DEBUG   :       #26 pc 000000000047672c  /data/app/~~itU_pYY0iOpoZ1ET84PktA==/pl.myapp-uq2f45xRtdYioegJ_s6K9g==/base.apk!libflutter.so (BuildId: 3b363e6ebb9a868301a94aa52eb28f35b3e38a20)
05-29 15:24:26.708 29426 29426 F DEBUG   :       #27 pc 00000000000b67a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 39de735713a979219b391e7611970823)
05-29 15:24:26.708 29426 29426 F DEBUG   :       #28 pc 000000000005340c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 39de735713a979219b391e7611970823)
```



### Flutter Doctor output

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.0, on Ubuntu 22.04.4 LTS 6.5.0-35-generic, locale pl_PL.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2023.3)
[✓] Connected device (3 available)
[✓] Network resources