drmemory icon indicating copy to clipboard operation
drmemory copied to clipboard

Failed to load library: ucrtbase.dll: library initializer failed..

Open NTT1906 opened this issue 1 year ago • 7 comments

Describe the bug [Failed to load library: ucrtbase.dll](ucrtbase.dll: library initializer failed..>)

<Application D:\clion\OOP\svg-rendering\svg_rendering.exe (6892). Unable to load client library: ucrtbase.dll: library initializer failed..>
~~Dr.M~~ WARNING: unable to locate results file: can't open C:\Users\nttis\AppData\Roaming\Dr. Memory/resfile.6892 (code=2).
Dr. Memory failed to start the target application, perhaps due to
interference from invasive security software.
Try disabling other software or running in a virtual machine.
~~Dr.M~~ WARNING: application exited with abnormal code 0xffffffff

To Reproduce Steps to reproduce the behavior:

  1. Use drmemory with an x64 executable
  2. Get error Please also answer these questions drawn from https://drmemory.org/page_help.html#sec_narrow :
  • Does the problem go away when running in light mode (pass -light to Dr. Memory)?

No

  • Does the problem go away when running with the options -leaks_only -no_count_leaks -no_track_allocs?

No

  • Does the problem go away when running under plain DynamoRIO? Do this by running dynamorio/bin32/drrun -- <application and args> or dynamorio/bin64/drrun -- <application and args> depending on the bitwidth of your applicaiton. (Ignore warnings about "incomplete installation".)

Cannot find dynamorio/bin32/drrun

  • What happens with the debug version of Dr. Memory and of its underlying engine DynamoRIO? Try this by passing -debug -dr_debug -pause_at_assert. Are any messages reported?
<Starting application d:\clion\OOP\svg-rendering\svg_rendering.exe (18324)>
<Running on newer-than-this-build "Microsoft Windows 10-2009 x64">
<Early threads found>
<Initial options = -no_dynamic_options -logdir 'C:\Users\nttis\AppData\Roaming\Dr. Memory\dynamorio' -client_lib 'C:\Program Files (x86)\Dr. Memory\bin64\debug\drmemorylib.dll;0;`-pause_at_assert` -logdir `C:\Users\nttis\AppData\Roaming\Dr. Memory` -symcache_dir `C:\Users\nttis\AppData\Roaming\Dr. Memory\symcache` -lib_blocklist_default `C:\WINDOWS*.d??,C:\Program Files\Common Files\Microsoft Shared*.d??,C:\Program Files (x86)\Common Files\Microsoft Shared*.d??` -resfile 18324 ' -client_lib64 'C:\Program Files (x86)\Dr. Memory\bin64\debug\drmemorylib.dll;0;`-pause_at_assert` -logdir `C:\Users\nttis\AppData\Roaming\Dr. Memory` -symcache_dir `C:\Users\nttis\AppData\Roaming\Dr. Memory\symcache` -lib_blocklist_default `C:\WINDOWS*.d??,C:\Program Files\Common Files\Microsoft Shared*.d??,C:\Program Files (x86)\Common Files\Microsoft Shared*.d??` -resfile 18324 ' -code_api -probe_api -stack_size 56K -disable_traces -no_enable_traces -max_elide_jmp 0 -max_elide_call 0 -no_shared_traces -bb_ibl_targets -bb_single_restore_prefix -no_shared_trace_ibl_routine -no_enable_reset -no_reset_at_switch_to_os_at_vmm_limit -reset_at_vmm_percent_free_limit 0 -no_reset_at_vmm_full -reset_at_commit_free_limit 0B -reset_every_nth_pending 0 -vm_size 256M -no_early_inject -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct >
<Application d:\clion\OOP\svg-rendering\svg_rendering.exe (18324). Unable to load client library: ucrtbase.dll: library initializer failed..>
~~Dr.M~~ WARNING: unable to locate results file: can't open C:\Users\nttis\AppData\Roaming\Dr. Memory/resfile.18324 (code=2).
Dr. Memory failed to start the target application, perhaps due to
interference from invasive security software.
Try disabling other software or running in a virtual machine.
~~Dr.M~~ WARNING: application exited with abnormal code 0xffffffff

Expected behavior Running normally

Screenshots or Pasted Text If applicable, add screenshots to help explain your problem. For text, please cut and paste the text here, delimited by lines consisting of three backtics to render it verbatim, like this:

```

~~Dr.M~~ WARNING: unable to locate results file: can't open C:\Users\nttis\AppData\Roaming\Dr. Memory/resfile.6892 (code=2).
Dr. Memory failed to start the target application, perhaps due to
interference from invasive security software.
Try disabling other software or running in a virtual machine.
~~Dr.M~~ WARNING: application exited with abnormal code 0xffffffff
```

Versions

  • What version of Dr. Memory are you using?

Dr. Memory version 2.6.0 -- build 0

  • Does the latest build from https://drmemory.org/page_download.html#sec_latest_build solve the problem?

My build is the latest build

  • What operating system version are you running on? ("Windows 10" is not sufficient: give the release number.)
  • Is your application 32-bit or 64-bit?

64bit Additional context Add any other context about the problem here.

NTT1906 avatar Nov 20 '24 15:11 NTT1906

Encountering the same issue. Currently using the latest build, running on Windows 11 Pro version 24H2 for a 64bit application compiled with visual studio 2022 version 17.11.4. Managed to run the application with dynamorio/bin64/drrun. Other options listed at https://drmemory.org/page_help.html#sec_narrow wont work.

Julioalbornozv avatar Dec 03 '24 19:12 Julioalbornozv

Did you manage to get drmemory to work?

Wemmons831 avatar Jan 24 '25 23:01 Wemmons831

Having same issue with builds with mingw and visual studio 2022. It was working fine until the last windows update. I have completely disabled virus protection. This will not execute.

deviantbit avatar Feb 01 '25 01:02 deviantbit

Same problem (Windows 11 Pro 10.0.26100; 64-bit application compiled with x86_64-w64-mingw32-gcc 11.3.1). Running directly via dynamorio\bin64\drrun.exe works.

hiszpanski avatar Feb 12 '25 04:02 hiszpanski

Same error happening for me. When I manually try dynamorio\bin64\drrun.exe I don't get the error, but nothing happens and my app doesn't run.

Windows 11 Pro 10.0.26100. App compiled with MSVC 19.43.34808.0

thehugwizard avatar Feb 17 '25 14:02 thehugwizard

any news?

NTT1906 avatar Jun 14 '25 03:06 NTT1906

(also watching likely dup #2539 and possible dup #2551.)

chriskushmonotype avatar Jun 18 '25 16:06 chriskushmonotype

Updating version from 2.6.0 to 2.6.2 fixed this error but got an internal error instead

ghost avatar Jul 07 '25 16:07 ghost

Encountered the same issue today with a fresh install of 2.6.0 on Windows 11. Same issue downgrading to 2.5.0.

https://drmemory.org/page_help.html#sec_narrow only DynamoRIO ran successfully. No luck generating ldmp files.

TyBalduf avatar Oct 08 '25 19:10 TyBalduf