-
Notifications
You must be signed in to change notification settings - Fork 598
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
Fix a drawin crash, a drawin memory leak and a wallpaper error. #3880
base: master
Are you sure you want to change the base?
Conversation
It is possible for that variable to not be set if `awful` was never loaded.
faa2504
to
6562905
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3880 +/- ##
=======================================
Coverage 91.01% 91.01%
=======================================
Files 901 902 +1
Lines 57566 57622 +56
=======================================
+ Hits 52392 52447 +55
- Misses 5174 5175 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was no "real" unsolvable GC issues, but at least for Lua 5.2 and 5.3, it wasn't possible to GC a wibox anymore. This commit unwind the circular references with 3 new weak refs. This is enough to get a specific test to pass on Lua 5.3. It's voodoo, but this was actually a pretty bad leak. There's other according to some test I wrote, but that's one. As for to_string, it appears to be accidental refactoring oversight.
When a drawable has a pending redraw in a delayed call and the drawin is GCed (which was impossible because it was broken until the last commit), it crashes.
When you run this outside of the test runner, it works, but not with it. Anyway, it adds the regression tests for the previous crash, so it's worth having.
6562905
to
3fa9c66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it was actually some reports about weird un- investigated/confirmed leaks
and myself sometimes notice some leakage on awesome proc but i'm not sure how to reproduce that - so neither can tell for sure if they're gone with this PR
but seeing the test gives a good feeling about this, even if it's not addressing aforementioned leaks
Confirmed leakage, as in something like Valgrind confirmed that the address was dropped without a More likely, it would be the same issue as everything else reported as an alleged leak, including the 3-4 issues that are still open: Lua doesn't have the facilities to notify its GC of how big a memory region in a pointer is. I.e. if you have a userdata that contains a pointer to a big memory chunk (such as a Cairo surface pointing to image data), Lua only knows about the size of the userdata struct, which would be 64 bit for the pointer. Lua doesn't know, and cannot be told about, the kilo- or megabytes of data that the pointer actually contains, because they were not allocated by Lua. Example: This is easily verifiable by adding a |
@sclu1034 if you wanna discuss each of them - i guess better place would be there (https://github.com/awesomeWM/awesome/issues?q=is%3Aissue+is%3Aopen+memory+leak+) |
I doubt anybody ever noticed this, but it existed.