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
The application freezes while resizing the terminal on MacOS #1683
Comments
I updated the code a bit as I couldn't get yours to work straight off. Here it is: https://www.toptal.com/developers/hastebin/xizitagije.csharp I added a couple of test entries to the list and initialized the collection before the list view. I am not able to reproduce the hanging issue and can resize on both Windows and Linux (including with UseSystemConsole) so this might be a MacOS only issue? |
You should start playing with terminal size just after running an app.
|
I'm guessing this must be a MacOS issue. I don't have a MacOS device to test with and as you can see below the behavior isn't replicated on Linux (or Windows) - I tested with Powershell, Visual Studio Terminal, Linux Terminology and Terminator. Maybe one of the other maintainers will be able to help more, sorry. Just to confirm that you only see this behavior when resizing? |
Yes, only while resizing. You change terminal dimensions after the InternetTime.GetCurrentTime() finished. Start to play with terminal size immediately after dotnet run. I checked now, Windows don't have this issue. |
Probably a long shot @kacperpikacz but could you see if my PR changes anything for you with this issue #1684 . It fixes some threading issues to do with timeouts so might help (or it could be entirely unrelated to that). |
@tznind just checked your modified MainLoop class but it doesn't fix issue in this case. Application.UseSystemConsole = true will fix this issue. So the problem is somewhere inside ConsoleDriver |
Can confirm that I'm having a similar issue on MacOS terminal. Screen.Recording.2022-05-22.at.14.53.35.mov |
Does this still repo? |
Closing as not-repo |
@tig The issue is still there. Untitled.mp4 |
@kacperpikacz it seems that you are dealing with some threading job and updating the screen without using |
It's not about updating screen.
Untitled.mov |
You need to update the static Func<MainLoop, bool> fetchTime = (loop) => {
UpdateTimeAsync ();
MainField.Text = Clock.unixtime.ToString ();
//MainField.SetNeedsDisplay ();
return true;
}; |
@kacperpikacz do you get this issue when you run the demo application (UICatalog) in this repository? If not then it is probably to do with cross thread access as @BDisp says. |
@kacperpikacz I confirm that the |
@kacperpikacz please test my PR #2667 with the fix. Thanks. |
* Fixes #1683. The application freezes while resizing the terminal on MacOS * Remove unused variable.
I appreciate your recent fix @BDisp but as you can see in the code I'm not trying to update the TextField in any way. But application still will freeze because of I can confirm that your fix is working with threading scenario from UICatalog but not fixes issue what you can see below. When you replace Code My mistake, I added the reference to the wrong project. I apologize for the misunderstanding. Recent commit fixes the problem. Untitled.mov |
@kacperpikacz your comment above is confusing. Is this fixed now in |
@tig Sorry for the confusion. It's fixed now in |
Describe the bug
The whole app freeze If I resize the terminal while Application fetching the current time from internet.
To Reproduce
https://www.toptal.com/developers/hastebin/iruwokoxuw.csharp
Desktop:
Additional context
I don't know if it's a bug or I'm doing something wrong. But the same issue you will get in Threading scenario from UICatalog if you run few tasks and start playing with terminal size by mouse.
The text was updated successfully, but these errors were encountered: