ITADN

Hitting an assertion in AST.cpp

#776Closed30350n 创建于 2026-01-15
bug
3
30350ncommented
**Describe the bug** Nixd is crashing ""randomly"". **Logs (Required)** ``` ... I[12:57:51.150] 33608: <-- workspace/didChangeWatchedFiles I[12:57:51.150] 33608: unhandled notification workspace/didChangeWatchedFiles I[12:57:51.424] 33608: <-- reply(1) I[12:57:51.424] 33608: --> notify $/progress I[12:57:51.689] 33608: <-- textDocument/hover(12) nixd: ../lib/Controller/AST.cpp:84: void {anonymous}::getValueAttrPath(const nixf::Node&, const nixf::ParentMapAnalysis&, std::vector<std::__cxx11::basic_string<char> >&): Assertion `false && "must have corresbonding value"' failed. [Error - 12:57:53 PM] The Nix server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information. [Error - 12:57:53 PM] Server process exited with signal SIGABRT. ``` **Configuration** ```json "nix.serverPath": "/nix/store/gp2s8h0k9czq3i0c1fg5vxx8niqqr8xn-nixd-2.8.1/bin/nixd", "nix.serverSettings": { "nixd": { "formatting": { "command": [ "/nix/store/w0n5bcnkzrg012sba15lwh71659dvkbk-alejandra/bin/alejandra", "-qq" ] }, "options": { "home-manager": { "expr": "(builtins.getFlake \"/etc/nixos/\").nixosConfigurations.desktop.options.home-manager.users.type.getSubOptions []" }, "nixos": { "expr": "(builtins.getFlake \"/etc/nixos/\").nixosConfigurations.desktop.options" } } } }, ``` **To Reproduce** Hard to tell, happens somewhat randomly (but a lot) when I hover random things in my config. The `nixos/home-manager` attributes defined take somewhat long to evaluate so maybe this is related to them no being loaded in time? Not sure. **Expected behavior** The assertion shouldn't ever be hit in normal operation I guess? **Screenshots** \- **Additional context** \-
关闭于 2026-02-06 5 条评论