Skip to content
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

YaFC freeze because all windows are inactive #192

Closed
Dorus opened this issue Jul 13, 2024 · 2 comments · Fixed by #194
Closed

YaFC freeze because all windows are inactive #192

Dorus opened this issue Jul 13, 2024 · 2 comments · Fixed by #194
Labels
bug Something isn't working

Comments

@Dorus
Copy link
Collaborator

Dorus commented Jul 13, 2024

I just had an error pop up, and after that, YaFC could was no longer responsive. The line if (inputSystem == null) { return; } in yafc-ce\Yafc.UI\Core\Ui.cs:70 always returns false. All windows in ActiveInputSystem had .active == false.

A possible solution would be to change line 28 to

public static InputSystem? ActiveInputSystem => windows.Values.FirstOrDefault(w => w.active)?.InputSystem ?? windows.Values.FirstOrDefault()?.InputSystem; to ensure there's always an inputsystem. But i'm not entirely sure on the expected working of the input system. @DaleStan .

@Dorus Dorus added the bug Something isn't working label Jul 13, 2024
@DaleStan
Copy link
Collaborator

DaleStan commented Jul 13, 2024

I'm afraid I don't know how the InputSystem is supposed to work either. If you switch to or merge 47c6761, that particular version of #178 should go away, but I still have crashes/hangs with that code. On the other hand, if there's significantly fewer crashes, we should merge it anyway. (The potential advantage of 47c6761 is that it reverts 5676ce7, which I never liked.)

I have no sense of whether it's an improvement because I can never tell whether my computer's in "five crashes in fifteen minutes" mode or "one crash in fifteen hours" mode.

@Dorus
Copy link
Collaborator Author

Dorus commented Jul 14, 2024

Do you have any Pr for those changes, or are you still working on them? Indeed reverting 5676ce7 seems to remove the offending LoC i was looking at here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants