[Linux] show/hide emission hooks are never removed; verify clean exit
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cpp, linux
- Domain
- desktop, operating-systems
Research direction
Start in src/platform/linux/window_manager_linux.cpp at InstallGlobalSwizzling(), comparing the show/hide hooks with the nearby focus-in/focus-out hooks. Trace where window_manager shuts down and verify the hook lifecycle there. Done means a nativeapi Flutter app exits cleanly on Linux under X11 and Wayland, including after closing a secondary window created through package:nativeapi/windowing.dart.
Written by the indexing model from the issue text.
Description
InstallGlobalSwizzling() in src/platform/linux/window_manager_linux.cpp adds show / hide emission hooks on GtkWidget with g_signal_add_emission_hook(), but doesn't keep the hook ids, so they are never removed. The focus-in/focus-out hooks next to them are removed properly.
window_manager had a similar never-removed button-press-event emission hook in its Linux plugin. Users reported crashes when the app exits, or when a secondary Flutter window closes: FlutterEngineRemoveView ... The implicit view cannot be removed, followed by an epoxy/GLX assertion. The hooks here pass no user data, so they probably can't use a freed plugin pointer, but that should be confirmed:
- keep the hook ids and remove them when the manager shuts down
- check that a Flutter app with nativeapi exits cleanly on Linux (X11 and Wayland), including after a secondary window created through
package:nativeapi/windowing.dartis closed
Background:
- leanflutter/window_manager#585: crash on exit on Fedora 44 KDE X11, from just having the plugin
- leanflutter/window_manager#567: a PR that removes the emission hook on plugin dispose
- Dominant language
- C++
- Stars
- 34
- Forks
- 7
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libnativeapi/nativeapi
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
libnativeapi/nativeapi#81 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
libnativeapi/nativeapi#80 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
libnativeapi/nativeapi#79 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
libnativeapi/nativeapi#78 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
libnativeapi/nativeapi#77 ·
All issues in libnativeapi/nativeapi
Similar issues
-
AuTest Bug Tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/trafficserver#13714 ·
-
bug build
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
facebookincubator/velox#19143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tenstorrent/tt-metal#57393 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·