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 in backlight driver #250

Closed
selairi opened this issue Apr 7, 2020 · 5 comments
Closed

Memory leak in backlight driver #250

selairi opened this issue Apr 7, 2020 · 5 comments

Comments

@selairi
Copy link
Contributor

selairi commented Apr 7, 2020

Sorry, I din not realize that I was in lxqt repository and I pushed this:
00a3949

Backlight doesn't delete the backlight driver after use and it builds a new one.

Expected Behavior

Change the backlight.
After 60 seconds backlight driver is deleted.

Current Behavior

Backlight driver doesn't be deleted and new one is build.

Possible Solution

The solution is close the stream to backlight driver.
Sorry, I din not realize that I was in lxqt repo and I pushed the solution:
00a3949
I was thinking that I was pushing to my own repo.

Steps to Reproduce (for bugs)
  1. Open qps to check backlight driver
  2. Change the backlight (lxqt-config-brightness) for several minutes.
  3. Check qps and there are lots of backlight drivers
Context
System Information
  • Distribution & Version:
  • Kernel:
  • Qt Version:
  • libqtxdg Version: 0.14
  • lxqt-build-tools Version:
  • Package version:
@tsujan
Copy link
Member

tsujan commented Apr 7, 2020

@selairi
00a3949 looks good to me, although I haven't had time to test it (I think you did).

@selairi
Copy link
Contributor Author

selairi commented Apr 7, 2020

@tsujan Yes, I test it. If you create a new LXQt::Backlight object and then you change the backlight, LXQt::Backlight will run a new backlight driver and it will kill it after 60 seconds.

I found the bug when I was testing the tool to change the backlight when computer is idle. For testing, I selected 5 seconds of idleness and when I checked the PID of lxqt-powermanager to kill it and run a new version, I found lots of backlight drivers running. A new one each 60 seconds. LXQt::Backlight was not killing the backlight driver.

@tsujan
Copy link
Member

tsujan commented Apr 7, 2020

@selairi
Yes, I'd guessed that you found and fixed the issue while testing your solution for https://github.com/lxqt/lxqt-powermanagement/issues//188

@selairi
Copy link
Contributor Author

selairi commented Apr 7, 2020

@selairi
Yes, I'd guessed that you found and fixed the issue while testing your solution for https://github.com/lxqt/lxqt-powermanagement/issues//188

Yes, you are right. I found it while testing that tool.

@tsujan
Copy link
Member

tsujan commented Apr 17, 2020

The commit was merged. No point in keeping this open.

@tsujan tsujan closed this as completed Apr 17, 2020
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

2 participants