Menu

#1710 Lock workspace after inactivity - not working in special case

KeePass_2.x
closed
nobody
None
5
2018-07-04
2018-02-02
Jakub Klos
No

I have had this issue for a long time. When I use generally KeePass2 it never locks the workspace. When I go and test the feature it works. It was only today that I realized what triggers the bug.

After searching for an item with the Ctrl+F dialog it actually stops working and the workspace never gets locked.

I am using KeePass2 on Mono (Ubuntu 16.04) but since it is a special case scenario I think it must be in the code and not Mono itself.

Steps to reproduce

  1. Set the inactivity workspace lock to 10 seconds
  2. Open some database
  3. Switch to a different app.
    After 10 seconds KeePass2 locks properly

  4. Now open the database again

  5. Press Ctrl+F and find some existing item
  6. Switch to some other app and wait

KeePass will never lock now. Not even if you close the database and open again. You need to restart the app for the lock feature to work again and must not sure the search dialog

I can help debug this if you need me.
Thank you

Discussion

  • Paul

    Paul - 2018-02-02

    I assume closing the find dialog makes no difference?
    Testing in Windows, the database locks even with the find dialog open. Seems mono doesn't correctly allow dialog determination / breaks when you try to use it.

    cheers, Paul

     
  • Paul

    Paul - 2018-02-02

    NOTE: Sourceforge seem to be having trouble with the links to this thread, pointing to a feature request instead of a bug.
    This is the correct URL: https://sourceforge.net/p/keepass/bugs/1710/

    cheers, Paul

     
  • Jakub Klos

    Jakub Klos - 2018-02-02

    For me it also locks when the dialog is open even in Mono.
    The issue occurs when you hit enter in the dialog to search for something. It can be any string (even if the item does not exist).
    After you hit enter to search and close the dialog, the locking will not fire up

     
  • Paul

    Paul - 2018-02-02

    Working OK in Windows.

    cheers, Paul

     
  • Dominik Reichl

    Dominik Reichl - 2018-02-08

    I cannot reproduce this problem with KeePass 2.38 on Ubuntu 16.04 / Mono 4.2.1.

    Please ensure that you are using KeePass 2.38 without any plugins for testing. If the issue is still present, please post your KeePass.config.xml file.

    Thanks and best regards,
    Dominik

     
  • Jakub Klos

    Jakub Klos - 2018-02-09

    I tried to shoot a video for you to see but it flickers no matter what recording util I use (even tried ffmpeg).

    Anyway, I have tried KeePass 2.38 with a freshly deleted KeePass.config.xml (the only change I did was set the Lock workspace to 10 seconds and enabled that option). I can reproduce the issue any time and I tried it even on another VM (Ubuntu 17.10). I could record the video using VirtualBox if you need me to

     
  • Dominik Reichl

    Dominik Reichl - 2018-04-07
    • status: open --> closed
     
  • Dominik Reichl

    Dominik Reichl - 2018-04-07

    I tested it with KeePass 2.38 on Ubuntu 17.10 / Mono 4.6.2 now, but cannot reproduce the issue here either.

    A video probably wouldn't be helpful; your description is clear, the problem just doesn't appear for me. My guess was that it depends on a specific combination of configuration settings, but if you're testing with the default settings (except locking after 10 seconds), I'm out of ideas, sorry. If you find out what causes the problem, please post it here.

    Thanks and best regards,
    Dominik

     
  • randoogle

    randoogle - 2018-06-28

    I know this is closed, but I'm having this issue, and I'm running KeePass 2.38 on Fedora 28 / Mono 4.8.0
    I always wondered why my workspace locking wasn't working, until I found this post. I almost always hit Ctrl+F to search for everything -- it's the first thing I do when opening my database. I'm willing to upload logs or whatever you would need to trouble shoot this.

     
  • Dominik Reichl

    Dominik Reichl - 2018-07-04

    Thanks for the info. With this constellation, I now was able to reproduce the problem. It's caused by Mono not always raising the FormClosed event properly. I've added a workaround now.

    Here's the latest development snapshot for testing:
    https://keepass.info/filepool/KeePass_180704.zip

    Best regards,
    Dominik

     

Log in to post a comment.