Bug 447449 - I get an error message that api-ms-win-downlevel-kernel32-l2-1-0.dll is not installed
Summary: I get an error message that api-ms-win-downlevel-kernel32-l2-1-0.dll is not i...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: * Unknown (show other bugs)
Version: 5.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 449506 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-12-23 23:25 UTC by cesar
Modified: 2022-03-08 13:08 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cesar 2021-12-23 23:25:27 UTC
I downloaded version 5.0 of krita but when I open it I see that I am missing the file I api-ms-win-downlevel-kernel32-l2-1-0.dll but when I close the window the program opens normally, there is really an error With the program? I cannot update the file because other programs do not work, this did not happen to me with previous versions or with betas 5.0
Comment 1 Alvin Wong 2021-12-24 07:45:22 UTC
Are you using Windows 8.1? If so, try installing UCRT: https://support.microsoft.com/en-us/topic/update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c

Technical information: This may be due to `dbghelp.dll` and `dbgcore.dll` used by DrMingw. We failed to ship `dbgcore.dll` until after beta 5 which would explain why this didn't happen for previous betas...

Though one of the references I can find https://monorail-prod.appspot.com/p/chromium/issues/detail?id=1021650 seems to indicate that this is only an issue with Windows 7 and with the debugging DLLs from 10.0.18362, while the ones we ship are from 10.0.19041. Another source https://stackoverflow.com/questions/65858706/the-program-cant-start-because-api-ms-win-downlevel-kernel32-l2-1-0-dll-is-miss mentions installing update https://www.catalog.update.microsoft.com/Search.aspx?q=KB4507456, which is also for Windows 7.

Mind that we technically don't support Windows 7 any more.

(DrMingw is technically not required so Krita can still function when loading of it fails, however you won't get a backtrace when there is a crash, so its not recommended to run Krita without it.)
Comment 2 amyspark 2022-01-03 23:05:46 UTC
Awaiting info from the reporter to see if they've been able to fix it.
Comment 3 Creatrix 2022-01-08 06:34:59 UTC
I had to download the .dll file seperately and copy it into the Krita bin folder on both versions 5.0.0 and 5.0.2, Windows 7. I only had this error once before on an older version of Krita and some other open source animation programs.
Comment 4 Alvin Wong 2022-01-08 07:06:12 UTC
(In reply to Creatrix from comment #3)
> I had to download the .dll file seperately and copy it into the Krita bin
> folder on both versions 5.0.0 and 5.0.2, Windows 7. I only had this error
> once before on an older version of Krita and some other open source
> animation programs.

Please, *never* download or suggest anyone to download random DLLs from any websites which claims to provide "fixes" to a missing DLL error. You never know if they contain any malicious code, and even if they are legit, you never know if it will cause any hidden compatibility issues.
Comment 5 Alvin Wong 2022-01-08 07:17:30 UTC
If you do have this error on Windows 7, try installing the Windows Update KB4507456 https://www.catalog.update.microsoft.com/Search.aspx?q=KB4507456 instead. But note that *we officially do not support Windows 7* and you also shouldn't be using an outdated OS if it is connected to the Internet.
Comment 6 Creatrix 2022-01-08 07:54:31 UTC
(In reply to Alvin Wong from comment #4)
> (In reply to Creatrix from comment #3)
> > I had to download the .dll file seperately and copy it into the Krita bin
> > folder on both versions 5.0.0 and 5.0.2, Windows 7. I only had this error
> > once before on an older version of Krita and some other open source
> > animation programs.
> 
> Please, *never* download or suggest anyone to download random DLLs from any
> websites which claims to provide "fixes" to a missing DLL error. You never
> know if they contain any malicious code, and even if they are legit, you
> never know if it will cause any hidden compatibility issues.

First of all, I did not suggest (re-read my comment, I am complaining about the fact that I have to go out of my way to fix it instead of it being resolved by developers). I specifically said "I" downloaded. I do understand that there are websites linked to viruses, but you also have to remember that there are internet boffins who know which websites to go to, which programs to use and what to look out for when it comes to malware; we have more experience on the internet and software than normal people since we are glued to the screen 24/7.
Secondly, regarding your comment about installing the windows update; you may remember a while back, the specific KB update had a bug just before they ended windows 7 support which installed the edge browser every time you restart the machine regardless if you uninstalled it.
I do not have funds for a new machine, so I am stuck with a machine that can only run windows 7.
If need be, I will download an older version of Krita and use that until I can fully upgrade my entire setup.
Comment 7 amyspark 2022-01-08 12:29:03 UTC
Marking as NOT A BUG because of an unsupported operating system version.
Comment 8 Creatrix 2022-01-10 03:49:27 UTC
We cannot mark this as resolved, the missing .dll file is missing in the Krita directory, not the windows directory, so it is not that the operating system is not supported. If the .dll file is missing in the program directory then it was never in the file directory with the initial installation of the program, which means that Krita potentially has a virus linked to it, virusses and malware are a main reason as to why .dll files go missing and it usually happens when you install downloaded software from the internet (i.e Krita).
Comment 9 Dmitry Kazakov 2022-01-10 10:31:53 UTC
Hi, Creatrix!

The file must be provided by your operating system, not by Krita. I'm not even sure we can redistribute it inside Krita package from the legal point of view. The file is signed by Microsoft, so one needs a license to do that.

The fact that you can place the file into Krita's directory is explained by the method how Windows loads shared linked libraries. It first looks into the same folder where .exe file is placed, and then in system directories.
Comment 10 amyspark 2022-02-02 16:42:01 UTC
*** Bug 449506 has been marked as a duplicate of this bug. ***
Comment 11 Alvin Wong 2022-03-08 13:08:44 UTC
Git commit 6662e0a0eff7aa1e08d2e6a4e496db9e8c63106c by Alvin Wong.
Committed on 08/03/2022 at 13:07.
Pushed by alvinwong into branch 'master'.

ext_drmingw: Downgrade dbghelp.dll and etc.

The dbghelp.dll, dbgcore.dll and symserv.dll included with the DrMingw
0.9.3 release comes from Debugging Tools 10.0.19041.685, which uses the
api-ms-win-downlevel-kernel32-l2-1-0.dll contract not available on
Windows 7 systems by default.

DrMingw 0.9.2 still came with the ones from 10.0.17763.1, which should
in theory still work on Windows 7 systems. Since we build DrMingw from
source for the mingw-w64 build and use the binary DrMingw releases only
for the Debugging Tools DLLs, this should not affect its functionality.

** Important Notice ** : Windows 7 is _not_ officially supported.

See also: https://github.com/jrfonseca/drmingw/issues/55,
https://github.com/jrfonseca/drmingw/commit/7f8a701861f4aaf4c58250308bb99c5717ac1876

M  +4    -4    3rdparty/ext_drmingw/CMakeLists.txt

https://invent.kde.org/graphics/krita/commit/6662e0a0eff7aa1e08d2e6a4e496db9e8c63106c