VS2015 Several projects throwing exceptions before main - visual-c++

I have several projects that were created in VS 2010 but have recently been updated to VS 2015. All of them compile OK, but many of them now throw an exception before reaching main:
'MyApp.exe' (Win32): Loaded 'C:\Users\kloux\Documents\Visual Studio 2010\Projects\BandwidthCruncher\Debug\MyApp.exe'. Symbols loaded.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sysfer.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-timezone-l1-1-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-file-l2-1-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-localization-l1-2-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-synch-l1-2-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-processthreads-l1-1-1.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-file-l1-2-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
Exception thrown at 0x74F4C42D in MyApp.exe: Microsoft C++ exception: std::exception at memory location 0x0032F3EC.
Exception thrown at 0x74A17780 (sysfer.dll) in MyApp.exe: 0xC0000005: Access violation reading location 0x00000010.
I can always choose "Continue," in the resulting dialog, and the application seems to run without issue from that point on. These are a mix of GUI applications and console applications. This seems to be limited only to projects that I've imported from VS 2010 - I've never had this occur for applications created in VS 2015.
For one of these projects, I've gone through the process of removing all external libraries and reducing the source to a single file containing only the following:
#include <cstdlib>
int main(int, char**)
{
return 0;
}
I even unchecked the "Inherit from parent or project defaults" button. None of this has any effect - I still continue to get this exception.
If I compile any of these projects with VS 2010, the problem disappears -- until I compile with VS 2015 again. In VS 2015, changing the Platform Toolset has no effect, either.
Any help is appreciated.
Thanks!
EDIT: Incorrectly wrote VS 2005 when it should have read VS 2010

Visual Studio will load sysfer.dll (from Symantec CMC Firewall) when running the program.
From the log you copied here, It looks like sysfer.dll is a problem here.
It is actually a first chance exception.
Disable loading sysfer.dll, use regedit to set the following registry to 4:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SysPlant]
"Start"=dword:00000004
Reboot after changing the regedit.

Related

What env variable should does node use to load libraries?

I am getting this error on server:
node: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
however a simple find shows:
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
I already have the following set in .bashrc:
export PATH=$PATH:~/.local/bin:/usr/lib
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:~/.local/lib
export LIBRARY_PATH=/usr/lib:/usr/local/lib:~/.local/lib
yet node can't find the existing libstd library.
I have done
source .bashrc
and also
echo $LIBRARY_PATH
This is a really common problem I searched, but most solutions recommended an install in my case the file is installed node just doesn't see it.
Try installing missing lib32stdc++ by apt-get install lib32stdc++6
Set LD_DEBUG for better diagnose.
If the LD_DEBUG variable is set then the Linux dynamic linker will dump debug information which can be used to resolve most loading problems very quickly. To see the available options just run any program with the variable set to help.
Valid options for the LD_DEBUG environment variable are:
libs display library search paths
reloc display relocation processing
files display progress for input file
symbols display symbol table processing
bindings display information about symbol binding
versions display version dependencies
all all previous options combined
statistics display relocation statistics
unused determined unused DSOs
help display this help message and exit

C# ImageMagick dll loading error

I'm using the Magick.NET-x64.dll file in my project that converts pdf files to jpg images. But when I moved from a 32-bit windows processor to a 64-bit machine the following error encountered:
Could not load file or assembly 'Magick.NET-x64, Version=6.0.0.0, Culture=neutral,
PublicKeyToken=2004825badfa91ec' or one of its dependencies. An attempt was made to load
a program with an incorrect format.
I am getting this error when I build the project. How can I avoid this?

How to link using an external pdb?

In VS2012, I'm statically linking with a precompiled .lib, and need to also use that lib's .pdb file for debugging.
How can I tell the linker that it should use that external pdb file?
If you created the static lib with /ZI or /Zi (see project settings for C/C++ -> General -> Debug Information Format), then the $(IntDir)vc$(PlatformToolsetVersion).pdb file is created. The path is defined by /Fd.
A linker that uses the static library usually also refers to this pdb file. If you link an executable with the static lib and the linker can't find the pdb file you should get the error like this
LNK4099: PDB 'vc1xx.pdb' was not found with 'foo.lib(foo.obj)
So what you want is the default. You may turn on verbose linking to see what happens to your symbols.
Microsoft always ships a PDB file with their static libraries named the same way like the static lib. So you find a libcmt.lib and a libcmt.pdb

When I try to run the executable on Linux I get "error while loading shared libraries"

inlc6500> ./CDG
./CDG: error while loading shared libraries: libboost_regex.so.1.46.0: cannot open shared object file: No such file or directory
Can any1 tell what is the solution for this?
Thanks in advance.
Install the package that provides the library for the architecture the executable has been built for.

Cannot debug my Monotouch application anymore and it gets stuck randomly

I'm trying to debug my application and from the point I fire it up on the iPad, it will get killed by timeout before it ever reaches FinishedLaunching() (I have abreakpoint there)! Here' swhat I see in the output panel. All this takes almost 20s.
If I run the app in RELEASE build it randomly gets stuck. I hit a button and the delegate gets caled half a minute later. What is going on? In the Simulator it is all okay.
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/Mono.Security.dll [External]
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/System.dll [External]
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/monotouch.dll [External]
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/System.Xml.dll [External]
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/System.Data.dll [External]
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/System.Transactions.dll [External]
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/Mono.Data.Sqlite.dll [External]
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/System.Web.Services.dll [External]
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/System.Core.dll [External]
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/iMy.dll
Loaded assembly: /private/var/mobile/Applications/C3E70D7B-8C10-49CD-98A7-FCE857899BAA/MyBrowser.app/MyBrowser.exe
Thread started:
Resolved pending breakpoint at 'AppDelegateIPad.cs:110' to Boolean MyBrowser.AppDelegateIPad:FinishedLaunching ():0.
Avoid setting breakpoints in FinishedLaunching. When compiling in Debug mode, the code is always slower. On the simulator it works because:
a. There is no wifi connection between "device" and MonoDevelop
b. The "device" is your computer, so everything runs faster than it would on the actual device.
If it randomly gets stuck in Release mode, I think you have a lot going on in FinishedLaunching that you shouldn't.

Resources