-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rainmeter crashes after unloading of skin with this plugin #5
Comments
Thank you for taking time reading the code! I really appreciate it. |
I'm glad to help!
Unfortunately, I can't start Rainmeter with this version. It crashes before first redraw cycle. P.S. Sorry for reporting random issues in this thread, but I noticed that field "LegalCopyright" in your dlls contain "??" instead of "©" for me, while all other plugins I have shows ©. |
Haha, I made a mistake. About the copyright symbol, I used speaker emoji instead of © so it's maybe not available in your system. Eh, maybe I should change to © in next patch |
Now everything works as intended. |
No, I'm using win10. I think that it can be related to default charset: I use cp1251. But I thought that Unicode is used for this (and two question mark suggests that something like utf-16 is used). |
Ok, I think I found the issue with this symbol. I used different software for checking this information (plugin for total commander), and it apparently can't render emojis. Rainmeter and explorer show it as in your screenshot. Sorry for false report. |
How to reproduce:
Load 2 skins with AppVolumePlugin (for example, 2 instances of your example skin), unload 1 of them.
Are you sure that you want to release static field "pEnumerator" on every parent measure unload?
AppVolumePlugin/AppVolume/AppVolume.cpp
Line 45 in a196e92
Null pointer dereferencing is probably the cause of the crash because static pEnumerator is null after unloading of a skin containing this plugin. Maybe it should not be static?
Also, although this is not directly related to the issue, I think that CoCreateInstance() in InitializeCOM() leads to memory leak because if pEnumerator is initialized it is not released before second initialization.
Another memory leak is probably happening because CoUninitialize should be called for every successful CoInitialize but now you call it only once per plugin lifetime.
The text was updated successfully, but these errors were encountered: