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 Leak (Thread) does not dispose. #129

Open
ScorpiosCrux opened this issue Jul 18, 2024 · 2 comments
Open

Memory Leak (Thread) does not dispose. #129

ScorpiosCrux opened this issue Jul 18, 2024 · 2 comments

Comments

@ScorpiosCrux
Copy link

Describe the bug
Whenever I put the overlay in the background, a new thread/isolate is created but never disposed.

image

This started happening when I started using:

@pragma("vm:entry-point")
void overlayMain() {
  // Ensure's that the Flutter engine is initialized before any dart calls.
  WidgetsFlutterBinding.ensureInitialized();
  
  runApp(const MaterialApp(
    debugShowCheckedModeBanner: false,
    home: SystemOverlayWidget(),
  ));
}

To Reproduce
Click the circle button to put the app into the background (with circle button), and then reopen the app without closing it (swiping up from square button)

Expected behavior
The overlay thread should be shutdown when the following is called

await SystemAlertWindow.closeSystemWindow(
    prefMode: SystemWindowPrefMode.OVERLAY,
);

Versions (please complete the following information):

  • SystemAlertWindow: 2.0.0
  • Device: Orange Pi 5
  • OS: Android 12

Let me know if you need more information.

@MalathSam1994
Copy link

I have the same problem:

E/flutter (12162): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method removeCallBackHandler on channel in.jvapps.system_alert_window)
E/flutter (12162): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)
E/flutter (12162):
E/flutter (12162): #1 SystemAlertWindow.removeOnClickListener (package:system_alert_window/system_alert_window.dart:50:12)

Did you made it solving this?

@iQ-ashish
Copy link

@ScorpiosCrux have you used overlay window to go on app if yes then let me know as i wnat to add the same feature but its not routing to app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants