VS 2012 or Monodevelop doesnot breaks Execution on Unity exceptions - visual-studio-2012

I am using UnityVS 2012 debugger tool to debug my game. It stops execution successfully when it hits the break point anywhere in the script,
but it do not breaks on unhandled exceptions if found. It keeps running. For example, I got the following unhandled exception in unity editor while debugging, but it didn't returned to the Visual Studio by breaking.
MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Headquarter.FilterByTag (System.String Tag) (at C:/Users/user/Desktop/Project Final Version (Ver. 23 Intgrtd)/Assets/scripts/Headquarter.cs:349)
Headquarter.Pock (System.Collections.Generic.List`1 Production_Info, UnityEngine.GameObject Target_Headquarter) (at C:/Users/user/Desktop/Project Final Version (Ver. 23 Intgrtd)/Assets/scripts/Headquarter.cs:302)
UnitMenu.Update () (at C:/Users/user/Desktop/Project Final Version (Ver. 23 Intgrtd)/Assets/scripts/UnitMenu.cs:62)
I have tried it with mono develop as well but didn't get anything.
Rapid help will be appreciated. Thanks

Related

iOS debugging is terminated directly after it started (Xamarin.Forms / VS for Mac)

I'm currently trying to debug an iOS application (created with Xamarin.Forms) with VS for Mac (also tested through VS2019 Enterprise on Windows). Unfortunately, the debugging process is not started successfully. It stops without any exception or error report (except "Application 'com.XYZ.MyApp' terminated." which is not helpful at all). This happens with the simulator and the device debugging.
When debugging it shows the launch screen and from time to time the following page. Then the debugging crashes without any report. This may be caused by an asyncronous process. However, there is no information in the log files.
The same app can be successfully debugged with the andriod simulator. Moreover, a generally similiar application can be debugged under iOS.
Is there any possibility to get a more detailed error report that shows why the debugger is closing?
Edit: I just created a TestFlight version which works pretty stable and pretty well... So I have no clue anymore why the debugging is not working... Is it maybe because I had Xcode 11 beta installed for a short time to test iOS 13 on my device with my apps? I uninstalled Xcode 11 after the iOS update but is there a chance that this causes problems with the Xcode 10 installation?

Attaching MSVC 2012 profiler hangs the application

I have a C++ application (it's built using Qt 5.8 library and works with PostgreSQL 9.5 database in case it's relevant). The application is build by MSVC 2012 compiler, is 64-bit application and both debug and release versions run normally on their own and under cdb debugger.
When I try to profile the running application by Visual Studio instrument (Analyze -> Profiler -> Attach), it seemingly hangs as soon as it tries to do something meaningful: simply resizing a window or clicking on checkboxes works, but any attempt to compute new values and write them to database never succeeds, as if control flow didn't return from some call.
When I stop the profiling, Studio marks as a "hot path" sequence of calls RtlWalkFrameChain->RtlpWalkFrameChain->RtlpLookupFunctionEntryForStackWalks->RtlLookupFunctionTable->RtlAcquireSRWLockShared.
RtlpWalkFrameChain has the biggest "exclusive samples" count.
Trying to filter data to exclude initial several seconds of run (until the apparent freeze) results in "No Call Tree Data Is Available" message.
I didn't manage to find any article or post with a similar problem.
The project is build in Qt Creator (I don't have a project file Studio would understand, so I can't run "normal" performance analysis).
OS is Windows 7, exact version of Visual Studio is 11.0.61219.00 Update 5.
Any idea on the subject would be welcome.
Upd: When I try to profile the application with Luke Stackwalker profiler, it aborts with the message ERROR: StackWalk64-Endless-Callstack!. The only relevant comment about the message I found is this Stackoverflow question. When I run application under cdb debugger and then try to profile it with Luke Stackwalker, the error message is the same, but subsequent pause in the debugger shows the proper (or at least believable) stack for all threads. For the working thread debugger points to a line of code inside system library and doesn't advance no matter what I do (once again, without profiling attempts the application runs normally, debugger or not).

Debugging my AzureStorage-code within Visual Studio throws SocketException

Note I do not use the Storage Emulator.
If I build my solution with the configuration set to debug and then run the binaries from the command-line everything is fine and my code interacts fine with the AzureStorage.
But, if I debug my binaries from within the Visual-Studio a SocketException is thrown and no interaction with the AzureStorage happens.
Q What do I need to tweak to enable Visual-Studio to debug my code with the IDE?
Update I asked this question after I discovered with fiddler that Visual Studio debugs the binaries in a kind of sandbox-environment which inhibits the Azure communication.
Before discovering that, I asked this detailed question, which didn't receive an answer up to now. You'll find all the requested information in the question.
Update1 The exception is plain and simple System.Net.Sockets.SocketException occurred with the corresponding stack-trace:

c++ - cli application compiled on Windows 8 can not start on Windows Server 2008 R2 if boost/thread.hpp is included

My application starts fine on my Windows 8 laptop.
However I can not start it on Windows Server 2008 R2. Following error occured:
The exception unknown software exception (0xe0434352) occured in the application at location 0xfd5ecaed.
The following is printed in the command line:
Unhandled Exception: Cannot print exception string because Exception.ToString() failed.
My solution contains one c++-cli project which i'm trying to use, and if I do not use it then everything works fine, so commenting just this line helps:
// private static CliAdapterMain cliAdapter = new CliAdapterMain();
I've tried:
repair .NET Framework 4.5 on target machine
repair/reinstall VS 2012 Update 1 Redistributable (both x86 and x64, version 11.0.51106.1)
updated my VS2012 to Update 1 recompiled project
no Windows pending updates, tried to reboot system several times
Dependency Walker claims that following DLL's are missing: GPSVC.DLL IESHIMS.DLL MF.DLL MFPLAT.DLL MFREADWRITE.DLL WLANAPI.DLL However they exist on target computer, for example here
c:\Windows\winsxs\amd64_microsoft-windows-grouppolicy-base_31bf3856ad364e35_6.1.7601.17514_none_8649674dfda23046\gpsvc.dll
Probably I can try manually reregister missing dll's, but i don't think this is really a problem. Looking at an exception it seems that something is broken, not something is missing.
upd: From Windows logs:
Va.MBClient.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException
Stack:
at Va.MBClient.Program.Main(System.String[])
So I guess that private static CliAdapterMain cliAdapter = new CliAdapterMain(); is failed but i don't know why.
upd played with my application a little. Finally i've found just one line of code that causes a failure. This is #include <boost/thread.hpp>. Why this doesn't work? I'm using latest version of boost (1.52), but i did built it on my Windows 8 machine. Should I rebuilt everything for Windows Server 2008 R2? Should I built entire project on Windows Server 2008 R2?
It is due to in the Windows Sever, some features is not enabled by default, you need to add the Windows Media Services and Wireless LAN Service by yourself to get the Dll back.
You can reference to MSDN

"LoaderLock was detected" with Visual Studio 2012

I have a couple of MVC projects which use SQL CE 4.0 and Entity Framework. Since moving to Visual Studio 2012 I keep getting the following error (not every time, but frequently)
LoaderLock was detected
Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
The error does not occur if I go back to using VS 2010, which makes me fairly certain it is an issue with Visual Studio rather than my code, but I would like someone to confirm that for me!
Edit
The problem always seems to occur when the Dispose() method of the dbcontext is called. Here is a screenshot of the Exception Assistant:
I switch this off. As it is warning that the application could hang, if your program doesn't hang, then you're probably fine.
The problem can be solved in the same way though, by switching off the
MDA:
Debug -> Exceptions -> Managed Debug Assistants
and unchecking the LoaderLock item.
I also had a problem with LoaderLock when I was working with some external dll in my C# application.
for the .NET 3.5 I just uncheck Thrown option in Exceptions menu (Loader lock error)
for the .NET 4.0 I added <startup useLegacyV2RuntimeActivationPolicy="true"> in app.config

Resources