flutter-plugins
flutter-plugins copied to clipboard
App crashes on closing child window when using window_manager (windows 10)
Whenever I try to use the window_manager package, the app crashes as soon as I try to interact with the main window after closing a child window. Both in debug and release mode.
I'm using Flutter 3.3.8 stable.
I attached the minimal code to reproduce: window_manager_crash.zip
Maybe take a look at https://github.com/Kingtous/rustdesk_desktop_multi_window
I just tried it with my attached example, and it crashed exactly the same.
not sure what you mean by tried it, maybe look at the example and see how they used it
Both the desktop_multi_window and rustsesk_desktop_multi_window plugins' examples crash after I click on the create a new world button
weird, mine works perfectly
I'll have to try it on another system or a VM then, but I can't do that until probably a few weeks.
Can I ask what version of Flutter are you using?
Flutter 3.3.9
I successfully reproduced this problem using Flutter 3.7.0-1.1.pre (beta) test OS: Windows 11
But if you don't use the window_manager package, it can work normally
I am having the same issue as @CroatianHusky. Do we need to do any plugin cleanup in FlutterWindow::OnDestroy?
Flutter 3.7.0-19.0.pre, on Microsoft Windows [Version 10.0.19045.2486]
I am having the same issue as @CroatianHusky. Do we need to do any plugin cleanup in FlutterWindow::OnDestroy?
Flutter 3.7.0-19.0.pre, on Microsoft Windows [Version 10.0.19045.2486]
you can close child window by windowManager.destroy()
I used the windowManager.destroy() to close the sub window, but it still make the main window crash, so now I currently just hide the sub window, not close it, everything goes on.
For those still having trouble, I am no longer getting errors using rustdesk_window_manager with rustdesk_desktop_multi_window
window_manager:
git:
url: https://github.com/Kingtous/rustdesk_window_manager
ref: 32b24c66151b72bba033ef8b954486aa9351d97b
desktop_multi_window:
git:
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
ref: bc8604a88e52b2b6e64d2661ae49a71450a47af8
@rashcroft7 All you need to do is import those packages ? Do you know if you can change the transparency of new window ?
@LucaCoduriV Yes, and follow the example usage at rustdesk_desktop_multi_window. You will need to look at how the sub window is closed in the main.dart.
I have not tried transparency.
@LucaCoduriV Yes, and follow the example usage at rustdesk_desktop_multi_window. You will need to look at how the sub window is closed in the main.dart.
I have not tried transparency.
I am looking at their code, but I Don't understand where I have to look. Sometime my program randomly crashes when opening a window after closing an other one and says that I am trying to read a Null pointer. And by the way, I can confirm that transparency works.
I have the sameee. did you solve it?
@LucaCoduriV Yes, and follow the example usage at rustdesk_desktop_multi_window. You will need to look at how the sub window is closed in the main.dart. I have not tried transparency.
I am looking at their code, but I Don't understand where I have to look. Sometime my program randomly crashes when opening a window after closing an other one and says that I am trying to read a Null pointer. And by the way, I can confirm that transparency works.
I have the sameee. did you solve it?
I am looking at their code, but I Don't understand where I have to look. Sometime my program randomly crashes when opening a window after closing an other one and says that I am trying to read a Null pointer. And by the way, I can confirm that transparency works.
No I didn't but i found a solution for my use case. I've created a pool of windows and hide them all by default. Then when I need, I change the content and show them up. And by the way, I am using the officials packages again.