#14710·bevy

UI elements randomly disappear for some frames on specific android devices

Author: MarcoMeijerCreated Aug 11, 2024Updated Sep 14, 2026
LabelsC-BugA-RenderingA-WindowingA-UIO-AndroidS-Needs-Investigation

Bevy version

Bevy 0.14.1

Relevant system information

Samsung Galaxy A34 Cargo 1.80.0 Built using https://github.com/NiklasEi/xbuild

What you did

Rendered user interface and a regular sprite.

use bevy::prelude::*;

#[bevy_main]
fn main() {
    let mut app = App::new();
    app.add_plugins(DefaultPlugins).add_systems(Startup, setup);
    app.run();
}

fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
    commands.spawn((Camera2dBundle::default(), IsDefaultUiCamera));
    commands.spawn((
        NodeBundle {
            style: Style {
                width: Val::Px(500.0),
                height: Val::Px(125.0),
                ..default()
            },
            ..default()
        },
        UiImage::new(asset_server.load("branding/bevy_logo_dark_big.png")),
    ));
    commands.spawn(SpriteBundle {
        transform: Transform::from_xyz(0., 0., 0.),
        sprite: Sprite {
            custom_size: Some(Vec2::new(500., 125.)),
            ..default()
        },
        texture: asset_server.load("branding/bevy_logo_dark_big.png"),
        ..default()
    });
}

What went wrong

The ui image is flickering, but the regular sprite is not flickering.

Additional information

https://github.com/user-attachments/assets/e5c3c48b-6470-440b-9392-e4a2257ec75b

One of my play testers for my game has this issue, this was recorded on their phone. Other people, including me don't have this issue so it could be a device related issue. This flickering also happens on text and 9-slices (not shown in example).

This issue happened once to me, but never again after that. But on this persons phone it seems to happen almost always.

This might be a related issue: https://github.com/gfx-rs/wgpu/issues/2399, but I am not sure since it only happens on UI elements as shown in the video.

This pull request seems to be solving a similar issue: https://github.com/bevyengine/bevy/pull/13462.

Maybe this bug has something to do with system ordering?