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

[desktop_multi_window v0.2.0] Invalid memory access upon app close #342

Open
isaacy13 opened this issue May 20, 2024 · 1 comment
Open

Comments

@isaacy13
Copy link

isaacy13 commented May 20, 2024

Upon closing app, there are various fatal memory access errors

Reproduce Steps

Steps to reproduce the behavior:

  1. Open an app with desktop_multi_window v0.2.0
  2. Close the app
  3. See crash logs (e.g.: Sentry Native or debug locally with Visual Studio)

Expected behavior

Upon closing app, no memory access violations should occur

image
image

Version (please complete the following information):

  • Flutter Version: v3.19.3
  • OS: Windows
  • plugin: [desktop_multi_window v0.2.0]
Errors occur in C++ library and are not caught by Flutter

Can debug locally with Visual Studio by:
- Open Task Manager
- Right click app
- Debug
- New instance of Visual Studio
Seems like desktop_multi_window objects are trying to be used after Flutter app is closed & memory is deallocated

Challenge might be making sure all objects are destructed before Flutter app is closed

Commenting out WindowChannel destructor code seems to resolve memory access errors, but was hoping for a better solution
Note: repro steps only require main window to be created (and registered) -- no creation of subwindows required to reproduce issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants