Open TurkeyMan opened 3 months ago
It kept complaining about a particular variable in scope... that struct had a union, and an alias this, i thought maybe it was too complicated, so i worked through and simplified the struct to test, and then when i removed basically everything from the struct, it stopped complaining about that struct, and locked up saying it was evaluating this
instead, and I couldn't easily do the same process there... but it was weird to note that it complained about one thing, and when I eliminated it, it just complained about something else.
Now after fixing a bug in my code, the problem is gone, and it doesn't hang anymore...
So sadly, I have no idea where it got caught or why... but this sort of thing does seem to happen quite a bit :/
Running the dmd frontend on code that is just being edited can cause it to go into some bad loops like recursive template instantiations that it might not recover from well. Maybe there are also new globals that are not cleared by the reinitialization that keep pointers to GC managed memory. I will have to check that...
There is an option to restart the semantic engine if a memory threshold is reached (Tools->Options->Text Editor->D->Intellisense->restart parsing engine), maybe it helps to keep the excessive memory usage in check. It doesn't restart the process, though, just wipes all cached analysis, so it might still suffer from (false) references into the GC.
Hmm, well between each episode I had to kill Visual Studio and restart the whole thing; it wasn't enough to kill the DMD server for VS to recover... I had to go nuclear every time. It was super weird, just this one scope if I hit a breakpoint it was over, even after crashes and restarts... and now it's just gone. I can't reproduce it anymore. I have no idea what changed.
Do we know what causes this? It happens semi-regularly, but I haven't worked out what it is... it seems that maybe evaluating a particular expression that it doesn't like causes this.