SUMMARY When the remote MySQL database is inaccessible, Digikam takes several minutes to boot before it displays an error because of the inaccessible database. During this time, the startup splash screen does not display and there is no indication that the program has started which can cause the user to attempt to start the program again and result in multiple instances of Digikam being started. STEPS TO REPRODUCE 1. Setup digikam with a remote database 2. Shutdown the database server, turn off wifi, or do similar action to prevent a connection to the server 3. Start digikam OBSERVED RESULT Digikam starts, but no splash screen is displayed and it takes 1-2 minutes before the database connection error window appears. EXPECTED RESULT Startup splash should show while it is trying to connect to the database. If possible (I understand practical limitations when it comes to setting the time-out duration for trying to connect to servers), decrease the duration before it times out and displays the error. An alternative would be to open a loading window or display a loading status if the database does not connect within 2 seconds, but before the connection time-out, to inform the user that it is trying to connect to the database. For example: "Failed to connect to database... Retrying for X seconds..."
Created attachment 158176 [details] database-error Such a window already exists, which appears for me after less than 1 second. See the screenshot. Maik
Git commit 75516b571e57fd09beddcaf0606564de7c9f21fe by Maik Qualmann. Committed on 18/04/2023 at 19:41. Pushed by mqualmann into branch 'master'. show database connection error after 10 seconds FIXED-IN: 8.1.0 M +2 -1 NEWS M +11 -0 core/libs/database/engine/dbengineguierrorhandler.cpp https://invent.kde.org/graphics/digikam/commit/75516b571e57fd09beddcaf0606564de7c9f21fe
Created attachment 158199 [details] "Failed to open the database" (Error Window) (In reply to Maik Qualmann from comment #1) > Created attachment 158176 [details] > database-error > > Such a window already exists, which appears for me after less than 1 second. > See the screenshot. > > Maik Thanks for the response. As you pointed out, I was wrong about there not being a reconnecting/loading window. After reproducing the error again, I timed the startup and it took over 2 minutes and 20 seconds before the "reconnecting" window appeared. During this time the startup splash screen was never displayed. After the reconnecting window appears, it continues to attempt to connect to the database for over 20 minutes, only stopping when I pressed the "close" button. After the window closes, nothing happens for 2 minutes (again I timed it) until another "error window" appears (See the screenshot I attached). This new window has an error, instructions to check the database settings in the next window, and an "ok" button to go to the next window. Once the "ok" button is pressed the database settings window immediately opens. The reconnecting window is somewhat misleading because there is no indication to the user that you will be able to change the database settings in a new window after pressing the "close" button. To the user, "close" implies closing the program or window and nothing more. Updated requests: - The database reconnecting window should not take 2 minutes before appearing. - The database reconnecting window should have a second button that takes the user straight to the database settings window and the current close button should close the application without opening the error window or database setting window. - The database loading window should time out after a reasonable duration (if the user does not close it or press the button to skip to the database settings) and then (and only then) present the user with the error window (see attached screenshot). - The error window should not take 2 minutes before appearing Less important, assuming the database loading window appears immediately: - I still believe that the startup splash screen should display earlier (preferably within the first 10 seconds) *no matter what* so that the user knows the application is starting. This could mean fully displaying the startup splash screen before any other startup begins or separating the startup splash screen and other startup code using a non-blocking method such as threads. I can send more details about my system if you can't reproduce the bug where it takes over 2 minutes for the reconnecting and error windows to open.
(In reply to Maik Qualmann from comment #2) > Git commit 75516b571e57fd09beddcaf0606564de7c9f21fe by Maik Qualmann. > Committed on 18/04/2023 at 19:41. > Pushed by mqualmann into branch 'master'. > > show database connection error after 10 seconds > FIXED-IN: 8.1.0 > > M +2 -1 NEWS > M +11 -0 core/libs/database/engine/dbengineguierrorhandler.cpp > > https://invent.kde.org/graphics/digikam/commit/ > 75516b571e57fd09beddcaf0606564de7c9f21fe Thanks for adding a 10-second timeout to display the "reconnecting" dialog (I now know is called the "Progress Dialog"). I apologize, my page did not refresh so I did not see your commit before I posted my previous response. I still have a few requests for changes to the "Progress Dialog" and the error window ("consultUserForError" dialog?). The most important changes are here: - A timeout so the Progress Dialog does not continue to reconnect forever - The "showProgressDialog" and "consultUserForError" dialog take over 2 minutes to appear for me (maybe an issue with my system)