DynamoRIO / drmemory

Memory Debugger for Windows, Linux, Mac, and Android
Other
2.46k stars 263 forks source link

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

Open NTT1906 opened 1 week ago

NTT1906 commented 1 week ago

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

Julioalbornozv commented 16 hours ago

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.