Bug 470391 - Cannot uninstall or update Nightly build
Summary: Cannot uninstall or update Nightly build
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Bundle-Windows (other bugs)
Version First Reported In: 8.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-29 04:03 UTC by Judah Richardson
Modified: 2023-11-26 02:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.2.0
Sentry Crash Report:


Attachments
Installer error message. (5.93 KB, image/png)
2023-05-29 04:03 UTC, Judah Richardson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Judah Richardson 2023-05-29 04:03:45 UTC
Created attachment 159307 [details]
Installer error message.

SUMMARY
***

When trying to uninstall or update the nightly Win64 build from https://binary-factory.kde.org/view/Windows%2064-bit/job/Digikam_Nightly_win64/, I get the error `You have C:Program Files\bin\digikam.exe running in C:\Program Files\digikam. Select "Yes" to kill the process(es), "No" to retry or "Cancel" to quit.`

I checked Task Manager and no such process is running. I also tried renaming the `digikam.exe` files in the installation folder, to no effect. 

***


STEPS TO REPRODUCE
1. Assuming you already have a nightly build installed, launch the installer for a subsequent version
2. Choose to install digikam for everyone on this computer
3. Click "Next"

OBSERVED RESULT

Error message described above appears.

EXPECTED RESULT

digikam installs completely.

SOFTWARE/OS VERSIONS
Windows:  10 64-bit
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 caulier.gilles 2023-05-29 07:15:58 UTC
Run the Windows tasks manager and kill all digikam.exe and exiftool.exe which still in background.

Gilles Caulier
Comment 2 caulier.gilles 2023-05-29 08:05:43 UTC
Also look if it's not a duplicates of bug 437813.

Gilles Caulier
Comment 3 Maik Qualmann 2023-05-29 10:19:10 UTC
I can confirm with the nightly build, it doesn't happen on every Windows OS. The cause is not a running digiKam process. The error message also appears with a freshly restarted Windows. I have always deleted the directory manually.

Maik
Comment 4 Maik Qualmann 2023-05-29 10:21:55 UTC
OT: I added Breeze as a dependency to the nightly build. But I definitely don't have a start button to start the build.

Maik
Comment 5 caulier.gilles 2023-05-29 10:47:45 UTC
Ha, we talk about the Windows installer build with MSVC on the KDE infra...

Maik, after to be logged to the binary factory, the start build link on the left sidebar is here. I just start a new one.

Gilles
Comment 6 caulier.gilles 2023-05-29 10:49:41 UTC
It do not compile due to low level deps :

12:47:47  *** Action: compile for libs/cyrus-sasl ***
12:47:47  executing command: "C:\Craft\BinaryFactory\windows-msvc2019_64-cl\dev-utils\bin\cmake.exe" -G Ninja  -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON   -DSTATIC_LIBRARY=OFF -DCMAKE_INSTALL_PREFIX=C:/Craft/BinaryFactory/windows-msvc2019_64-cl -DCMAKE_PREFIX_PATH=C:/Craft/BinaryFactory/windows-msvc2019_64-cl -DCMAKE_REQUIRED_INCLUDES=C:/Craft/BinaryFactory/windows-msvc2019_64-cl/include -DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES=C:/Craft/BinaryFactory/windows-msvc2019_64-cl/include -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -S C:\_\ffe6cf44\cyrus-sasl-2.1.28
12:47:47  CMake Error: The source directory "C:/_/ffe6cf44/cyrus-sasl-2.1.28" does not appear to contain CMakeLists.txt.
12:47:47  Specify --help for usage, or press the help button on the CMake GUI.

Gilles
Comment 7 Maik Qualmann 2023-05-29 18:19:03 UTC
I filled out a sysadmin ticket, Ben gave me the rights. I started a new build...

Maik
Comment 8 Judah Richardson 2023-05-29 18:33:38 UTC
(In reply to caulier.gilles from comment #1)
> Run the Windows tasks manager and kill all digikam.exe and exiftool.exe
> which still in background.
> 
> Gilles Caulier

I actually couldn't find digikam.exe anywhere in Task Manager. I had to use Process Explorer (https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer) to find it. Anyway, once I found it and killed it (it took 3 consecutive kill commands) I was able to uninstall and install as normal.

I'd highly suggest digiKam *not* keep running in the background by default after exiting. Is there some way to change this behavior, or is it a bug?
Comment 9 caulier.gilles 2023-05-31 02:30:22 UTC
*** Bug 431063 has been marked as a duplicate of this bug. ***
Comment 10 caulier.gilles 2023-05-31 03:07:24 UTC
@Judah Richardson

Are you sure to need to use process-explorer for that. The process tab from the task manager do not allows to see the defective process which still in background ? 

https://superuser.com/a/268234

Gilles Caulier
Comment 11 Judah Richardson 2023-05-31 03:20:22 UTC
(In reply to caulier.gilles from comment #10)
> @Judah Richardson
> 
> Are you sure to need to use process-explorer for that. The process tab from
> the task manager do not allows to see the defective process which still in
> background ? 
> 
> https://superuser.com/a/268234
> 
> Gilles Caulier

Neither digikam.exe nor exiftool.exe have ever never shown up in Task Manager whenever I look for them there, so I use Process Explorer 🤷‍♂️
Comment 12 Judah Richardson 2023-05-31 03:21:51 UTC
(In reply to Judah Richardson from comment #11)
> (In reply to caulier.gilles from comment #10)
> > @Judah Richardson
> > 
> > Are you sure to need to use process-explorer for that. The process tab from
> > the task manager do not allows to see the defective process which still in
> > background ? 
> > 
> > https://superuser.com/a/268234
> > 
> > Gilles Caulier
> 
> Neither digikam.exe nor exiftool.exe have ever never shown up in Task
> Manager whenever I look for them there, so I use Process Explorer 🤷‍♂️

*have ever shown up in
Comment 13 caulier.gilles 2023-05-31 05:31:07 UTC
Maik,

Do you know why a zombie process under Windows will not visible in Process Manager and appears in Process Explorer freeware ? It's a question of right, as admin only can see this kind of executable on the system ?

Judah,

Windows provides a CLI tool named tasklist:

https://superuser.com/questions/914782/how-do-you-list-all-processes-on-the-command-line-in-windows

Do you seen the same results than Process explorer with this command line tool ?

Gilles Caulier
Comment 14 Judah Richardson 2023-05-31 14:02:10 UTC
(In reply to caulier.gilles from comment #13)
> Maik,
> 
> Do you know why a zombie process under Windows will not visible in Process
> Manager and appears in Process Explorer freeware ? It's a question of right,
> as admin only can see this kind of executable on the system ?
> 
> Judah,
> 
> Windows provides a CLI tool named tasklist:
> 
> https://superuser.com/questions/914782/how-do-you-list-all-processes-on-the-
> command-line-in-windows
> 
> Do you seen the same results than Process explorer with this command line
> tool ?
> 
> Gilles Caulier

Gilles: thanks for the information. I don't have the time in the near term to test tasklist. Process Explorer is a GUI tool provided by Microsoft & is much easier to use. In any case, me testing would not address the issue that digiKam on Windows leaves orphaned processes running after the user closes the application.
Comment 15 Judah Richardson 2023-06-22 17:41:14 UTC
(In reply to caulier.gilles from comment #10)
> @Judah Richardson
> 
> Are you sure to need to use process-explorer for that. The process tab from
> the task manager do not allows to see the defective process which still in
> background ? 
> 
> https://superuser.com/a/268234
> 
> Gilles Caulier

I tried this just now while trying to uninstall the Nightly build I installed in this bug https://bugs.kde.org/show_bug.cgi?id=471310

Unfortunately it doesn't work, as even though `tasklist | more`  shows digikam.exe on PID 284, `taskkill /f /pid 284` give the following error:

ERROR: The process with PID 284 could not be terminated.
Reason: There is no running instance of the task.

So the solution here is definitely to stop digiKam from leaving orphan processes after being closed.
Comment 16 Judah Richardson 2023-06-22 17:44:57 UTC
Process Explorer to the rescue again. It appears that whatever the orphan processes are, they are difficult to find. Process Explorer requires at least 2 attempts per orphan process to kill it.
Comment 17 caulier.gilles 2023-10-15 03:38:37 UTC
@Judah,

This problem still reproducible with the new digiKam 8.2.0 pre-release Windows
installer available at usual place:

https://files.kde.org/digikam/

This new bundle is based on last Qt framework 5.15.11 and KDE framework 5.110.

Thanks in advance

Gilles Caulier
Comment 18 Judah Richardson 2023-10-15 21:53:24 UTC
@Gilles:

Thanks for your efforts to fix this. Unfortunately this build suffers from the UAC installation failure bug (https://bugs.kde.org/show_bug.cgi?id=464084). Do the signed Nightly builds contain the fix? I may be able to test that (can't guarantee a timeline).
Comment 19 caulier.gilles 2023-10-16 03:01:41 UTC
Hi Judah

No, the MXE based installer still not signed (cross compiled under Linux). Only the installer from the KDE binary factory is compiled under Windows and is signed with Microsoft tools.

Gilles Caulier
Comment 20 Judah Richardson 2023-10-16 03:03:21 UTC
OK. Well, the signed Win64 builds are the only ones I can test because they're the only ones I can install at all 🙃
Comment 21 caulier.gilles 2023-11-20 15:09:17 UTC
Judah,

Please try the new Windows installer 8.2.0 pre-release build under Windows with VCPKG toolchain and MSVC. This one is not cross compiled :

https://files.kde.org/digikam/

Gilles Caulier
Comment 22 Judah Richardson 2023-11-22 03:18:05 UTC
(In reply to caulier.gilles from comment #21)
> Judah,
> 
> Please try the new Windows installer 8.2.0 pre-release build under Windows
> with VCPKG toolchain and MSVC. This one is not cross compiled :
> 
> https://files.kde.org/digikam/
> 
> Gilles Caulier

Well, some progress in this one: I actually did get past the UAC prompt to the installer. However, it suffers from the orphan process bug too, and this time I can't find any way to get around it. After killing all the rogue digiKam processes as described previously (the installer's kill option doesn't work, just as before), I get an error message saying:

"You have C:\Program Files\digiKam\uninstall.exe running in C:\Program Files\digiKam. Select "Yes" to kill the process(es), "No" to retry or "Cancel" to quit."

Clicking "Yes" dumps the installer back to digiKam 8.2.0 initial setup dialog, where clicking "Yes" presents the error message above all over again. Killing the rogue uninstall.exe process above doesn't fix or change any of the above.

As before, I had to use Process Explorer to kill the rogue processes. I'm still confused as to how/why digiKam leaves orphan processes after exit 🤷‍♂️

So, in summary: different variation of the same problem, with the same result.
Comment 23 caulier.gilles 2023-11-24 06:54:13 UTC
Hi,

The only process orphaned when digiKam crash due to dysfunction is exiftool.exe and the QtWebEngineProcess.exe. The first one must be killed by the installer, the second one not yet. I will fix it. At least

The old orphaned processes sound come from the cross compiled version wich is deprecated now. The new application installer is a native Windows 10 version now.

So, killing all digiKam stuff with the Windows process manager must be enough. Here i never faced this kind of problem under Windows 10.

To be clear i recommend :

1/ To uninstall properly digiKam from Windows control panel / Application section. Thi include to kill exiftool.exe and QtWebEngineProcess.exe
2/ To install the 8.2.0 pre-release from Windows.
3/ Wait some days. We recompile and publish online the pre-release installer every day.
4/ Start digiKam and go to Help/Check for new version menu. If a new installer is available online, this must stop properly the current digiKam session and start the installer after downloading file.

Best

Gilles Caulier
Comment 24 caulier.gilles 2023-11-24 06:57:49 UTC
Git commit f020c209d8e3ae1c2bf0d2e41eaf26250b10e8eb by Gilles Caulier.
Committed on 24/11/2023 at 07:56.
Pushed by cgilles into branch 'master'.

VCPKG/MSVC/Qt6 installer for Windows: if QtWebEngineProcess.exe process still orphaned, kill all instance to prevent blocking install

M  +4    -2    project/bundles/vcpkg/installer/digikam.nsi

https://invent.kde.org/graphics/digikam/-/commit/f020c209d8e3ae1c2bf0d2e41eaf26250b10e8eb
Comment 25 Judah Richardson 2023-11-24 08:12:58 UTC
(In reply to caulier.gilles from comment #23)
> Hi,
> 
> The only process orphaned when digiKam crash due to dysfunction is
> exiftool.exe and the QtWebEngineProcess.exe. The first one must be killed by
> the installer, the second one not yet. I will fix it. At least
> 
> The old orphaned processes sound come from the cross compiled version wich
> is deprecated now. The new application installer is a native Windows 10
> version now.
> 
> So, killing all digiKam stuff with the Windows process manager must be
> enough. Here i never faced this kind of problem under Windows 10.
> 
> To be clear i recommend :
> 
> 1/ To uninstall properly digiKam from Windows control panel / Application
> section. Thi include to kill exiftool.exe and QtWebEngineProcess.exe
> 2/ To install the 8.2.0 pre-release from Windows.
> 3/ Wait some days. We recompile and publish online the pre-release installer
> every day.
> 4/ Start digiKam and go to Help/Check for new version menu. If a new
> installer is available online, this must stop properly the current digiKam
> session and start the installer after downloading file.
> 
> Best
> 
> Gilles Caulier

Thanks! Let me know when the new version with the fix you mentioned is available. I'll try again then.
Comment 26 caulier.gilles 2023-11-24 16:47:58 UTC
@Judah,

The new Windows digiKam 8.2.0 pre-release installer is online :

https://files.kde.org/digikam/

Gilles
Comment 27 Judah Richardson 2023-11-25 04:53:08 UTC
The latest installer seems to be tripping over itself. I get the same error message before, but Process Explorer shows that the offending C:\Program Files\digiKam\uninstall.exe process being started by the installer.

So basically the installer starts a process, then complains it can't proceed because that process is running. 

Anyway, after experiencing the above, I uninstalled the existing instance and ran the new installer. It completed successfully.
Comment 28 caulier.gilles 2023-11-25 07:43:22 UTC
Judah,

With the current build for Windows dating from 2 days ago, i run the Check For Update function. It found a more recent version published 1 day ago as expected. I Download and Install it. No problem occurs.

This morning i will publish another one as usual. When it will published, try again to see if problem remain on your computer.

Best

Gilles Caulier
Comment 29 caulier.gilles 2023-11-25 09:15:08 UTC
Judah,

The new Windows installer is online. You can process the Check for Update by now.

Best

Gilles Caulier
Comment 30 Judah Richardson 2023-11-26 02:24:21 UTC
(In reply to caulier.gilles from comment #29)
> Judah,
> 
> The new Windows installer is online. You can process the Check for Update by
> now.
> 
> Best
> 
> Gilles Caulier

Tried it just now and it worked flawlessly. Thanks very much!