Skip to content

Fix race condition for Paragraph and Editor in the renderer #2886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

srussvoll
Copy link

@srussvoll srussvoll commented Apr 10, 2025

I'm working on the bevy_iced plugin for Bevy that integrates Iced into Bevy:

Since Bevy is using pipelined rendering and Iced assumes non-pipelined rendering, some things don't work. For instance, when typing into a text input widget, the text will often disappear for a frame when a letter is typed resulting in blinking, and is reported in #2318. The issue is that there is a race between the renderer reading the weakly referenced text and the destroying of that text, and is described in more detail here: #2670 (comment). I started a thread in Discord to discuss this problem more generically.

This PR fixes the race condition that causes the flashing text.

The following PR is also required to get bevy_iced to work with the main branch of iced:

@srussvoll srussvoll changed the title Use strong reference when sending Paragraph and Editor to the ren… Fix race condition for Paragraph and Editor in the renderer Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant