How to enable the Window Error Reporting (WER) dialog. Total newbie question - winqual

After setting up WinQual and WER for the first time, I intentionally inserted a crash in a release build expecting\hoping to get the WER dialogue but instead still get the dialogue containing "runtime error! The application has requested the runtime to terminate in an unusual way...".
Everything seems to be working correctly regarding the setup of WinQual (along with all the supporting symbol server, source server,WinQual account, submitted mapping files and verified their presence my WinQual account). Now I want to verify that dump files are created, submitted to WinQual and I can retrieve them for debugging.
I verified that my PC's (XP Pro SP3) error reporting is enabled (system properties-error reporting). I figured the hard part would be setting up everything above not getting the program to actually show the WER dialogue. Is there some modification to the exe or the PC needed?

It's good to know I may not be (completely) crazy. You're right that external issues were causing problems for the WER dialogue.
I changed the crash to the code above, just in case my version was too brutal, and ran the application on three machines and it appears that the presence of Visual Studio and/or just-in-time debugging, on XP and Win7, was affecting the WER dialogue. For anyone interested this is what I saw:
XP with Visual Studio. Asked to choose a debugger and if I chose No, the program exited without the WER dialogue.
XP without Visual Studio. Displayed WER dialogue and sent the error report (yeah).
Win7 with Visual Studio. Did not crash at all.
Win7 without Visual Studio. I have not tested yet but suspect it will behave correctly.
So as you implied, a combination of the crashing code and unrepresentative testing environment were thwarting my test.
Thanks so much!

If you are using a WinForms application there is a catch handler in it's event loop that pops up a dialog and prevents Windows Error Reporting (WER) from kicking in.
This call prevents this from happening.
(http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/176b7f8c-3efb-4e6f-8deb-c685c62629db/)
The magic line to fix:
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);

There shouldn't be anything you need to do in the application to get it working. I suspect you've somehow managed to crash in some strange way that is not working too well with WER. Try adding a crash once the application has initialised, rather than during application startup (if that is what you're doing). I usually do something like this:
int* p=0;
*p=1;
Another possibility is that your machine isn't going to give you the same results as an end user because of the Just In Time debugger of Visual Studio, so try it on a typical end-user machine. A further possibility is that your machine is XP and WER support was at an early stage in XP and is better in Vista and Win7, so try crashing the app on a newer machine.

Related

Unable to start VSCode; suggestions for debugging?

I'm working on a disconnected network, so some options are a bit limited. Also, we have SAs who handle stuff like system updates (so, for instance, it is possible that there was a system update in there that I know nothing about).
However, I had 1.33.1, then 1.34.0, then 1.38 versions of VSCode working on my (Windows 10) machine. One day, for no apparent reason (I hadn't just installed something, for instance), 1.38 stopped working. It wouldn't even start up. Running 'Code --verbose' from the command line produced no output (the mouse cursor turned briefly to a spinner, but nothing even showed up in Task Manager, let alone something like a splash screen).
I did get an error message in the Application log, which included the lines (more or less; remember, no cut-n-paste possible):
Faulting Application Code.exe, version: 1.38.0
Faulting module ntdll.dll, version 10.0.16299.936
Exception code: 0xc0000374
Faulting Application path: c:\Program Files\Microsoft VS Code\Code.exe
Faulting module path: c:\Windows\System32\ntdll.dll
Re-installing VS Code (with or without system restart after uninstall) did nothing.
Removing all extensions (we have a bunch) did nothing
Installing 1.39.2 did nothing
The only good thing is that I can still run 1.34.0, if I reinstall that (did not try 1.33.1, and I don't have any in-between versions from 1.34 to 1.38 to try). So at least I'm not completely shut out.
I also tried deleting basically all of workspaceStorage, to no effect. Nor did renaming my storage.json.
The biggest weirdness, to me, is that the path to ntdll.dll is in System32, rather than in SysWOW64 (is there some way to force usage of the latter?). Second, why did 1.38.0 work just fine for a while, and then stop.
So, I'm curious if anyone else has seen this problem, and/or if anyone has any idea what else could be done to get more insight into what's causing this.
(edit: I plan to file bug for VSCode, but been waiting on confirmation email to finish creating my github acct for some time now. sigh)
I've had exactly the same problem twice. I'd been running the application since June 2019 and then in March of this year, Yep! Exact same problem as you encountered. A simple reinstall fixed that, but I've had the same problem again today and after some investigation, Windows 10 was telling me that I didn't have the right permissions to access the item (this is using the Owner's account!). Attempting to reinstall failed, with errors stating that the file / directory all ready existed and couldn't be overwritten or renamed. Attempting to un-install the application was only partially successful with the executable code.exe still remaining afterwards. The only way I managed fix it this time was to reinstall to a directory with a different name. Surprisingly though, all the existing workspaces, projects and extensions even were intact and the application opened where I had left off as though nothing had happened. This is a little worrying I have to say! But that's how I fixed it this time.

Is there a way to retrieve user settings from a corrupt VS Code?

I have Visual Studio Code 1.27.2 on Windows 10.
Background:
Recently there was an issue in the system not related to VS, and I had to run system repair which seems to have messed up with the settings of various programs, including VS.
Current situation:
Now when I open VS I get this:
title bar of VS with 'Unsupported' at the end
warning: "Your Code installation appears to be corrupt. Please reinstall."
According to the official FAQ, this can be due to fishy extensions. But this seems unlikely given that the last extension I installed was more than a week before this incident, and more importantly because of the system-wide settings shake-up.
Main issue:
When I try to access settings directly, I get another strange error:
warning: "Unable to open 'User Settings': e.replace is not a function (2 errors in total)."
This function didn't look familiar so I looked it up and it was in the doxygen code, which has not changed for weeks, so also don't think this is the real issue.
I tried the suggestions here but there was nothing found in my folders.
I plan on re-installing in all cases. It's not the end of the world if the settings are gone, but it would be great to ensure they are saved because I spent a lot of trial and error customizing them.

Powerbuilder application crashes on citrix environment

I am new to citrix env.
When i run a PB application on Citrix environment, for a particular screen PB appl gets crashed without any error for the particulat screen. If I check the same in PB spource it is working fine. I dont know why it is happening.
Can you help me?
The multi-monitor hooks are the most common cause of unexpected behaviour on Citrix servers. So try adding an exception into the registry for your application to disable Citrix multi-monitor hooking to see if that helps. The following article describes how to do this:
http://support.citrix.com/article/CTX129712
Edit: for further ideas.
If disabling the MM hooks doesn't help, the only other thing I can think of is to check what DLLs are loaded in the process when it crashes. Check the stack dump you get from your crash and look at all the loaded DLLs, e.g. using Windbg to inspect your dump you can use the following commands:
http://windbg.info/doc/1-common-cmds.html#10_modules
Look for any Citrix DLLs loaded in the process space. You can then look for those files in the file system and temporarily rename them to hide them (so they won't get loaded into your process). Note: most Citrix DLLs live in C:\Program Files (x86)\Citrix\system32.
If that doesn't help all I can suggest is putting debugging tools on a Citrix server and debugging the app.

The process cannot access the file because it is being used by another process

I ask this Question because it is Moles specific.
Running VS2010 on Windows 7 64bit the VsHost of moles stays in the task manager, causing this message:
Unable to copy file
The process cannot access the file because it is being used by another process
Solution: Kill the Process Microsoft.Moles.VsHost.x86.exe in the Task-Manager
To do this very often is very very annoying. I read in the msdn social forum that this issue shall be fixe sometime (i recall the post was from 2010 but cant find the post).
This happens nearly every time I stop the Debugging of the Test or if there is an Error while Debugging.
Anything new about this Issue?
I very much hope that Moles will be a standard part of Visual Studio someday, because I like this Typemocking very much!

Runtime Error in Visual Simulation Environment - Microsoft Robotics Studio

I am using Microsoft Robotics Studio for a school project and I am getting a strange error when I try to run the Visual Simulation Environment. It was working fine until yesterday and then suddenly it gave me a runtime error saying "Illegal command line arguments... do not use VPLHost directly, use dsshost instead to run a manifest" But I am only clicking on Run in VPL/DSS Manifest editor.
I am running MRDS as administrator and I even tried re-installing MRDS but it is still showing the same MS VPL Runtime error. I tried to search online, but cannot find any suitable solution.
I already tried running the existing samples, I.e. Urban Environment, Multiple Simulated Robots etc. but it still gives me the same error. The strange thing is that it was working perfectly one minute, and then started giving me this error message the next minute, when I had not changed anything in between. In fact, I had wanted to change something in my manifest, so I closed the running VPL application, closed VPL and opened DSS manifest editor, and ran my manifest and that is when I got this error.
What is going wrong? Is some MRDS script using vplhost32.exe instead of dsshost? If so, then where and how do I change it?
I tried running the urban envrionment manifest from the command prompt and Using DSSHost32 directly. This time, it didn't give me a runtime error but an intiialization error. I tried changing port numbers but it still doesn't work. I have deleted many files from my computer to free space (JIC) and it still doesn't work. The window just doesn't open even when I hover over it in Windows 7.
The error message looks like this: Only one usage of each socket address (protocol/network address/port) is normally permitted."
This was even after I checked netstat for free ports and tried but I get this error message. Its either this one or the "Don't use VPLHost directly" if I run it through VPL or DSS Manifest Editor.
Could it be that some external services are interfering with DSSHost/VPLHost? Are there any such services which I could try killing? ANY help/suggestion would help right now as my project is due Thursday and this is a really unfortunate time for it to be acting up like this.
Does the problem reproduce after logging off & logging back on? It's likely that you had a process hanging around that you weren't aware of. Logging off should shut down any processes you personally started.
I don't know the solution of your problem, but it would be better that you post your question on the link below:
http://p2p.wrox.com/book-professional-microsoft-robotics-studio-isbn-978-0-470-14107-6-410/
[official forum for the book : Professional Microsoft Robotics Studio], i hope you will shortly get reply there,
The other option is to post your question on the msdn forum,
http://social.msdn.microsoft.com/Forums/en-US/category/robotics
hope this would help....