How to debug/investigate issues with YouCompleteMe for Windows - windows

UPDATE
This question seeks help with tooling - "how do I debug my problem." As I type this, there has been no answers. I did end up stumbling on the solution for the actual problem I was trying to solve and have provided the solution as an answer.
I still would be more than happy to hear any answers on the tooling question though, and if somebody comes up with a workable answer, I'll be more than happy to transfer the checkmark
Original Question
I initially opened an issue with YouCompleteMe https://github.com/Valloric/YouCompleteMe at https://github.com/Valloric/YouCompleteMe/issues/1345. It immediately got closed because there's no official support for Windows. Ok, fine.
I'm now asking the Stackoverflow community, hopefully there are people who are messing with YCM for Windows (there is a "unofficial YCM for Windows" page, so there MUST be SOMEBODY hacking on this thing).
Below is the original content of the issue that I opened.
If somebody actually has an answer that works, great! At this point, I'm looking more for procedures that I can use to run the YCM server under a debugger to see where exactly it's choking
I'm trying to get YCM to work on my Windows 7 machine. I have a few
other XP, Win7, Win8 machines that have no problems with YCM. I've
tried building the support stuff using MinGW, Visual Studio 2010, both
on the target machine as well as the other machines where I have YCM
working.
When I open a Python or C++ file, a message immediately appears that
YCM has crashed and I should restart with :YcmRestartServer. It
mentions that I should set g:ycm_server_keep_logfiles in order to see
the log messages. I have done that, but I still don't have any
logfiles and the "set g:ycm_server_keep_logfiles" message is still
appearing.
I also get ('Connection aborted.', error(10061, 'No connection could
be made because the target machine actively refused it'))
I looked in python\ycm\youcompleteme.py and saw that the "logfiles
deleted" message comes up because of an exception in trying to open
the file specified by self._server_stderr (IOError). Right now I'm
suspecting that this is because the server never actually gets far
enough in its startup sequence to actually create the stdout and
stderr files.
What are the steps that I could do to investigate why the server (?)
fails to start properly.
I also had a vague idea that there was a firewall rule blocking
connections, I looked through Windows Firewall, but didn't really see
anything that would point to localhost connections being blocked or
whatnot.
I'm okay with doing debugging, would appreciate advice on the
procedure that I would need to do in order to get Visual Studio 2010
to step into the server process and poke around stuff.
Oh, dunno if this factoid means anything, but I'm able to use
Rip-Rip's clang_complete without issues, but I would very much rather
use YCM.

I never really did get an answer or solution to the central question of "how do I debug YCM under Windows" but I did solve the underlying problem of why YCM wasn't working for me, so for posterity (and other fellow despairing YCM users who may end up here via Google)
For me, YCM immediately crashed and burned. I figured the problem out by seeing a Windows system that had been working fine for me start exhibiting the symptoms.
The change: I had installed Python 3.x and switched it to being the system preferred python (by messing with paths, what do you expect with Windows?).
As it turns out (duh), YCM depends on Python 2.x and falls over when it can't find any of the libraries that it was trying to open.
I started going down the path of trying to locate exactly what the files YCM was trying to access and provide them locally in the YCM directory, but after spending five minutes on it, I decided that I wanted something simpler.
Since I still wanted Python 3.x to be the 'system' version, I settled for manipulating the path WITHIN Vim, so I added this before the YCM load,
if (has('win32') || has('win64'))
let $PATH = 'C:\Python27;' . $PATH
endif
Hope that this saves somebody else some pain

Related

What is causing an access denied on executable MobaSCPRinew.exe when using MobaXterm on Windows

I've been a happy user of MobaXterm for years, this is a great terminal and X-window manager on Windows to access Linux machine and others. Recently, possibly since I upgraded to Windows 11 or changed laptop, I sometimes get the following error window:
An error occurred while starting the following MobaXterm subprocess:
"%APPDATA%\MobaXterm\slash\bin\MobaSCPRinew.exe"
Access is denied
I could not figure out which action is triggering this error but it is pretty rare and seems to happen either when I switch from one tab to another or when I unlock my computer after a while but I can't reproduce it systematically. I'm using MobaXterm Personal Edition v22.0 Build 4858.
This executable exists on my system and the file properties mention that this is a "Command-line SCP/SFTP client". However, even after the error, the SSH Browser available in the side bar (provided you only show one tab) is still visible and working.
Does anybody know what could be causing this?
Thanks
[EDIT]
I contacted the support of MobaXterm:
they told me it is a known bug related to the "Remote Monitoring" feature, which can display stats about memory, disk usage, connected users,...
advised me to test the preview version 22.2 since the bug seems fixed in that release
I used it for a few days and the issue never happened. I will download the latest official release 22.1 and, if it happens also in that one, will wait for the official 22.2. I will close this issue once the bug is fixed in an official release.
Same issue here, with some slight differences:
Location seems to be the "Documents" folder of my "Onedrive":
E:\OneDrive - xyz\Documents\MobaXterm\slash\bin\MobaSCPRinew.exe"
I use the "professional edition" with the same license ID, so I suppose technically it is the same software.
Issue only popped up till now after a reboot of my system, launching the MobaXterm and subsequently starting an ssh session.
Restarting MobaXterm only (once) didn't produce the issue.
I now upgraded to 22.1. Since the release notes do not mention anything concerning this issue, I can't know for sure the problem will be solved. I'll report back when it reoccurs.
Johan

Installing Oracle form and got an error. Cannot launch the installer (555)

Oracle form downloaded at:
http://www.oracle.com/technetwork/developer-tools/forms/downloads/index.html
When I ran the file setup_fmw_12.2.1.3.0_fr_win64.exe,
it gave me an error "Cannot launch the installer (555)".
fmw_12.2.1.3.0_fr_win64_Disk1_2of2 <-- Folder
setup_fmw_12.2.1.3.0_fr_win64-2.zip
fmw_12.2.1.3.0_fr_win64_Disk1_1of2 <-- Folder
setup_fmw_12.2.1.3.0_fr_win64.exe
Even though this relates to the installation of a developer tool, most would consider this particular type of question as generally off topic for stackoverflow. Your question also contains too little information to determine what the problem really is.
However, let's just mention some obvious things to see if it helps you solve your own problem:
Did you try the setup on another computer (or a virtual machine). This could be a good way to avoid the whole problem rather than spending a lot of time trying to fix it.
Did you locate any log files for the failed install?
A quick look seems to indicate that you can find log files at: %SystemDrive%\Program Files\Oracle\Inventory\logs (%SystemDrive% is normally C:\).
Or %SystemDrive%\Program Files (x86)\Oracle\Inventory\logs for 32bit installers on 64 bit systems).
Found in the troubleshoot section here - have a look yourself too - read from the top.
And the most obvious of all: did you contact Oracle support or search their user community or knowledge bases? Somebody will have seen this problem before. Looks like you need to register: https://support.oracle.com/
A quick search reveals that the Oracle Universal Installer is a Java based installer. Could Java be broken on the box you install on? (looks like the launcher should install the runtime automatically, but this could fail due to special conditions on the box. Try on a clean virtual machine). How to check whether java is installed on the computer.
Try disabling your anti-virus as well before running the setup on the problem box. Some setups even try to access the Internet during installation, and then your firewall could be a problem too. I would hate to turn that off though.

VB6 application causes install to show up

I got a weird problem with my VB app that has got me very confused. I am updating an existing program. I had to add some processing queue capabilities. On my system, unit testing worked great but when I compile it and run it on a different computer (a network server machine) it first tries to open an office install. If I cancel this, the program seems to run fine. The problem is that this program will be run in the background and I can't be hitting cancel each time it runs.
So my question is this: what is going on here? I'm usually a java developer we eclipse so I'm used to being able to include all the needed libs into the jar files automatically. It doesn't seem like the case with VB6. it seems like it expects all the same libs to be on all the systems. Is there any way to tell what might be triggering this?
The only thing I can think of that is causing it is that I'm using the "OpenProcess" function in the kernal32 lib. that the only major change I have made.
any help would be very appricated. thanks!
EDIT:
It seems that multiple versions of word were installed on the system and it was screwing things up somehow. We uninstalled one and it fixed it.
I ran into this a while ago and it was related to my installer for the VB6 app overwriting some system files for Office that it shouldn't have. Any time one of the System dlls was accessed Windows would determine that something was wrong and the Office installer would start up.
The short-term fix was to let the Office Installer repair the broken chain of dlls.
The long-term fix was to never overwrite built-in Windows System dlls.
You could also check out the Microsoft Fix it Center.

VC++ app fails to start — but there's no error

I made a minor change to a legacy Visual C++ / MFC app built with VS 2008. I changed some UI resources in the .rc file and compiled without any problems, then deployed it on my client's system. However, the program which was previously doing fine now fails to run on exactly one of their servers. It works fine on my laptop and on their other servers, many of whom are basically identical to the one having the trouble.
The weird thing however is that there is absolutely no error message whatsoever. No message box, no errorlevel set (when run on command prompt), no Dr. Watson entry, no nothing.
It's an MFC app that does not really comprise anything very special. It does link in some external libraries – e.g., some old version of the Xerces C++ XML parser. But this is probably not too relevant, right?
The program has a class derived from CWinApp, and I tried to add some logging in its constructor. Based on this, it looks like not even this constructor is reached.
The server in question is running Windows Server 2003 Standard Edition Service Pack 2, and we are trying to run the program in a Remote Desktop session. (Because of the client's environment, I cannot easily test in a console session right now.)
I reverted my changes from version control, which did not help – but I do not know if I had built myself the previously installed version (which ran just fine even on this server) or if it had been built by someone else.
Have also tried to reinstall the Visual C++ runtime libraries and of course reboot Windows, but neither helped. Now I'm really running out of ideas... Any clues on what I could try or check?
Probably some error occurs but is surpressed e.g. empty catch() statement or similar.
You could try and install Debugging tools for Windows WinDbg to see if you could get more info when trying to run it. Since the download is rather small 25Mb maybe it is possible to install it on your client's PC.
But first check the eventview log for your app, maybe there is something in there that can shed some light.

"<Some program on Windows> has stopped working"

I have been running mercurial (on Windows) for many months and I am suddenly now getting the error "Mercurial Distributed SCM has stopped working" in a Windows dialog. I can't find anything by searching on the web. Is this a question of reinstalling or is it more fundamental?
EDIT:
Because of the helpful answer indicating that this is a Windows problem I have changed the title
This can be more fundamental that just a reinstall, and it can happen for all sort of programs (not limited to "Mercurial Distributed SCM")
This article explains that, if a reinstall isn't enough:
If for some reason you still can't get ride of this error, we recommend you to download the most popular registry repair tool, Registry Easy to fix this error

Resources