-
-
Notifications
You must be signed in to change notification settings - Fork 699
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
Briefcase not closing down cleanly #3266
Comments
It looks like you're using one backtick( An advantage of using backticks instead of indentation is that you can specify the language and get syntax highlighting, e.g. in this case open a code block with |
Thanks Charles, that's useful to know. |
I don't have my hands on Windows at the moment to look into this. But if you have the time, here are some things that would help narrow down the source. Do you get the same crash...
|
Thanks for the report - I've been able to reproduce this using Toga Tutorial 0 on Windows 10. It only occurs with I don't see the problem with The good news is that they're not a problem per se - they're obviously undesirable, but they're not an indication that anything is actually broken. The issues being reported are all things that will be cleaned up automatically when the app exits. They seem to stem from the end-of-life of the Windows Proactor - that proactor isn't being explicitly shut down, and Python's asyncio cleanup warnings are being triggered as a result. From the look of it, the "run_forever_cleanup" portion of the event loop is not being executed... but that isn't a change since 0.4.9, so I can't work out why this has become a problem. More investigation is required. |
Hi Charles. I think Russell's reply probably covers these points, but if not, let me know if there's anything you'd still like me to try. |
@JDarsley I think I've found a fix for this; if you're able to try out the patch on #3270 that would be very helpful. If you've got a Briefcase project, you can replace the references to |
@freakboy3742 I'm not entirely clear on this. When you refer to the "Briefcase project", I'm guessing that would essentially be the pyproject.toml file? If so, I have a reference in there to toga-winforms:
No reference to toga-core though. So I'm not sure what changes are needed. I did try simply replacing the toga-winforms requirement with your new version, but predictably, on its own that's clearly not ok. I've attached the full file, in case that helps (I've given it a .txt extension, as the attachment mechanism here won't allow .toml). As an aside (and nothing to do with attempting to upgrade), the very first run of version 0.3.22 of briefcase dev actually downgrades a number of components - toga-core from 0.5.0 to 0.4.9, toga-winforms the same, and travertino from 0.5.0 to 0.3.0. |
Try replacing the toga-winforms requirement with both the toga-core and toga-winforms URLs above.
Yes, that will be because of the |
Apologies - I forgot the content that Briefcase generates by default. I've been using If you modify the
then run |
Thanks @mhsmith and @freakboy3742. I can confirm that after making those changes, the error messages no longer appear when closing the app. However, a number of console messages caught my eye. Is there anything here that looks wrong?
Obviously, pip is complaining. However, the question for me is whether those versions 0.4.5.dev are correct - as in lower version numbers than the 0.5.0 I was previously running? I'm guessing it's probably the way dev versions feed into the main branch, so probably nothing. Will it be obvious, when the time comes, when I should update pyproject.toml back to main release versions? |
Yes, this is fine. It's because the freakboy3742/toga fork doesn't automatically get copies of new version tags from the main repository.
The fix will be included in the next Toga release. You can be notified of this by watching the project on GitHub – select "Custom" mode to be notified only of releases and not other activity. |
Thanks @mhsmith - I'll watch for the release. |
Describe the bug
On Windows, when using the default menu option File | Exit, or the standard window close button, while running a Toga app under Briefcase, the application crashes, reporting that there are still pending operations.
Steps to reproduce
app.py
(Am I doing something wrong with the code formatting? It won't come out right.)
main.py
Expected behavior
Closing the app shouldn't generate error messages. I was previously running an older version of Toga, and didn't get those errors.
Screenshots
Error messages on exit from the app.
Environment
Logs
Additional context
No response
The text was updated successfully, but these errors were encountered: