kee-org / keepassrpc

The KeePassRPC plugin that needs to be installed inside KeePass in order for Kee to be able to connect your browser to your passwords
GNU General Public License v2.0
635 stars 35 forks source link

KeePass Tools menu bug #77

Closed artkolisnyk closed 1 year ago

artkolisnyk commented 5 years ago

Hello.

I encountered an issue with Tools menu in KeePass after using KeePassRPC. The menu increases in size until it barely fits the screen.

You can find proof of it here. Initially, the menu is okay, but then it gradually increases in size. I believe the issue may have something to do with KeePassRPC icon in the menu.

I'm running Windows 7 6.01.7601.17514 64bit, KeePass 2.42.1, KeePassRPC 1.9.0.0 and don't have any other KeePass plugins installed but KeePassRPC. I didn't have such issues when using KeePassRPC 1.8.0.0 (probably because it didn't have a menu icon).

Please, look into this.

luckyrat commented 4 years ago

Does this still happen with KeePassRPC 1.11.0 and KeePass 2.45?

It's probably related to DPI scaling problems but whether they are rooted in KeePassRPC, KeePass, .NET or Windows is hard to tell at this stage. I don't recall any other systems experiencing this issue though so in the first instance I am hopeful that the problem has magically resolved itself since last year.

LordNullPointer commented 4 years ago

Unfortunately the problem still exists with version 1.12.1.0 of KeePassRPC and KeePass 2.45. I don't know when this starts to happen, but maybe it helps to know, that I regularly use RDP to work with my PC and then switch back to working locally.

image

Iurii-Slobodchikov commented 3 years ago

I have the same issue: image When I open KeePass it is OK, but when I lock the workspace and unlock it again icons become big. It is especially good to see when the scale is set to the big value: image It happened in the previous versions of the KeePass and RPC and on the latest versions too.

gpion commented 3 years ago

Just occured to me now

sjs-77 commented 2 years ago

I can confirm this for Win7 64bit, KeePass 2.49 and KeePassRPC 1.14.0.0. The bug seems to occur only after I have connected to the system via RDP. After that, a restart of KeePass brings back the normal appearance.

mwiprod commented 1 year ago

Same problem with KeePass 2.52 and KeePassRPC 1.14.0.0

I have connected to the system via RDP too. A restart of KeePass brings back the normal appearance. image

luckyrat commented 1 year ago

I suspect that this relates to the DPIScaledToolStripMenuItem approach we had to use to enable high-dpi support for the menu items. E.g. re-connecting to RDP is for some reason re-calculating the image size in a way that causes the resulting image size to keep growing (perhaps only if either the host machine or RDP has scaling set to >100% ?).

I'm hoping that the GetMenuItem API introduced in KeePass 2.41 will mean we can delete that code, rather than trying to debug the issue further. That means dropping support for older versions of KeePass so it's not something we've been able to consider until recently.

I'll have a play with that new API soon and post an update here but since I can't reproduce the issue, it will be good to get some feedback from testing a pre-release version of the plugin from people monitoring this issue.

Iurii-Slobodchikov commented 1 year ago

I'll have a play with that new API soon and post an update here but since I can't reproduce the issue, it will be good to get some feedback from testing a pre-release version of the plugin from people monitoring this issue.

Thanks, Chris. I will definitely take part in testing the pre-release version. It is very annoying :)

luckyrat commented 1 year ago

Please can you try out this pre-release plgx: https://github.com/kee-org/keepassrpc/releases/tag/v1.15.0

I've switched to the new KeePass GetMenuItem API but probably still need to use the DPIScaledToolStripMenuItem with it to ensure correct appearance on all screen DPIs.

Hopefully using the new API will change the lifecycle of the image sufficiently so that the problem is solved but if not, the next potential approaches for a fix are:

Iurii-Slobodchikov commented 1 year ago

Please can you try out this pre-release plgx: https://github.com/kee-org/keepassrpc/releases/tag/v1.15.0

Thanks, Chris! I installed the new version and saw the new plugin compiling window, but, unfortunately, I can still see this issue, and the icon is still becoming bigger and bigger after each KeePass window opening.

luckyrat commented 1 year ago

Thanks for the feedback. I'll attach a tweaked version of 1.15 to this comment which no longer uses the custom DPI code that we had to implement 10 years ago. Hopefully it won't cause any regressions on other systems but as a first step we need to know whether this even fixes the problem with the Tools menu growing for RDP sessions. Please let me know if this 1.15.1 behaves any differently.

KeePassRPC-experimental-dpi.zip

Iurii-Slobodchikov commented 1 year ago

Please let me know if this 1.15.1 behaves any differently. Thanks, Chris! It worked. With the new changes, I can always see the normal size of the KeePass RPC icon.

luckyrat commented 1 year ago

Thanks for the quick feedback. I've now published that same plugin file as https://github.com/kee-org/keepassrpc/releases/tag/v1.15.1 - it's identical so no need for you to download it again.

I'll leave it as a pre-release for testing for a while longer.