Unable to start UE4Editor.exe - c++

Trying to launch the editor from Visual Studio 2013 Ultimate I get the following error in the title. VS says it's because it can't reach MSVSMON.EXE on a "remote computer", the weird thing is that I'm not trying to debug on a remote computer, but rather, on my own. My firewall is ZoneAlarm if that makes any difference.
Any help?
Edit: I've set all in and outbound communication to and from both unreal and visual studio in my firewall to "allowed", yet for some reason it still won't let me debug...
Edit 2: Disabling the firewall entirely does nothing at all.. The error persists
Edit 3: Uninstalling ZA altogether seems to fix the issue

Just a note, so far you've been chasing the wrong problem and have not yet gathered enough relevant facts. The dialog is very unhelpful, this does not have anything to do with a "remote computer".
Msvsmon.exe is used in this scenario because UE4Editor.exe is a 64-bit process. Visual Studio cannot use its built-in debugger, it is a 32-bit process. Debugging a 64-bit process with a 32-bit debugger is not possible. So it has a workaround, it uses the 64-bit remote debugger, C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe. Basically works the same has remote debugging on another machine, except it doesn't use the network to connect to the debugger.
So your firewall settings and the considerable amount of trouble-shooting info about remote debugging you can find on the web or MSDN just does not apply in your case at all. You've been chasing the wrong problem.
Having an issue with msvsmon.exe when debugging 64-bit code is quite unusual, never heard of anybody having trouble with it before. You want to do a basic smoke test to check if it is really a problem with msvsmon.exe or it is actually UE4Editor.exe that puts up a fight.
Create a little do-nothing C# console mode app, just Console.ReadLine() in the Main() method. Project + Properties, Build tab, untick the "Prefer 32-bit" option. This ensures it runs as a 64-bit process. Press F5. If all is well then it starts running and you'll see msvsmon.exe in the Task Manager, Processes tab.
If that does not work either then something is interfering with the process interop between Visual Studio and msvsmon.exe. Usually anti-malware related, disable that first. Next thing to try is to start killing processes one-by-one with Task Manager to find the evil-doer. If debugging the C# app works okay then you have a good reason to visit the UE4 forum to find help.
Update your question with what you've learned.

Uninstall Zone Alarm and everything will be OK.

Related

Visual Studio 2015 error: Unable to start debugging. Unexpected GDB output from command "-target-select remote :5039". Remote connection closed

I see the following error whenever I try to debug "Cross Platform" under "C++" category: "Unable to start debugging. Unexpected GDB output from command "-target-select remote :5039". Remote connection closed"
I've installed all of the contents when I downloaded Visual Studio 2015 community and I ran it on Windows 10 Pro which supports Hyper-V.
I've been searching a solution for this and I've found an assumption:
"What is your debug target, the VS Android Emulator? When we saw this before it turned out to be a bad emulator image. Do you have this problem with all targets (e.g. if you try a physical device) or just one?"
In my case, I just tried this via Emulator(VS Emulator 5" Lolipop (5.0) XXHDP Phone (0x86 -...)
So I've sent an Email to VS 2015.
And the answer was like this:
"Sorry for the delay in responding we were looking at an emulator image of another user that ran into this problem so I was waiting until we had the results of that investigation to report back. We actually were not able to find anything wrong the emulator itself, our current hypothesis is that it is a network or adb problem interfering with GDB’s ability to connect to GDB server on the remote machine. Do you see this error every time you try to debug, or if you reboot the emulator will it work sometimes right after the reboot? Next time you see the error, can you open the emulator’s console mode by going go the Hyper-V manager and double clicking the emulator. Then find the location your app installed to and run “gdbserver --version" from the app path and let me know what it says? This will validate if the correct version of gdbserver is on the device."
So we are trying to solve this problem but I'm also asking here just in case.
Is there anyone who has magical solution for this problem?
I'll put a comment on this if I figure out how to solve this.
Thanks in advance.
** Following answer is from the manager of Visual Studio 2015:
You are only the second person who has run into this issue, and the first person that ran into it provided their everything works correctly when we run their .vhd on our machines so it appears to be some strange problem where gdbserver (which comes from the Android NDK provided by Google) crashes only when running on certain machines. Unfortunately the .vhd you provided does not appear to be the correct one it won’t boot for me. You can see the .vhd file being used by the emulator if you look under the settings of the emulator in your Hyper-V manager. .However given we got the other person’s .vhd you can hold off providing any additional information at this point. I’m waiting to hear back from the emulator team on if they have any ideas since this appears to be an issue only on specific machines since.
If you don’t mind my asking, if you don’t have a background in computers what inspired you to try C++ on Android? That scenario will be significantly more complicated than doing Java on Android.
It's been almost two months since I got this answer but I haven't got any additional response from them yet. So, I ended up quitting developing an application by using VS2015.
If you run into this problem, there are only two ways to go. Change your computer or stop developing application via VS2015.
If the project name contains spaces, the whole remote debugging fails. Visual Studio also creates weird paths. When checking out the "Blink1 for Raspberry Pi" template, I named the Project "Blink1 for Pi", which resulted in a path like this:
~/projects/Blink1?/for/pi/PI/for/pi....
And all the debugging failed. When I recreated this keeping the project name "Blink1", everything worked fine. It's a pity, that spaces aren't handled here...

visual c++ 2010 C++ build problems

When compiling any C++ project with visual studio 2010 express I'm liable to get following behaviour - build started message appears in output window, CPU climbs to near 100%, multiple MSBuild.exe processes are spawned, long pause (several minutes) with nothing happening, build aborts with the following message
xxx.vcxproj : error MSB4014: The build stopped unexpectedly because of an internal failure.
xxx.vcxproj : error MSB4014: Microsoft.Build.Exceptions.BuildAbortedException: Build was canceled. MSBuild.exe could not be launched as a child node as it could not be found at the location "c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe". If necessary, specify the correct location in the BuildParameters, or with the MSBUILD_EXE_PATH environment variable.
xxx.vcxproj : error MSB4014: at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration)
xxx.vcxproj : error MSB4014: at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity)
xxx.vcxproj : error MSB4014: at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses)
xxx.vcxproj : error MSB4014: at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
xxx.vcxproj : error MSB4014: at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild, BuildRequestBlocker blocker)
Microsoft have acknowledged a bug with this behaviour when your user name is 20 chars, but mine is much shorter. And needless to say I do have msbuild.exe in the right place.
The only work around I've found is to task switch to another app while the build is taking place. But I'm hoping someone has a better workaround.
MTIA
John
You've already eliminated KB2298853. Do make sure to install SP1. It is not the only reason, some other users have this problem too, even after the workaround. The basic failure appears to be a problem creating a pipe that lets msbuild talk to the IDE. Which is why it doesn't fail when you run msbuild from the command line.
This is an environmental problem, as yet undiagnosed. You need to chase down the reason the execution environment is unusual on your machine. Do so by selectively disabling or killing processes. Start with your malware software. Also, start another instance of Visual Studio and use Tools + Attach to Process to attach an unmanaged debugger to the first instance and/or msbuild. Debug + Break All and use Debug + Windows + Modules to find out what DLL might be injected in the process that is not made by Microsoft. Pay attention to the Path column. Not sure if Attach to Process is available on the Express edition btw.
it's actually just the behavior shield in avast that is causing the problems with visual studio.
if you turn that off when trying to build, it will build and run. now we just need either microsoft or avast to create an update which will eliminate this problem. just discovered this 10 mins ago. at 2:50 pm 12/3/2011 central standard time in wisconsin
I can confirm that this problem was also solved for me by turning off Avast's behavior shield. Something is definitely not right with that. Endless MSBuild.exe (and conime.exe) processes and devenv.exe maxing out the CPU. Seems to be a real system killer there by Avast. :-(
In my case simply restarting VS2010 helped fix the error. Anyone encountering this error might want to try that first.
(I am using VS 2010 with SP1)

My C++ executable runs way faster outside the Visual Studio 2008 IDE than inside, even in release

I build a C++ application that does some number crunching.
I'm running in Visual Studio 2008 PRO SP1, in release mode, Windows 7 64 bit.
If I run it inside the IDE, the application takes 4 minutes, if I run the same executable from windows explorer it takes 6 seconds!
I have no clue. I have checked that this does not depend on the processor and operating system. I don't think I have strange VS plugins that are doing something in the background.
Any hints?
Thank you in advance!
Marco
Presumably, the slow down is caused by the debugger being attached when you are starting the application in Visual Studio. This is the case even when you've built the program in "Release" mode.
To confirm that this is indeed the source of your problem, try running your application without the debugger, using the "Start Without Debugging" command or Ctrl+F5.
It's worth nothing that in C++ specifically, when you start without debugging, your program won't use the Windows debug heap. With the debugger attached, it will.
As Cody mentioned, one option is to simply not debug. But if you want to speed up your debugging sessions, here are a few things I've found can make a huge difference:
Remove debugging print statements that are no longer necessary. If you see your log filling up with text, that is likely slowing you down significantly.
Remove breakpoints (Ctrl+Shift+F5). A couple times I've noticed a huge drop in performance, and it turned out to be due to a breakpoint with a condition that was never met.

Is there a known bug in Visual Studio 2008 for using drop target in C++ when running Visual Studio as administrator?

We have an application that allows a user to drag a picture to a window and that window is a drop target (using OLE). When this code is run in the debugger and the Visual Studio instance is run as administrator (right click from desktop) then the target drop is not allowed.
If the exe is run on its own it works fine.
If the visual studio instance is run NOT as an admin the functionality works fine in the debugger. (Same solution/project files/etc)
Win7 OS. Visual Studio 2008. Unmanaged C++
I find it very odd. Not sure why it is happening. In fact I would have guessed the OPPOSITE regarding running VS as an admin.
Has anyone seen this or does anyone have links to workarounds or explanations?
This is most likely happening due to UIPI (User Interface Privilage Isolation).
In the case where you've launched your processes as Admin (due to the parent process (Visual Studio) being run as admin), UIPI isn't going to let non-elevated (admin) processes send any messages to your app. Drag and Drop between applications is implemented using Windows messages.
To work around this, you can use the ChangeWindowMessageFilterEx() API to opt into the appropriate drag and drop messages.
If you want to really and truly fix it, then you would need to
Detect when your process is running elevated
Spawn a non-elevated helper process which registers as the drop target
Pass the dropped data through IPC to the elevated process, using a method that's safe to use across privilege boundaries (i.e. no active objects which carry code)
This is a LOT of extra work when the workaround could be as simple as dropping from another elevated app (to get an elevated Explorer, just call up the File->Open dialog of any elevated app), but has the advantage that drag-and-drop will work properly if any of your customers ever run the app elevated.
Unfortunately this looks like a flaw in the OS:
http://blogs.msdn.com/b/patricka/archive/2010/01/28/q-why-doesn-t-drag-and-drop-work-when-my-application-is-running-elevated-a-mandatory-integrity-control-and-uipi.aspx
Oh well.
I find this whole issue appalling. MS has screwed up on this IMO. Essentially we can't debug an app correctly if I want to run MSVC in elevated mode (for example when I build the solution it registers COM servers).
http://social.msdn.microsoft.com/forums/en-US/windowsuidevelopment/thread/2fa935cf-be57-4bcc-9b96-7ee5a6b2b7a5/

DebugBreak not breaking

I'm writing a class in C++ that I cannot debug by using F5. The code will run from another "service" that will invoke it.
In the past I've used __debugbreak() and when I got a window telling me that an exception was thrown selected to debug it.
Recently I've updated to windows 7 and it kept working for a while.
Today when I've tried to debug a piece of my code instead of shown the regular dialog that tells me that VSTestHost has stopped working and enable me to to debug the application I got a different dialog suggesting I send the data to microsoft for analysis.
Does anyone knows how can I fix this issue so I'll be able to debug my code?
Finally I found the cause of the issue.
It's a Vista/Win7 cause:
Open The Action center control
Goto Action Center settings
Goto Problem Reporting Settings
Choose "Each time a problem occurs, ask me before checking for solution"
Although this is more of IT solution/question I've been plagued with this problem all day and wanted to share the solution with other developers who encounter this problem.
I finally found the solution for Windows 10/11 here:
https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/enabling-postmortem-debugging
And also: https://learn.microsoft.com/en-us/windows/desktop/Debug/configuring-automatic-debugging
To enable automatic debugger launch, you should add a registry value:
key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug, value Auto = 1 (of type REG_DWORD)
The configured debugger is set the by the value Debugger (type REG_SZ); a Visual Studio installation sets this to:
"C:\WINDOWS\system32\vsjitdebugger.exe" -p %ld -e %ld
Note that on 64 bit OS this only works for 64 bit executables. To enable the same behaviour in 32 bit executables set the same values in this key:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug
In that case...
http://community.codesmithtools.com/blogs/blake/archive/2009/06/03/tips-amp-tricks-debugging-codesmith-on-microsoft-windows-7.aspx
Here is the quick overview of what you need to-do to enable debugging on a Microsoft Windows 7 machine:
Update the Just-In-Time debugger setting DbgJITDebugLaunchSetting. The setting is found in the registry at [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework].
Set the value of DbgJITDebugLaunchSetting to 2.
If you are using a 64bit operating system then you must also set the same key (DbgJITDebugLaunchSetting) in this folder [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework] to 2.
If you run into any issues try running CodeSmith Studio and Visual Studio as an administrator.
Now when CodeSmith enters a break point you will see something like this:
You could try debug > attach to process.