-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
VisualD having many bugs since upgrading #263
Comments
Sorry to hear that Visual D no longer works for you. VS 2022 is the first 64-bit version of Visual Studio, maybe something didn't migrate too well. Some notes:
I cannot reproduce. Can you provide crash dumps?
See #240 (comment). Should be supported in next release.
The mago debug engine is a 32-bit service that doesn't run in VS 2022 anymore. Please switch to native or mixed debugger. The mago expression evaluator is still available in these engines as an extension. If the language server dmdserver.exe crashes, you should find crash dumps in %LOCALAPPDATA%\CrashDumps. These might help in figuring out issues. |
FILE_IN_CAB: devenv.exe.217476.dmp NTGLOBALFLAG: 0 PROCESS_BAM_CURRENT_THROTTLED: 0 PROCESS_BAM_PREVIOUS_THROTTLED: 0 APPLICATION_VERIFIER_FLAGS: 0 CONTEXT: (.ecxr) EXCEPTION_RECORD: (.exr -1) PROCESS_NAME: devenv.exe WRITE_ADDRESS: 0000000000000024 ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. EXCEPTION_CODE_STR: c0000005 EXCEPTION_PARAMETER1: 0000000000000001 EXCEPTION_PARAMETER2: 0000000000000024 STACK_TEXT: SYMBOL_NAME: visuald+25a001 MODULE_NAME: VisualD IMAGE_NAME: VisualD.dll STACK_COMMAND: ~149s; .ecxr ; kb FAILURE_BUCKET_ID: NULL_CLASS_PTR_WRITE_c0000005_VisualD.dll!Unknown After upgrading to latest beta this crash happens regularly but not always. Also now VS just opens D project then quits most of the time. I still have the same issues and Visual D is nearly unusable except for compiling and editing(no debugging or executing). |
Here is a snip of the crash dumb for a dmdserver.dmp FILE_IN_CAB: dmdserver.exe.23784.dmp NTGLOBALFLAG: 0 APPLICATION_VERIFIER_FLAGS: 0 CONTEXT: (.ecxr) EXCEPTION_RECORD: (.exr -1) PROCESS_NAME: dmdserver.exe READ_ADDRESS: ffffffffffffffff ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. EXCEPTION_CODE_STR: c0000005 EXCEPTION_PARAMETER1: 0000000000000000 EXCEPTION_PARAMETER2: ffffffffffffffff ADDITIONAL_DEBUG_TEXT: Enable Pageheap/AutoVerifer ; Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD] FAULTING_THREAD: 00005cb0 STACK_TEXT: STACK_COMMAND: ** Pseudo Context ** ManagedPseudo ** Value: ffffffff ** ; kb SYMBOL_NAME: heap_corruption!dmdserver.exe MODULE_NAME: heap_corruption IMAGE_NAME: heap_corruption FAILURE_BUCKET_ID: HEAP_CORRUPTION_c0000005_heap_corruption!dmdserver.exe OS_VERSION: 10.0.22621.1 dmdserver routinely crashes. I have no intellisense in visualD either(I think it crashes dmdserver and it pops up a abort retry cancel dialog in the background. If I try to run an app in I get the error I stated before about accessing 0. Maybe they are all related to the same bug but likely not. |
Thanks for trying again. Can you upload the dmp files so I can load them into a debugger with debug symbols? You can also try it with the pdb files that you can find along side the release: https://github.com/dlang/visuald/releases/download/v1.4.0-beta2/visuald-symbols-1.4.0-beta2.zip |
Rainers: I will work on debugging it. I wonder if you could perchance write a tutorial (video?) in setting up VisualD with Visual Studio and how you go about debugging using issues? I'm not that familiar with WinDbg(I used to use debug.com a long time ago but I haven't done much programming lately). The tutorial wouldn't just be a one off so much be more effective in the long run. It wouldn't need to be in great detail. Maybe as you are fixing bugs you can record audio and video and then do a little setup tutorial(obviously you don't have to walk through basic stuff line how to install VisualD and such) and hit some key points. It might seem like a lot of work but it would probably pay off in the long run(more people contributing to patches). For example, I've downloaded the symbols(I went ahead and just put them in the VisualD dir) but it didn't help with WinDbg as it doesn't seem to be loading them(I tried various things like adding directories, copying, symfix, etc). |
Thanks for trying to debug visuald yourself. I very rarely use WinDbg for debugging, but just Visual Studio itself, though it's a bit more complicated to setup if visuald doesn't work at all. There is some description of building and starting a debug environment at https://rainers.github.io/visuald/visuald/BuildFromSource.html, but unfortunately it has become a bit outdated. I will try to update that page soon. I can have a look at crash dumps in the meantime if you just attach them here to this issue. |
I recently noticed a crash in the debugger and fixed it. Please try https://github.com/dlang/visuald/releases/tag/v1.4.0-rc1 |
Ok, I saw in other thread about the 'load debug symbols in external process'. Disabling that setting and that error did not pop up so I was able to get to the set BP. I haven't tested it behind that but that seems to be the core issue. I think I set that setting a while back likely around the time when the problem started. I do not recall the specifics. It might have had something to do with Visual D/D or I was trying to debug some dumps for something else and was told to enable that. I just noticed that if I have a BP in a collapsed code block the BP icon(red disk) does not show on the parent line. It makes it difficult to find BP's without hoops. E.g., there seems to be no check to see if the BP is being visually collapsed and then changing the line it is on visually. E.g., Having some indicator that BP is inside the collapsed block which might be better. E.g., a Red circle with a number inside containing the number of BP's inside the collapsed block. Thanks for the work! |
Recently I upgraded Visual Studio 2022 to latest(I didn't upgrade for several months) and upgraded VisualD too (everything to latest).
Ever since I've been having major issues.
Literally this is the program causing the problem:
import std.stdio;
int main()
{
return 0;
}
with a BP on the return. The crash only happens when the BP exists.
VS sometimes just crashes when opening a project. This seems to be related to intellisense as it also crashes when I try to use intellisense. Intellisense is broken completely as it never returns anything. Well, maybe sometimes it works but I don't use it any more because of the crashing.
I get this error:
Error errors in imported modules: Error: C:\D\dmd\src\phobos\std\range\package.d(1028): => shortened method not enabled, compile with compiler switch
-preview=shortenedMethods
...I've added those to the command line in options but it does nothing. I do not get that error in x86 just x64. I lied, it is now happening in x86. [I changed to mago debugger and it started happening but not sure if it's actually connected]
VisualD has become unusable because of these. I had no problems with it before. All I can do is write code and execute it outside VS and use console printing to try and debug.
VisualStudio.17.Release/17.7.5+34202.233
Microsoft .NET Framework Version 4.8.09032
Visual D 1.3.1
Integration of the D Programming Language into Visual Studio
I just updated to Visual D 1.4 beta and same issue as 1. With the update and setting to x64:
cannot launch debugger on
C:\Temp\test.exe
hr = 89710016
This is mago related(because I had it set to it before) so changing to mixed mode works. Of course setting BP causes error.
This was a new project so all the settings should be the default project settings.
I'm not really sure what is going on or how to provide any more useful information. Again, everything was working fine until I updated VS.
I also constantly get this "Microsoft Visual C++ runtime library" error dialog that says:
Program C:\Program Files (x86)\visualD\dmdserver.exe
HEAP CORRUPTION DETECTED: after Normal Block (#xxxxx) at xxxxxx.
CRT detected that the application wrote to memory after end of heap buffer.
It constantly pops up once it gets going(may be related to intellisense)
The text was updated successfully, but these errors were encountered: