Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck with "Configuring project: Saving open files" #522

Closed
jeanga opened this issue Aug 26, 2018 · 27 comments
Closed

Stuck with "Configuring project: Saving open files" #522

jeanga opened this issue Aug 26, 2018 · 27 comments
Labels
bug a bug in the product Feature: configure
Milestone

Comments

@jeanga
Copy link

jeanga commented Aug 26, 2018

Brief Issue Summary

When trying 'any' cmake tools task, I get a notification "Configuring project: Saving open files" open that never closes (needless to say, I have no unsaved open files)

Expected:

Proceed with the task : CMake: Build

Apparent Behavior:

Nothing happens except the notification remaining.

CMake Tools Log

Empty CMake/Build log

Developer Tools Log

Platform and Versions

  • Operating System: Windows 10
  • CMake Version: 3.10.2
  • VSCode Version: 1.26.1
  • CMake Tools Extension Version: 1.1.1
  • Compiler/Toolchain: Visual C++ 2017

Other Notes/Information

PlatformIO is also installed.

@CihanSari
Copy link

In my experience, this happens when some process is running on the background (e.g., VSC) and cmake is literally stuck (waiting for a lock or such?).

Shutting down the new instance of VSC, killing ghost processes and restarting resolves the issue.

@vector-of-bool
Copy link
Contributor

Sorry for the delay.

Hmm... "Saving open files" appears during preparation for running CMake configure, including starting up a new CMake Server instance. It's a bit misleading. It will appear even if no files are open/unsaved. Newer releases should clarify this message.

If you increase the output logging level via settings.json, do you see any messages that help troubleshoot this issue?

@vector-of-bool vector-of-bool added bug a bug in the product more info needed More info is needed from the community for us to properly triage and investigate. labels Sep 17, 2018
@vector-of-bool vector-of-bool added this to the Backlog milestone Sep 17, 2018
@MathiasMagnus
Copy link
Contributor

I have the same issue.

There is no VSC instance running other than the very first one launched after boot. This happens when using VSC inside WSL. Happens whe:

  • both when the default shell is bash and when it's PowerShell.
  • when files are either inside WSL or in my Windows home under /mnt/c/...

This is the extensions log when set to debug:

2018-10-11T14:42:54.185Z [debug] [rollbar] Updated Rollbar payload {"environment":"production","packageJSON":{"name":"cmake-tools","version":"1.1.2"},"client":{"code_version":"1.1.2"},"platform":"linux"}
2018-10-11T14:42:54.268Z [debug] [kit] Reading kits file /home/mnagy/.local/share/CMakeTools/cmake-tools.json
2018-10-11T14:42:54.268Z [debug] [kit] Not reading non-existent kits file: /home/mnagy/Source/FileIO/.vscode/cmake-kits.json
2018-10-11T14:42:54.553Z [info] [kit] Successfully loaded 4 kits from /home/mnagy/.local/share/CMakeTools/cmake-tools.json
2018-10-11T14:42:54.554Z [debug] [main] Safe constructing new CMakeTools instance
2018-10-11T14:42:54.556Z [debug] [variant] Constructing VariantManager
2018-10-11T14:42:54.557Z [debug] [main] Constructing new CMakeTools instance
2018-10-11T14:42:54.558Z [debug] [main] Starting CMakeTools second-phase init
2018-10-11T14:42:54.559Z [debug] [rollbar] Checking Rollbar permissions
2018-10-11T14:42:54.559Z [debug] [rollbar] Rollbar enabled?  true
2018-10-11T14:42:54.579Z [info] [variant] Loaded new set of variants
2018-10-11T14:42:54.582Z [debug] [main] CMakeTools instance initialization complete.
2018-10-11T14:42:54.583Z [debug] [main] Injecting new Kit into CMake driver
2018-10-11T14:42:54.585Z [debug] [kit] Reading kits file /home/mnagy/.local/share/CMakeTools/cmake-tools.json
2018-10-11T14:42:54.609Z [info] [kit] Successfully loaded 4 kits from /home/mnagy/.local/share/CMakeTools/cmake-tools.json
2018-10-11T14:42:54.610Z [debug] [kit] Not reading non-existent kits file: /home/mnagy/Source/FileIO/.vscode/cmake-kits.json
2018-10-11T14:42:54.611Z [debug] [rollbar] Updated Rollbar payload {"kit":{"name":"GCC 7.3.0","compilers":{"CXX":"/usr/bin/g++-7","C":"/usr/bin/gcc-7"}}}
2018-10-11T14:42:54.611Z [debug] [main] Injecting new Kit into CMake driver
2018-10-11T14:42:54.831Z [debug] [extension] Configuring workspace on open  file:///home/mnagy/Source/FileIO
2018-10-11T14:42:54.832Z [debug] [main] Run configure  
2018-10-11T14:42:54.833Z [debug] [main] Saving open files before configure/build
2018-10-11T14:42:54.980Z [debug] [main] Starting new CMake driver
2018-10-11T14:42:54.981Z [debug] [main] Starting CMake driver
2018-10-11T14:42:54.982Z [debug] [driver] CMakeDriver Kit set to GCC 7.3.0
2018-10-11T14:42:54.983Z [debug] [driver] Run _refreshExpansions
2018-10-11T14:42:54.983Z [debug] [cms-driver] Run doRefreshExpansions
2018-10-11T14:42:54.984Z [debug] [driver] Run _refreshExpansions cb
2018-10-11T14:42:55.041Z [debug] [cms-client] Started new CMake Server instance with PID 1730
2018-10-11T14:42:56.045Z [debug] [driver] Trying to detect generator supported by system
2018-10-11T14:42:56.100Z [info] [cms-client] Configuring using the "Ninja" CMake generator
2018-10-11T14:42:56.103Z [debug] [driver] Setting new variant , Emit debug information without performing optimizations
2018-10-11T14:42:56.103Z [debug] [driver] Run _refreshExpansions
2018-10-11T14:42:56.104Z [debug] [cms-driver] Run doRefreshExpansions
2018-10-11T14:42:56.104Z [debug] [driver] Run _refreshExpansions cb
2018-10-11T14:44:11.657Z [debug] [extension] [4407] cmake.viewLog started
2018-10-11T14:44:11.751Z [debug] [extension] [4407] cmake.viewLog finished (returned undefined)
n _refreshExpansions
2018-10-11T14:29:07.654Z [debug] [cms-driver] Run doRefreshExpansions
2018-10-11T14:29:07.655Z [debug] [driver] Run _refreshExpansions cb
2018-10-11T14:30:56.152Z [debug] [extension] Deactivate CMakeTools
XX = /usr/bin/x86_64-linux-gnu-g++-7, C = /usr/bin/x86_64-linux-gnu-gcc-7","kit":{"name":"GCC for x86_64-linux-gnu 7.3.0","compilers":{"CXX":"/usr/bin/x86_64-linux-gnu-g++-7","C":"/usr/bin/x86_64-linux-gnu-gcc-7"}}}
2018-10-11T14:25:33.308Z [debug] [rollbar] Updated Rollbar payload {"kit":{"name":"GCC for x86_64-linux-gnu 7.3.0","compilers":{"CXX":"/usr/bin/x86_64-linux-gnu-g++-7","C":"/usr/bin/x86_64-linux-gnu-gcc-7"}}}
2018-10-11T14:25:33.309Z [debug] [main] Injecting new Kit into CMake driver
2018-10-11T14:25:37.255Z [debug] [extension] [4186] cmake.selectKit started
2018-10-11T14:25:37.256Z [debug] [extension] Start selection of kits. Found 5 kits.
2018-10-11T14:25:37.256Z [debug] [extension] Opening kit selection QuickPick
2018-10-11T14:25:38.159Z [debug] [extension] User selected kit  {"label":"GCC 7.3.0","description":"Using compilers: CXX = /usr/bin/g++-7, C = /usr/bin/gcc-7","kit":{"name":"GCC 7.3.0","compilers":{"CXX":"/usr/bin/g++-7","C":"/usr/bin/gcc-7"}}}
2018-10-11T14:25:38.159Z [debug] [rollbar] Updated Rollbar payload {"kit":{"name":"GCC 7.3.0","compilers":{"CXX":"/usr/bin/g++-7","C":"/usr/bin/gcc-7"}}}
2018-10-11T14:25:38.160Z [debug] [main] Injecting new Kit into CMake driver
2018-10-11T14:25:39.672Z [debug] [extension] Deactivate CMakeTools
: /usr/bin/c99-gcc
2018-07-31T11:41:34.168Z [debug] [kit] Testing GCC-ish binary: /usr/bin/gcc
2018-07-31T11:41:34.212Z [debug] [kit] Testing GCC-ish binary: /usr/bin/gcc-7
2018-07-31T11:41:34.309Z [debug] [kit] Testing GCC-ish binary: /usr/bin/x86_64-linux-gnu-gcc
2018-07-31T11:41:34.355Z [debug] [kit] Testing GCC-ish binary: /usr/bin/x86_64-linux-gnu-gcc-7
2018-07-31T11:41:34.413Z [debug] [kit] Found 0 kits in directory /bin
2018-07-31T11:41:34.413Z [debug] [kit] Found 0 kits in directory /usr/games
2018-07-31T11:41:34.413Z [debug] [kit] Found 0 kits in directory /usr/local/bin
2018-07-31T11:41:34.424Z [debug] [kit] Found 0 kits in directory /sbin
2018-07-31T11:41:34.424Z [debug] [kit] Found 0 kits in directory /usr/local/games
2018-07-31T11:41:34.425Z [debug] [kit] Found 0 kits in directory /mnt/c/Kellekek/Microsoft/MPI/9.0.1/Bin
2018-07-31T11:41:34.431Z [debug] [kit] Found 0 kits in directory /mnt/c/Windows
2018-07-31T11:41:34.432Z [debug] [kit] Found 0 kits in directory /mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common
2018-07-31T11:41:34.434Z [debug] [kit] Found 0 kits in directory /mnt/c/Windows/System32/WindowsPowerShell/v1.0
2018-07-31T11:41:34.436Z [debug] [kit] Found 0 kits in directory /mnt/c/Program Files (x86)/vim/vim80
2018-07-31T11:41:34.480Z [debug] [kit] Found 0 kits in directory /mnt/c/Windows/System32/wbem
2018-07-31T11:41:34.480Z [debug] [kit] Found 0 kits in directory /mnt/c/Windows/System32/OpenSSH
2018-07-31T11:41:34.480Z [debug] [kit] Found 0 kits in directory /mnt/c/Kellekek/Microsoft/Visual Studio/Code/bin
2018-07-31T11:41:34.481Z [debug] [kit] Found 0 kits in directory /mnt/c/Program Files/Git/cmd
2018-07-31T11:41:34.511Z [debug] [kit] Found 0 kits in directory /mnt/c/Program Files/MiKTeX 2.9/miktex/bin/x64
2018-07-31T11:41:34.512Z [debug] [kit] Found 0 kits in directory /mnt/c/Users/mnagy/AppData/Local/Microsoft/WindowsApps
2018-07-31T11:41:34.512Z [debug] [kit] Found 0 kits in directory /mnt/c/Kellekek/Codeplay/ComputeCpp/0.9.1/bin
2018-07-31T11:41:34.514Z [debug] [kit] Found 0 kits in directory /mnt/c/Kellekek/Chocolatey/bin
2018-07-31T11:41:34.522Z [debug] [kit] Found 0 kits in directory /mnt/c/Kellekek/Qt/5.9.2/5.9.2/msvc2017_64/bin
2018-07-31T11:41:34.745Z [debug] [kit] Found 0 kits in directory /mnt/c/Windows/System32
2018-07-31T11:41:34.747Z [debug] [kit] Found 0 kits in directory /mnt/c/Program Files/dotnet
2018-07-31T11:41:34.748Z [debug] [kit] Testing Clang-ish binary: /mnt/c/Kellekek/Codeplay/ComputeCpp/0.9.1/lib/clang
2018-07-31T11:41:34.748Z [debug] [kit] Testing Clang-ish binary: /mnt/c/Kellekek/Codeplay/ComputeCpp/0.9.1/lib/clang
2018-07-31T11:41:34.789Z [warning] [kit] Failed to check binary /mnt/c/Kellekek/Codeplay/ComputeCpp/0.9.1/lib/clang by exception: Error: spawn EACCES
2018-07-31T11:41:34.790Z [debug] [kit] Found 0 kits in directory /mnt/c/Kellekek/Codeplay/ComputeCpp/0.9.1/lib
2018-07-31T11:41:34.795Z [debug] [kit] Detected GCC compiler: /usr/bin/x86_64-linux-gnu-gcc-7
2018-07-31T11:41:34.795Z [debug] [kit] Detected GCC compiler: /usr/bin/x86_64-linux-gnu-gcc
2018-07-31T11:41:34.795Z [debug] [kit] Detected GCC compiler: /usr/bin/gcc-7
2018-07-31T11:41:34.796Z [debug] [kit] Detected GCC compiler: /usr/bin/gcc
2018-07-31T11:41:34.796Z [debug] [kit] Detected GCC compiler: /usr/bin/c99-gcc
2018-07-31T11:41:34.796Z [debug] [kit] Detected GCC compiler: /usr/bin/c89-gcc
2018-07-31T11:41:34.899Z [debug] [kit] Found 6 kits in directory /usr/bin
2018-07-31T11:41:34.900Z [info] [kit] Found Kit: GCC for c89 7.3.0
2018-07-31T11:41:34.900Z [info] [kit] Found Kit: GCC for c99 7.3.0
2018-07-31T11:41:34.900Z [info] [kit] Found Kit: GCC 7.3.0
2018-07-31T11:41:34.900Z [info] [kit] Found Kit: GCC 7.3.0
2018-07-31T11:41:34.901Z [info] [kit] Found Kit: GCC for x86_64-linux-gnu 7.3.0
2018-07-31T11:41:34.901Z [info] [kit] Found Kit: GCC for x86_64-linux-gnu 7.3.0
2018-07-31T11:41:34.902Z [debug] [extension] Saving kits to /home/mnagy/.local/share/CMakeTools/cmake-tools.json
2018-07-31T11:41:34.902Z [debug] [extension] Saving new kits to /home/mnagy/.local/share/CMakeTools/cmake-tools.json
2018-07-31T11:41:34.908Z [debug] [extension] Opening kit selection QuickPick
2018-07-31T11:41:36.376Z [debug] [extension] User cancelled Kit selection
2018-07-31T11:41:43.041Z [debug] [extension] [7054] cmake.selectKit started
2018-07-31T11:41:43.041Z [debug] [extension] Start selection of kits. Found 5 kits.
2018-07-31T11:41:43.041Z [debug] [extension] Opening kit selection QuickPick
2018-07-31T11:42:25.765Z [debug] [extension] User selected kit  {"label":"GCC 7.3.0","description":"Using compilers: CXX = /usr/bin/g++-7, C = /usr/bin/gcc-7","kit":{"name":"GCC 7.3.0","compilers":{"CXX":"/usr/bin/g++-7","C":"/usr/bin/gcc-7"}}}
2018-07-31T11:42:25.766Z [debug] [rollbar] Updated Rollbar payload {"kit":{"name":"GCC 7.3.0","compilers":{"CXX":"/usr/bin/g++-7","C":"/usr/bin/gcc-7"}}}
2018-07-31T11:42:25.767Z [debug] [main] Injecting new Kit into CMake driver
2018-07-31T11:42:25.768Z [debug] [extension] [7054] cmake.selectKit finished (returned true)
2018-07-31T11:42:31.402Z [debug] [extension] [9002] cmake.setDefaultTarget started
2018-07-31T11:42:31.620Z [debug] [main] Starting new CMake driver
2018-07-31T11:42:31.621Z [debug] [main] Starting CMake driver
2018-07-31T11:42:31.622Z [debug] [driver] CMakeDriver Kit set to GCC 7.3.0
2018-07-31T11:42:31.623Z [debug] [driver] Run _refreshExpansions
2018-07-31T11:42:31.623Z [debug] [cms-driver] Run doRefreshExpansions
2018-07-31T11:42:31.623Z [debug] [driver] Run _refreshExpansions cb
2018-07-31T11:42:31.673Z [debug] [cms-client] Started new CMake Server instance with PID 628
2018-07-31T11:42:32.677Z [debug] [driver] Trying to detect generator supported by system
2018-07-31T11:42:32.732Z [info] [cms-client] Configuring using the "Ninja" CMake generator
2018-07-31T11:42:32.736Z [debug] [driver] Setting new variant , Emit debug information without performing optimizations
2018-07-31T11:42:32.736Z [debug] [driver] Run _refreshExpansions
2018-07-31T11:42:32.736Z [debug] [cms-driver] Run doRefreshExpansions
2018-07-31T11:42:32.737Z [debug] [driver] Run _refreshExpansions cb
2018-07-31T11:42:43.150Z [debug] [extension] [4875] cmake.build started
2018-07-31T11:42:43.151Z [debug] [main] Run build 
2018-07-31T11:42:57.231Z [debug] [extension] [2749] cmake.build started
2018-07-31T11:42:57.231Z [debug] [main] Run build 
2018-07-31T11:42:58.312Z [debug] [extension] [4584] cmake.setDefaultTarget started
2018-07-31T11:43:12.208Z [debug] [extension] [7660] cmake.setVariant started
2018-07-31T11:43:14.226Z [debug] [main] Active build variant changed
2018-07-31T11:43:14.228Z [debug] [main] Run configure  
2018-07-31T11:43:14.228Z [debug] [main] Saving open files before configure/build
2018-07-31T11:43:53.809Z [debug] [extension] Deactivate CMakeTools

@MathiasMagnus
Copy link
Contributor

Is there anything else we can do to help debug this issue?

@vector-of-bool
Copy link
Contributor

Sorry for the delay (again).

Without being able to reproduce the issue, I can't do much.

As for debugging it, you could literally attach a debugger via the devtools. Set a breakpoint around the offending message and see what happens?

@MathiasMagnus
Copy link
Contributor

@vector-of-bool I would gladly help with this, but I have absolutely no idea how to do it without a jump start guide. I open the devtools and I have no idea where to go.
2019-01-24
How do I literally attach the debugger? How do I place breakpoints? How will I see stack traces? Do I need one VS Code instance or two? (One triggering the issue, the other housing the debug tools.) Apologies for being dumb, but I am a native dev, never done any web/JS/TS development.

(I think this is a general issue: many communities who would be interested in having VS Code extensions don't have the skills to cook them up. I would love to see a CodeXL extension, but the entire process is just alien.)

@joaovbs96
Copy link

joaovbs96 commented Mar 4, 2019

I had this issue as well and, apparently, I just managed to solve it by disabling 'Configure On Open'. On my case, it only ever appeared when I started/restarted the workspace and CMake tried to configure itself automatically.

@MathiasMagnus
Copy link
Contributor

I recently installed Windows 10 1809 (finally the update succeeded) which naturally has new WSL tweaks. Anyhow, I still got Configure On Open set up, and things are working as expected now. As far as I am concerned, the issue may be closed, thought @jeanga might also want to comment.

@daldr-ntml
Copy link

I also see this issue. I'm using Windows 1803.

Rebooted PC so that no other processes running.
Started VS Code, saw the problem.
Closed VS Code.
Deleted Build folder.
Started VS Code.
Popup says "Would you like to configure this project?"
Answered "Yes".
Popup says "Configuring project: Saving open files" and never goes away.

CMake/Build output window shows:

[main] Starting new CMake driver
[main] Starting CMake driver
[driver] CMakeDriver Kit set to Visual Studio Professional 2017 - x86_amd64
[kit] OK running C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat x86_amd64, env vars:[["CL",""],["_CL_",""],["INCLUDE","C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\include;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\include;C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\include\\um;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\shared;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\um;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\winrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\cppwinrt"],["LIBPATH","C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\lib\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\lib\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\lib\\x86\\store\\references;C:\\Program Files (x86)\\Windows Kits\\10\\UnionMetadata\\10.0.17763.0;C:\\Program Files (x86)\\Windows Kits\\10\\References\\10.0.17763.0;C:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319;"],["LINK",""],["_LINK_",""],["LIB","C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\lib\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\lib\\x64;C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\lib\\um\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\um\\x64;"],["PATH","C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\VC\\VCPackages;C:\\Program Files (x86)\\Microsoft SDKs\\TypeScript\\3.1;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\MSBuild\\15.0\\bin\\Roslyn;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Team Tools\\Performance Tools\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Team Tools\\Performance Tools;C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Common\\VSPerfCollectionTools\\\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Common\\VSPerfCollectionTools\\;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.1 Tools\\;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.17763.0\\x86;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x86;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\\\MSBuild\\15.0\\bin;C:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\Tools\\;C:/TI/xdctools_3_25_02_70;C:\\Program Files\\SlickEdit Pro 21.0.3\\win\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\iCLS\\;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\iCLS\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files (x86)\\Enterprise Vault\\EVClient\\;C:\\Program Files\\MATLAB\\R2018b\\bin;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files\\CMake\\bin;C:\\Users\\daldrich\\AppData\\Local\\Programs\\Python\\Python37\\Scripts\\;C:\\Users\\daldrich\\AppData\\Local\\Programs\\Python\\Python37\\;C:\\Users\\daldrich\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\daldrich\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\bin;C:\\SVNProj\\zodiac\\trunk\\StarLibs\\LinkSim\\NR\\Athena\\xfft_v9_1_bitacc_cmodel_nt64;;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\Ninja"],["TMP","C:\\Users\\daldrich\\AppData\\Local\\Temp"],["FRAMEWORKDIR","C:\\WINDOWS\\Microsoft.NET\\Framework\\"],["FRAMEWORKDIR64","C:\\WINDOWS\\Microsoft.NET\\Framework64"],["FRAMEWORKVERSION","v4.0.30319"],["FRAMEWORKVERSION64","v4.0.30319"],["UCRTCONTEXTROOT",""],["UCRTVERSION","10.0.17763.0"],["UNIVERSALCRTSDKDIR","C:\\Program Files (x86)\\Windows Kits\\10\\"],["VCINSTALLDIR","C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\"],["VCTARGETSPATH",""],["WINDOWSLIBPATH","C:\\Program Files (x86)\\Windows Kits\\10\\UnionMetadata\\10.0.17763.0;C:\\Program Files (x86)\\Windows Kits\\10\\References\\10.0.17763.0"],["WINDOWSSDKDIR","C:\\Program Files (x86)\\Windows Kits\\10\\"],["WINDOWSSDKLIBVERSION","10.0.17763.0\\"],["WINDOWSSDKVERSION","10.0.17763.0\\"],["VISUALSTUDIOVERSION","15.0"]]
[driver] Run _refreshExpansions
[cms-driver] Run doRefreshExpansions
[driver] Run _refreshExpansions cb
[cms-client] Started new CMake Server instance with PID 6004

@daldr-ntml
Copy link

I fixed my instance of this problem by executing command:

CMake: Reset CMake Tools extension state

@jeanga
Copy link
Author

jeanga commented Jun 18, 2019

Ok to close this issue. I could not reproduce with a recent version of the tools.

@daldr-ntml
Copy link

I have seen the problem in the last couple of days but I can't give a recipe to reproduce it.

@shyaan
Copy link

shyaan commented Aug 7, 2019

I am facing the same issue. Stuck with Configuring project: Saving open files.

@sean-mcmanus
Copy link
Contributor

I repro this symptom 100% when I open the same folder in another VS Code instance (or VS Code and VS Code Insiders)...not sure if it's a different issue or not.

@MathiasMagnus
Copy link
Contributor

@sean-mcmanus I think there may be multiple issues separately at play here. Having multiple instances of VS Code on the same folder sounds like another way to have multiple cmake-servers handling the same folder. Sometimes I do catch VS Code running in the background long after I close the window, and I've found that the cmake-server instance the extension spawned fails to shutdown and keeps the IDE process alive. Naturally, this is the warmbed of opening another instance onto the same folder.

However with a previous Windows version (1803?) I could 100% repro the issue on a brand new folder inside WSL. mkdir something && code ./something, issue a Cmake: Quick Start command and it predictably hit this error.

@DreamWaterFound
Copy link

I have the same issue for about one year, and I found a temporary solution:

Set "Cmake:Generator" with Unix Makefiles (for my OS).

But it may only work on my computer.

how I try to solve the problem

This problem existed on my computer for long time, but, in the past, it can be solved by restarting vs-code after deleting the build folder. Unfortunately, this operation lost efficacy after I updated the vscode. I also tried the suggestions above, but none of them can work.

Today I tried restore default settings, and then set CMake:Logging Level to trace. When I try to build my project with cmake-tools, some messages was displayed in OUTPUT window:

[kit] Reading kits file /home/guoqing/.local/share/CMakeTools/cmake-tools-kits.json
[kit] Not reading non-existent kits file: /home/guoqing/SLAM/GQ/ToySLAM/.vscode/cmake-kits.json
[kit] Successfully loaded 4 kits from /home/guoqing/.local/share/CMakeTools/cmake-tools-kits.json
[main] Safe constructing new CMakeTools instance
[variant] Constructing VariantManager
[main] Constructing new CMakeTools instance
[main] Starting CMakeTools second-phase init
[variant] Loaded new set of variants
[main] CMakeTools instance initialization complete.
[kit] Reading kits file /home/guoqing/.local/share/CMakeTools/cmake-tools-kits.json
[kit] Successfully loaded 4 kits from /home/guoqing/.local/share/CMakeTools/cmake-tools-kits.json
[kit] Not reading non-existent kits file: /home/guoqing/SLAM/GQ/ToySLAM/.vscode/cmake-kits.json
[extension] [5696] cmake.build started
[extension] Start selection of kits. Found 5 kits.
[extension] Opening kit selection QuickPick
[extension] User selected kit {"label":"[Unspecified]","description":"Unspecified (Let CMake guess what compilers and environment to use)","kit":{"name":"__unspec__"}}
[main] Injecting new Kit into CMake driver
[main] Run build 
[main] Starting new CMake driver
[main] Starting CMake driver
[driver] CMakeDriver Kit set to __unspec__
[driver] Trying to detect generator supported by system

Then the process was stucked. I found the string Trying to detect generator supported by system in here, and this line inspired me to change Cmake:Generator. After I changed the setting, this problem seems solved.

I was worried that my expression was not clear, so I recorded a GIF of the operation:

a

I hope that the information I provide can help you to solve this issue. 😂

Platform and Versions

OS version: Ubuntu 16.04
VSCode version: 1.40.1
cmake-tools version: 1.2.2
cmake version: 3.10.0
gcc/g++ version: 7.4.0

@KoeMai KoeMai mentioned this issue Dec 1, 2019
@bobbrow bobbrow added IMPORTANT and removed more info needed More info is needed from the community for us to properly triage and investigate. labels Apr 6, 2020
@bobbrow bobbrow modified the milestones: Backlog, 1.4.0 Apr 6, 2020
@bobbrow
Copy link
Member

bobbrow commented Apr 6, 2020

Now that the extension activates on the existence of CMakeLists.txt anywhere in the folder, this is easier to repro. It actually repros on this very repo now.

@bobbrow
Copy link
Member

bobbrow commented Apr 8, 2020

The repro on our folder is a different case.

@bobbrow bobbrow modified the milestones: 1.4.0, Backlog Apr 8, 2020
@bobbrow bobbrow removed the IMPORTANT label Apr 8, 2020
@bobbrow
Copy link
Member

bobbrow commented Apr 8, 2020

You can also try using the "cmake.cmakeCommunicationMode": "fileApi" setting (requires CMake 3.14.6 or newer) to workaround the issue.

@makidoll
Copy link

makidoll commented Jun 6, 2020

I'm dealing with this issue on a large code base. It suddenly started happening and I'm not able to fix it. E.g. restarting computer, removing git ignored files, changing communication mode. Configuring CMake takes a while because it has to download dependencies too and without a log, I don't know if it's actually working.

Edit: Removing the build folder fixed it. Maybe it got stuck reading something in there.

@andreeis
Copy link
Contributor

andreeis commented Jun 8, 2020

Just to have as many clues as possible when we get to fixing this.
"It suddenly started happening" - did you upgrade to CMake Tools 1.4.0, or that's not what happened between when it worked and when it didn't?
Can you give us all info about generator and kit settings that you have?
cmake.preferreGenerators and/or cmake.generator in settings?
preferredGenerator in kits json?
what kit is active?

@realisim
Copy link

Ran into the same issue...
stuck on "Saving open files before configure/build"

strangely, I opened CmakeGui.exe and re-generated on the same folder than the one in VsCode and it unfreezes vscode everytime...

If that can help troubleshoot...

@OliverHaag
Copy link

Had the same issue. In my case it was caused by me setting the installation directory to be below the build directory ("cmake.installPrefix": "${command:cmake.buildDirectory}/package"). Maybe this helps tracking it down, probably this caused some circular dependency?

@mderouss
Copy link

mderouss commented Apr 3, 2021

Yep, I think I have this problem. I'm using Ubuntu 20.04.2 LTS, cmake version 3.16.3, gcc 9.3.0, VS Code 1.55 . There appear to be numerous ways of getting the stuck 'Saving open files' dialog. I've pretty much given up on the CMake extension because of this.
I have a workspace with some sources in it. There are no existing CMake files. I want to set up CMake. I have installed the 'CMake tools' extension.
I start VS Code with no open files whatsoever - I am shown the welcome page, and explorer shows my project workspace and the sources in it. No other copies of VS Code are running.
There's a CMake icon in the toolbar on the left, but when I open it it shows an empty 'Project outline'.
From the command palette, I select CMake: Configure
I say 'No' to the 'always run configure on open' option
I get two stuck 'Saving open files' dialogs,
I can clear these dialogs by selecting one and hitting 'Escape', but then I get no CMake configuration, so essentially the extension just doesn't work.

@andreeis
Copy link
Contributor

andreeis commented Apr 5, 2021

@mderouss, can you hard code the paths in the settings? Just to see if any variable use in the settings is causing this circular dependency. See the pattern that @OliverHaag is using above and avoid it. We will investigate and address this "Saving open files" hang. We already fixed one scenario of this for 1.7 but I don't think it's what you are hitting.
In order for us to have as many repro scenarios as possible, it would help if you confirm what happens if you change your settings and if using no variables in settings doesn't help then maybe you can share your project entirely?

@mderouss
Copy link

mderouss commented Apr 5, 2021 via email

@bobbrow
Copy link
Member

bobbrow commented Apr 27, 2021

I believe we fixed this in 1.7.0. If you continue to hit this issue, please let us know.

@bobbrow bobbrow closed this as completed Apr 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: configure
Projects
None yet
Development

No branches or pull requests