#1210 User interface briefly visible during minimized start

KeePass_2.x
open
nobody
startup (1)
3
2016-04-26
2014-02-03
Gingko
No

Hello.

If KeePass (2.24, 2.25 at least) is started minimized, It briefly displays, often full screen, its user interface upon start and before being minimized.

This "brief" state, usually one half second or less, can extend to up to 15 seconds if the application is also set to start with Windows, because its launch is slowed down by concurrent launches of other applications.

This is not a big problem by itself, but it is very ugly and quite painful, so I think that this should (and could likely easily) be fixed.

I wouldn't imagine if every process started hidden with Windows would have displayed such a window during startup ...

Regards,

Gingko

Discussion

1 2 > >> (Page 1 of 2)
  • Paul
    Paul
    2014-02-04

    I don't see this on Windows 7 pro. What version of Windows do you have?

    cheers, Paul

     
  • Gingko
    Gingko
    2014-02-04

    I'm mostly using Windows 8.1 Professional.
    But I saw this also in other Windows versions (I have several multiboot computers using also Windows XP, Windows Vista, Windows 7).

    Now maybe I have unusually heavily loaded startup Windows installations, and/or a large KeePass database.

    Regards,

    Gingko

     
  • Paul
    Paul
    2014-02-04

    The only time database size would have an affect is if you unlock the database on start-up. Otherwise KeePass loads without any other action.

    If you close KeePass and re-open it do you see the same issue?
    If you rename KeePass.config.xml (in %APPDATA%\KeePass) does it open full screen? Maybe the config file is slow to find.

    cheers, Paul

     
  • Gingko
    Gingko
    2014-02-04

    Hello,

    If I close KeePass and re-open it, yes, I see the same issue, although much more briefly than on startup.

    Anyway I can precise that, having just tested again a few time ago, on two different computers, I got it briefly on a Windows 7 one (about 100 mS), and apparently not on another with Windows 8.1. But on the latter, I can nevertheless notice a short blink on other application windows (including Windows Explorer), letting me knowing that it actually happens, but too much quickly for appearing on screen.

    If I rename the KeePass.config.xml file (on the Windows 7 computer), the following happens:

    • On the first run, I get a message asking me if I want to be notified about next updates. I answer, yes or no. KeePass is not minimized. I quit.
    • On the second run, KeePass opens again without being minimized at all. I check the only option for starting in minimized and locked state, then I quit again.
    • On the third run, I no longer see the user interface as before, but I know that it's now actually the same thing as on the Windows 8.1 computer: the Windows Explorer's window shortly blinks.

    My KeePass.config.xml actually contains connection information to a FTP remote database, with credentials for reading. Maybe the time for checking it availability adds to the starting time. Or maybe it is related to the update search time?

    Anyway I think personally that these time questions don't really matter.

    For me, the fact that in all case the other application windows shortly blink when KeePass starts lets me thinking that it is started with its main window in normal state, and next only it is minimized if the configuration request it to do so.

    I have another application, actually partly written and maintained by myself, which does a similar thing, as also being able to start minimized in the notification area. But in this application, the main interface window is always created minimized, then only if the window is not required to start in this state, it is restored to normal state.

    When the application starts, you cannot notice anything in other windows during startup, and you cannot even know that the application has started unless looking at the notification area or, of course, open the Task Manager.

    If I delete the KeePass.config.xml on the Windows 7 computer, likely the problem will seem to disappear. But as I will certainly quickly set the same configuration as before, it will likely not need a long time before I run in the same bug.

    Regards,

    Gingko

     
    Last edit: Gingko 2014-02-04
  • Paul
    Paul
    2014-02-04

    Can you post your config file - change the important bits first?

    cheers, Paul

     
  • Gingko
    Gingko
    2014-02-04

    Ok. I post it here as attachment.
    This is the Windows 7 Ultimate one (as I have several ...).

    I substituted some fields, you will easily find which ones.

    Regards,

    Gingko.

     
    Attachments
  • Paul
    Paul
    2014-02-05

    Try turning off the auto update check.

    cheers, Paul

     
  • Gingko
    Gingko
    2014-02-05

    Hello Paul,

    And what if I want to be notified about updates ? :-)

    Anyway, I tried it and this doesn't change anything.

    By the way, it seems that you check for updates on any application launch.
    Wouldn't be better (for network loading, particularly) to keep track of the date of the last check in order to do this update check, for example, only once a week ?

    Regards,

    Gilles

     
  • Paul
    Paul
    2014-02-06

    It was only a suggestion to try and resolve your problem.

    cheers, Paul

     
  • mauromol
    mauromol
    2014-04-05

    I have been seeing this problem too for a very long time (always used KeePass 2 however). Under Windows 7 Professional 64-bit.
    The shadow of the empty main window is shown for a fraction of second when starting minimized at boot. It seems like the command to go to tray is issued after the main window has already been displayed.

     
  • Philip R Dwyer
    Philip R Dwyer
    2014-09-23

    I attempted to recreate this issue on Windows 8.1 64 bit on KeePass 2.27 and was unsuccessful. After I connected using my master password I didn't see the UI, trying several times. I believe there are 2 reasons for this, the first one being in one of the newer updates this issue was fixed. The other reason may be the speed of a user's computer and the ability to process the requests. If I were to guess I do not believe this is an issue on the KeePass side of things, but in fact how fast your computer can process the request to minimize this application.

    Phil Dwyer
    9/22/2014

     
  • mauromol
    mauromol
    2014-09-23

    I've not tested thoroughly the latest versions (also because at home I switched to Linux meanwhile), however I think the problem with the old ones is exactly the one you mentioned. More precisely, the source of the problem might be that the request to minimize the main window is sent as a signal to the OS by the application on start, and the OS might process it "later". I mean, the application is not "started minimized" by the very beginning, but it's started normally and minimized later on.
    I remember from the good old days of Delphi programming that I had a similar problem when working on a spare-time project.

    I'm going to try this at work with Keepass 2.27 now.

     
    Last edit: mauromol 2014-09-23
  • mauromol
    mauromol
    2014-09-23

    Still reproducing this with Keepass 2.27 on Windows 7 Professional 64-bit on an Intel Core i7-3770 with 32 GB RAM and a Western Digital Caviar Green hard disk... Yes, I know, this system does not have a SSD, but I think it should be OK to run Keepass smoothly... :-D

    I know this is just a "cosmetic" problem, but it's still there.

     
  • zeromido
    zeromido
    2016-04-21

    I'm having that issue too. KeePass 2.32 win 7 ultimate x32.

     
  • Gingko
    Gingko
    2016-04-21

    Hello.

    I still have it too.
    This problem hasn't been fixed for the two years since I first submitted it.
    Except that I am now running KeePass on Windows 10 Professional (on several computers) and this didn't change anything.

    Gingko

     
  • Paul
    Paul
    2016-04-22

    And we still can't reproduce it. It seems related to your KeePass installation.

    Do you have KeePass set to start up in multiple locations? Turn of start with Windows, does KeePass still start automatically?

    cheers, Paul

     
    • Gingko
      Gingko
      2016-04-22

      Hi Paul,

      What does mean "set to start up in multiple locations" ?

      If I turn off "start with Windows", likely the problem will not happen.
      But I DO want to have it starting with Windows.

      About the fact that you can't reproduce it, just some clues that I think you could explore:

      • Likely it happens all the time, including with you, but it is normally too fast for being visible. This may however be not true if a lot of process and service are loading when Windows starts.
      • I use to load two remote databases every time I load the application (located on a host rented by me in a datacenter). Despite they don't seem to be actually loaded until I type their respective passwords, maybe some checks are nevertheless made during the opening of the application?
      • I could send you the configuration file if you tell me what to send precisely (even if it happens to be a registry sub-tree).

      Gingko

       
      Last edit: Gingko 2016-04-22
  • mauromol
    mauromol
    2016-04-22

    Paul, as I said there's no installation issue, this problem happens on multiple systems where Keepass 2 is installed in a very standard way.
    The problem lies in the fact that the program starts with a main window visible and THEN hides it afterwards. If your system is "fast enough" to signal the main window to hide before it has even been shown, you won't notice the problem. Otherwise, the effect will be clearly visible.

    On my system (meanwhile updated to a Haswell i7, 32 GB RAM and a mechanical hard disk) the problem is clearly repdoucible even if you simply do the following:

    • close Keepass from the tray icon (right click - exit)
    • start Keepass again from the Start menu
      => main window shown for a fraction of second, then hidden

    The options checked in Keepass "Interface" | "Main Window" groups are:
    "Close button [X] minimizes main window instad of terminating the application"
    "Minimize to tray instead of taskbar"
    "Minimize main window after locking the workspace"
    all the others are unchecked.
    While, in the "Advanced" | "Start and Exit", all options are checked except "Auotmatically save when closing/locking the database".
    All the options "Lock workspace when..." are checked in "Security" | Options.

    When installing the program, the option to optimize Keepass startup performance had been checked.

     
    Last edit: mauromol 2016-04-22
    • Gingko
      Gingko
      2016-04-22

      The problem lies in the fact that the program starts with a main window visible and THEN hides it afterwards. If your system is "fast enough" to signal the main window to hide before it has even been shown, you won't notice the problem. Otherwise, the effect will be clearly visible.

      I definitively support this assertion.

      Gingko

       
  • mauromol
    mauromol
    2016-04-22

    Maybe the graphics card drivers could make a difference? I've always used embedded Intel Graphics on the systems I remember I used Keepass on (Atom, Ivy Bridge and Haswell processors).

     
  • Paul
    Paul
    2016-04-22

    It is possible that KeePass attempt to connect to network drives that may not be available and that makes the interface slow at start up. Does the problem exist if you do not select a database to open? (Turn off remember last database under Tools > Options > Advanced, Start and Exit)

    cheers, Paul

     
  • mauromol
    mauromol
    2016-04-22

    I tried right now. It happens all the same.Also, my database is stored in a local directory indeed.

    And even if that were the cause, the actual problem is still that the application should start with a hidden main window to be shown later on (if "start minimized" is unchecked) and not vice-versa (visible, then hide, if "start minimized" is checked).

     
  • mauromol
    mauromol
    2016-04-22

    I just took a small video of the problem:
    https://dl.dropboxusercontent.com/u/55072601/VID_20160422_165428.mp4
    Sorry fot it being upside down, it plays right on the phone :-(

    As you can see, I click on Keepass icon in the start menù and a brief gray splash is shown, it's the Keepass empty main window that pops up for a fraction of second.

     
  • Paul
    Paul
    2016-04-23

    1. Create a new temporary folder, e.g. C:\Temp.
    2. Open Notepad and paste the text below into it. Save it in the temporary folder as KeePass.config.xml.
    3. Copy KeePass.exe into the temporary folder.
    4. Close any existing copies of KeePass.
    5. Run KeePass.exe from the temporary folder by double clicking on it.

    You should see KeePass in the tray, hopefully without popping up first.
    Let us know how it goes.

    cheers, Paul

    <?xml version="1.0" encoding="utf-8"?>
    <Configuration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Meta>
            <PreferUserConfiguration>false</PreferUserConfiguration>
            <OmitItemsWithDefaultValues>true</OmitItemsWithDefaultValues>
        </Meta>
        <Application>
            <Start>
                <CheckForUpdate>false</CheckForUpdate>
                <CheckForUpdateConfigured>true</CheckForUpdateConfigured>
                <MinimizedAndLocked>true</MinimizedAndLocked>
            </Start>
            <FileOpening />
            <FileClosing />
        </Application>
        <Logging />
        <Security>
            <WorkspaceLocking>
                <LockAfterTime>0</LockAfterTime>
                <LockAfterGlobalTime>0</LockAfterGlobalTime>
            </WorkspaceLocking>
            <Policy />
            <MasterPassword>
                <MinimumLength>0</MinimumLength>
                <MinimumQuality>0</MinimumQuality>
            </MasterPassword>
        </Security>
        <Native />
    </Configuration>
    
     
    • zeromido
      zeromido
      2016-04-23

      Hmm.. Now it's minimizing to taskbar instead, and there's a flash seen in the background. Maybe try using another code to minimize to tray.
      Regards

       
      Last edit: zeromido 2016-04-23
1 2 > >> (Page 1 of 2)