Skip to content

Conversation

mockersf
Copy link
Member

fixes #1069

while investigating this issue, it seems to be:

  • creating a new window is done through an event that is treated asynchronously, at the beginning of a frame
  • updating the render graph to use it is done synchronously in the current frame

I tried fixing it by calling handle_create_window_events more often or at the appropriate time, but it's hard due to the fact it has a event_loop param.

The other way to fix this is to make the render graph more error resilient.

To do this, the update function of a node now returns a Result<(),()>, and the graph will just ignore errors. Similarly, the various panic! calls in the loop have been replaced by a warning! and a break to continue to the next node.

If this approach to fix the issue is taken, there is still to do:

  • the warning messages are useless as the user can't really do anything about them
  • the Result<(),()> type should use at least a real error type
  • there may be a few cases where panic! is actually a better behaviour, I'm not sure how to identify them

@mockersf
Copy link
Member Author

ha clippy actually doesn't like Result<(),()>... nice clippy!

@Moxinilian Moxinilian added P-Crash A sudden unexpected crash O-MacOS Specific to the MacOS (Apple) desktop operating system A-Windowing Platform-agnostic interface layer to run your app in labels Dec 17, 2020
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 17, 2021
Base automatically changed from master to main February 19, 2021 20:44
@mockersf mockersf marked this pull request as draft February 26, 2021 00:37
@mockersf
Copy link
Member Author

I would rather restart this from scratch if I need it again than finish this PR

@mockersf mockersf closed this Apr 14, 2021
@mockersf mockersf deleted the multiple-windows branch April 27, 2021 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Windowing Platform-agnostic interface layer to run your app in O-MacOS Specific to the MacOS (Apple) desktop operating system P-Crash A sudden unexpected crash S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic when running example multiple_windows

3 participants