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

Memory leaks on some widgets #2849

Open
freakboy3742 opened this issue Sep 15, 2024 · 0 comments
Open

Memory leaks on some widgets #2849

freakboy3742 opened this issue Sep 15, 2024 · 0 comments
Labels
android The issue relates to Android mobile support. bug A crash or error in behavior. linux The issue relates Linux support. windows The issue relates to Microsoft Windows support.

Comments

@freakboy3742
Copy link
Member

Describe the bug

Some widgets are known to cause memory leaks when used on some platforms. In most cases, this is likely due to the inadvertent introduction of circular references between native libraries and the CPython runtime.

Steps to reproduce

#2088 added testbed tests for memory cleanup of widgets (the factory-generated test_cleanup on each widget).

Any test_cleanup that is has an xfail_platforms argument indicates the platforms where a leak is known to exist.

Expected behavior

No widgets should need the xfail_platforms argument in the testbed tests.

Screenshots

No response

Environment

  • Operating System: iOS and Android have the most problems; some problems on Linux and Windows.
  • Python version: All
  • Software versions:
    • Briefcase: 0.3.19+
    • Toga: 0.4.6+
    • ...

Logs


Additional context

Invoking gc.get_referents() and gc.get_referrers() before asserting ref() is None in the cleanup test method is one way to identify the reference cycles that exist.

@freakboy3742 freakboy3742 added bug A crash or error in behavior. android The issue relates to Android mobile support. iOS The issue relates to Apple iOS mobile support. linux The issue relates Linux support. windows The issue relates to Microsoft Windows support. labels Sep 15, 2024
@freakboy3742 freakboy3742 removed the iOS The issue relates to Apple iOS mobile support. label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android The issue relates to Android mobile support. bug A crash or error in behavior. linux The issue relates Linux support. windows The issue relates to Microsoft Windows support.
Projects
None yet
Development

No branches or pull requests

1 participant