Samsung / netcoredbg

NetCoreDbg is a managed code debugger with MI interface for CoreCLR.
MIT License
743 stars 98 forks source link

`Assertion failed: !read_lock` when building from source #160

Open GniLudio opened 5 months ago

GniLudio commented 5 months ago

When I try to debug after building from source, I get the following error:

Assertion failed: !read_lock, file C:\Users\user\Documents\netcoredbg\src\utils\ioredirect.cpp, line 404

When I use the latest release it works fine, but when building from source I get the error. (I tried building from latest and release commit)

Running

C:\Users\user\Documents>./netcoredbg\bin\netcoredbg.exe --interpreter=cli
ncdb> file dotnet
ncdb> set args HelloCS1/bin/Debug/net8.0/HelloCS1.dll
ncdb> run
Assertion failed: !read_lock, file C:\Users\user\Documents\netcoredbg\src\utils\ioredirect.cpp, line 404

Building

git clone https://github.com/Samsung/netcoredbg.git
cd netcoredbg
md build
cd build
cmake .. -G "Visual Studio 17 2022" -DCMAKE_INSTALL_PREFIX="..\bin"
cmake --build . --target install

Logs & Files

viewizard commented 5 months ago

We also faced with terminal-related (CLI related) issues in debugger work on Windows in case it build with latest MSVS 2022 versions. Probably, also related to this issue. Our current releases builts with MSVS 2022 version 17.6.5 (Visual C++ 2022 00482-90000-00000-AA708):

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.36.32537.0
-- The CXX compiler identification is MSVC 19.36.32537.0

Looks like some compiler/libs changes in MSVC, that should be investigated in future. Unfortunately, I could propose only try to roll back MSVS to previous version, we have a lot of work now and will not fix/investigate this issue in near future for sure.

GniLudio commented 5 months ago

Using MSVS 2022 version 17.6.5 still had the same problem. Changing the Windows SDK to 10.0.19041.0 solved it for me.

viewizard commented 5 months ago

Interesting, thanks for the info.