Unhandled exception at 0x008EAE83 - visual-c++

I have a Windows MFC application that is crashing on launch on a customer's Windows Server OS. The application runs fine on our Windows 10 workstations and Windows Server 2019 test OS. I have a crash dump and loaded the debug symbols but all I get is this call stack:
MyApp.exe!abort() Line 77
at minkernel\crts\ucrt\src\appcrt\startup\abort.cpp(77)
MyApp.exe!terminate() Line 58
at minkernel\crts\ucrt\src\appcrt\misc\terminate.cpp(58)
[External Code]
The exception is Unhandled exception at 0x008EAE83 (MyApp.exe) in MyApp.exe.9156.dmp: Fatal program exit requested.
Event viewer gives an application exception error code 0xc0000409 or STATUS_STACK_BUFFER_OVERRUN. But apparently, this can be called even though it's not actually a stack buffer overrun.
The weird thing is, if we insert AfxMessageBox() at the start of the app - CMainFrame::OnCreate() then it doesn’t crash and it launches fine.
There is an existing binary built using VS2008 or VS2013 with the same code that launches fine. We are unable to recreate that build from source code though.

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).

VS 2012 or Monodevelop doesnot breaks Execution on Unity exceptions

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

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

Windows Server 2008 does not like my exe (KernelBase.dll)

I have written an app to run on 64bit Windows Server 2008, it needs to go in the schedular as it needs to run every 15 minutes. For some reason the program crashes after being open for a few minutes (this is without it being in the schedular). The program runs fine on both my 32bit laptop and a colleagues 64 bit laptop, but fails on this server. Error details:
EventType = APPCRASH
Fault Module Name = KERNELBASE.dll
Fault module Version = 6.1.7600.16385
Exception Code = e053534f
Any help on this would be most appreciated, ive already tried changing the target platform to x64, setting DetectNewerInstalledVersions to false, running as administrator and changing the compatability settings to what the compatability checker recommends (Windows XP Service Pack 2) and still no avail....
That's very little to go by. However, the exception code is EXCEPTION_SOFTSO, a "soft stack overflow" exception. It is raised when the CLR is about to run managed code but detects that there isn't enough stack space left to safely execute the code.
You'll need a debugger to get to the bottom of it. Use the Debug + Exceptions dialog to make the debugger stop at the exact point where the exception is raised.

Resources