Repository navigation
Flutter 3.27.x | Android 10, 11 | Crash: "drawRenderNode called on a context with no surface!" #162147
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appsc: crashStack traces logged to the consoleStack traces logged to the consolee: OS-version specificAffects only some versions of the relevant operating systemAffects only some versions of the relevant operating systemplatform-androidAndroid applications specificallyAndroid applications specificallyslimpellerEngine binary size reduction. go/slimpellerEngine binary size reduction. go/slimpellerteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
Steps to reproduce
Issue Summary:
Our app uses multiple screens with WebView (flutter_inappwebview). After upgrading Flutter from version 3.24.4 to 3.27.1 to address this issue on iOS 18.2, we started receiving a large number of crash reports on Android.
Steps to Reproduce:
- Open and close multiple WebView screens (approximately 5–10 screens).
- Open another WebView screen. While it attempts to render, press the Home button to minimize the app.
- Reopen the app from the background right after that.
- Observed Behavior: The app shows a black screen, ANR logs, and then crashes.
Additional Notes:
1. Impeller Disabled:
Due to this issue, Impeller is disabled on Android:
<meta-data
android:name="io.flutter.embedding.android.EnableImpeller"
android:value="false" />2. Crash Details:
- Crashes occur 100% of the time on devices running Android 10 and 11.
- Tested builds:
- Flutter 3.24.4 & 3.24.5: No crashes observed on a Nokia 8.1 (Android 11).
- Flutter 3.27.1 & 3.27.3: Crashes consistently occur on the same device (Nokia 8.1, Android 11).
Expected results
Android app should not be crashed
Actual results
App crashes
Code sample
Code sample
[Paste your code here]Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
Android 11:
drawRenderNode called on a context with no surface!
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 30834 >>> my.app.package <<<
backtrace:
#00 pc 0x000000000004e40c /apex/com.android.runtime/lib64/bionic/libc.so (abort+164)
#01 pc 0x000000000055d00c /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+2308)
#02 pc 0x0000000000013978 /system/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76)
#03 pc 0x0000000000006e18 /system/lib64/liblog.so (__android_log_assert+336)
#04 pc 0x0000000000215014 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::SkiaOpenGLPipeline::getFrame()+52)
#05 pc 0x000000000021df14 /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+188)
#06 pc 0x0000000000220608 /system/lib64/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+508)
#07 pc 0x000000000020ed94 /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+220)
#08 pc 0x000000000023007c /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+88)
#09 pc 0x00000000000154cc /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+260)
#10 pc 0x0000000000014d90 /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412)
#11 pc 0x00000000000b0048 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#12 pc 0x00000000000503c8 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)Android 10:
drawRenderNode called on a context with no surface!
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 24468 >>> my.app.package <<<
backtrace:
#00 pc 0x00000000000830f0 /apex/com.android.runtime/lib64/bionic/libc.so (abort+160)
#01 pc 0x0000000000008a14 /system/lib64/liblog.so (__android_log_assert+328)
#02 pc 0x00000000002c6dd0 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::SkiaOpenGLPipeline::getFrame()+48)
#03 pc 0x00000000002d3a00 /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+236)
#04 pc 0x00000000002d2cc0 /system/lib64/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+380)
#05 pc 0x00000000002de238 /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+228)
#06 pc 0x00000000002ddf20 /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+588)
#07 pc 0x0000000000013654 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328)
#08 pc 0x00000000000e68a0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
#09 pc 0x0000000000084b6c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)Full ARN aborting log:
See attachment
Flutter Doctor output
Doctor output
[Paste your output here]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appsc: crashStack traces logged to the consoleStack traces logged to the consolee: OS-version specificAffects only some versions of the relevant operating systemAffects only some versions of the relevant operating systemplatform-androidAndroid applications specificallyAndroid applications specificallyslimpellerEngine binary size reduction. go/slimpellerEngine binary size reduction. go/slimpellerteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Type
Projects
- StatusShow more project fieldsDone


Activity
[-]Android 10, 11 crash "drawRenderNode called on a context with no surface!"[/-][+]Flutter 3.27.x | Android 10, 11 | Crash: "drawRenderNode called on a context with no surface!"[/+]alihassan143 commentedon Jan 24, 2025
alihassan143 commentedon Jan 24, 2025
Crahes are occuring on playstore when using platform view related plugins
darshankawar commentedon Jan 24, 2025
@namnh-0652 This is third party package. Does the same behavior occur using webview_flutter ? If so, can you provide us minimal code sample ? Does it only occur on Android 10 and 11 versions or in latest versions as well ?
namnh-0652 commentedon Jan 24, 2025
@darshankawar There are some crashes on other Android versions, but the console shows that nearly 100% of crashes occur on Android 10 and 11 (details are provided in the logs above). I don’t believe
flutter_inappwebviewis the cause, as we could not reproduce the issue on Flutter 3.24.x with the sameflutter_inappwebviewversion.The crash reports started and have increased since the day we published the release build using Flutter 3.27.1.
alihassan143 commentedon Jan 24, 2025
centy commentedon Jan 25, 2025
KaarelKelk commentedon Jan 27, 2025
Seeing the very same issue after upgrading from 3.24 to 3.27.2. I am using
webview_flutter(v4.8.0).darshankawar commentedon Jan 28, 2025
I tried to follow the steps to replicate on S10+ device running Android 11 but was unable to replicate the reported crash.
Since the crash throws
drawRenderNode called on a context with no surface!, it looks similar to a fixed issue #112254 in 3.22.I also tried to replicate per the repo given in the linked issue but was unable to see the crash.
Based on the report and crashes received, I'll keep the issue open for team's attention / tracking.
138 remaining items
TheSourabhaSahu commentedon Aug 20, 2025
But downgrade to what level? 3.24? Isn't that too old?
gaaclarke commentedon Aug 20, 2025
Move to Impeller? The option to opt out is being deprecated anyways.
TheSourabhaSahu commentedon Aug 20, 2025
So, using flutter version 3.32.6 and using impeller would solve the issue? Also, impeller is on by default right?
Also, for me, whenever I turned off impeller, my crash rates decreased significantly
gaaclarke commentedon Aug 20, 2025
Yes, the bug only happens when impeller is turned off and the ability to turn it off is disappearing. Now would be the time to file any bugs against impeller if there is something stopping you from migrating.
TheSourabhaSahu commentedon Aug 20, 2025
Are you sure? I mean, is there any evidence that turning off impeller causes the drawRenderNode issue?
Then I will ship my app with impeller + flutter 3.32.6
Edit: I forgot to mention that my crash rate increased when I used flutter 3.32.4 + Impeller OFF. And then decreased slightly when I used flutter 3.32.4 + Impeller OFF
Please anyone reply so that I can proceed
Thanks in advanced
MathieuPierfitte commentedon Aug 21, 2025
@TheSourabhaSahu I use the default config (so Impeller is ON on most devices) and this crash doesn't occur anymore with version 3.32.6.
mulderpf commentedon Aug 21, 2025
There appears to be a lot of questions / clarifications / confusion since the fix. Here's MY experience:
From my experience 3.32.6 and 3.32.7 have resolved the issue without the need to play around with Impeller settings (I wouldn't even know how to turn it on or off). This has been running smoothly for over a month on over 77000 installs without seeing this crash.
KaarelKelk commentedon Sep 3, 2025
Seems like latest version has been stable. No crashes have been reported for 7 days using latest version and impeller enabled. ✅
pubspec
TheSourabhaSahu commentedon Sep 3, 2025
Hey everyone
Just an update that my app is also stable now even with Impeller ON. ANR and Crash rate has dropped drastically
Finally flutter 3.32.6 solved the issue
Thanks for the community help
[android] release background image readers on <= Android 14 (flutter#…
MichalDudkiewicz commentedon Jan 3, 2026
it's still there in 3.38.5:
NamHofstadter commentedon Jan 26, 2026
@MichalDudkiewicz Have you try not turn Impeller off ?
dragonabyss commentedon Apr 24, 2026
in 3.35.7 with Impeller disabled, the same problem exists.
[engine] dont double free surface texture interop objects. (#170284)
[android] release background image readers on <= Android 14 (#171193)