Fluent NHib causing visual studio 2010 hanging at runtime - visual-studio-2010

Just installed and migrated a 2008 solution on Vista ultimate 64 and .net 4.0. Everything builds and tests run surprisingly well but I got the hang description below while trying to run the app under SQLite.
It turns out that the hang has got something to do when the call is made for FNH to build the session factory during a run, the only feedback I get is that the database wasn't configure properly without any inner exception. The strange part is that the exact code works perfectly under tests.
Any clues?
FluentNHibernate.Cfg.FluentConfigurationException was unhandled
Message: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
* Database was not configured through Database method.
Description: A problem caused this
program to stop interacting with
Windows.
Problem signature: Problem Event
Name: AppHangB1 Application
Name: devenv.exe Application
Version: 10.0.30319.1 Application
Timestamp: 4ba1fab3 Hang
Signature: b9ed Hang Type: 6152
OS Version: 6.0.6002.2.2.0.256.1
Locale ID: 1033 Additional Hang
Signature
1: 005de38e6b4bb3afd8e147932c6431cc
Additional Hang Signature 2: d54c
Additional Hang Signature
3: 05f671c8289bf8dd31e6ccfe265baa77
Additional Hang Signature 4: 784c
Additional Hang Signature
5: c8207f54dadf3eb38dfcf1ae152f4229
Additional Hang Signature 6: ff83
Additional Hang Signature
7: 220932152f3f04fffb6ca3abf15e6dc6

This is a SQLite issue, not FNH; see this post

Related

Managed Debugging Assistant 'FatalExecutionEngineError' 0xc0000005

Managed Debugging Assistant 'FatalExecutionEngineError' : 'The runtime
has encountered a fatal error. The address of the error was at
0x641ad419, on thread 0x5d0c. The error code is 0xc0000005. This error
may be a bug in the CLR or in the unsafe or non-verifiable portions of
user code. Common sources of this bug include user marshaling errors
for COM-interop or PInvoke, which may corrupt the stack.'
This only seems to happen using Asp.Net Core 1.1 and only with entity framework for .net (not EF Core). It also does not happen all of the time, but when it does it's always during an EF call.
I've tried enabling "Use Managed Compatibility Mode" as described here, but it doesn't seem to make a difference.
I was getting "FatalExecutionEngineError' : 'The runtime has encountered a fatal error. The address of the error was at 0x72d41302, on thread 0x4520. The error code is 0xc0000005" while running a simple hello world application in Visual Studio 2017.
Resolved the issue by using x64 mode for debug.

vshost-clr2.exe has stopped working

I'm working on an app in VS 2010 on wind2008. It's a .Net 3.5 app that use .Net 2.0 library.
I change all Frameworks to 3.5 .Net and uncheck "Enable the visual studio hosting process"
But When I debug my solution I got this error :
Problem signature:
Problem Event Name: APPCRASH
Application Name: AnalyseFarm.exe
Application Version: 1.0.0.0
Application Timestamp: 5326f157
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdfe0
Exception Code: c000041d
Exception Offset: 000000000000aa7d
OS Version: 6.1.7600.2.0.0.274.10
Locale ID: 1036
Additional Information 1: 5ecb
Additional Information 2: 5ecbd308407466ba89616cb69c9e62d8
Additional Information 3: 9ac0
Additional Information 4: 9ac06af1219db569f0ee193c24745b31
any idea , beast regards
Exception Code: c000041d
This tells the tale, that's STATUS_FATAL_USER_CALLBACK_EXCEPTION, "An unhandled exception was encountered during a user callback". Your program threw an exception and it wasn't handled. Which normally automatically breaks into the debugger and displays the Exception Assistant.
However, the exception occurred at a very awkward time, just when the operating system was in a state where it cannot afford to go through the normal rigamarole that it goes through when a thread dies with an exception. This kind of mishap usually occurs when the callback was triggered by 32-bit code but the exception occurred in 64-bit code, there's no good mechanism to marshal 64-bit exceptions back into 32-bit code, the exception information cannot be properly interpreted by such code since it includes 64-bit pointer values. Or the other way around. Windows messages generated by the window manager tend to fall in this category. Beware that this is just a rough guess at the reason, you need to find the real one.
You do so by forcing the debugger to stop at the code where the exception is thrown, before the operating system is asked to deal with it. Use the Debug + Exceptions dialog, tick the Thrown checkboxes to force the debugger to stop at the throw location.

VS2005 crashes often when compiling

I can change one small thing commenting/un-commenting it and VS2005 will either crash or not crash for no additional reason in either case.
Problem signature:
Problem Event Name: APPCRASH
Application Name: devenv.exe
Application Version: 8.0.50727.867
Application Timestamp: 45d2c842
Fault Module Name: StackHash_0646
Fault Module Version: 6.1.7601.17725
Fault Module Timestamp: 4ec49b8f
Exception Code: c0000374
Exception Offset: 000ce6c3
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional Information 1: 0646
Additional Information 2: 06468f0034e46fb7e5e65a0a8a306ffb
Additional Information 3: 9aba
Additional Information 4: 9abaaa502ccb3837971bddc9d127747d
Since the above is really of no help to me, is there some way I can diagnose what's going on? All I'm able to get out of debugging the compile crash (in VS2005) that is that there is a corrupted heap.
Some options you can try out:
You can get a log when booting Visual Studio using /log as attribute.
http://msdn.microsoft.com/en-us/library/vstudio/ms241272(v=vs.80).aspx
Creating a crash dump
http://blogs.msdn.com/b/mikhailarkhipov/archive/2006/07/25/678308.aspx
Uninstall ReSharpen (if you use it)
Reinstall Visual Studio
Create a new Windows User and see if you get the same trouble
Ehh.. Solution: Get rid of the outdated buggy IDE and upgrade to a more recent one. Went to VSC15. No crashes since.

VB6 Timer(), Space() Form_Initialize() causes Immediate Crash

Create a new VB6 project. Paste the code below as your project code. Hit Run. See if it crashes... Remove or simplify anything you like in this code, and then it will work fine. Can anyone please shed some light on why this is crashing?
This has been tested on eight PC's so far, all running various combinations of Windows XP, Windows Vista, Windows 7, Office 2010, and Office 2007. The ones where it was tested in the Visual Basic IDE have Visual Basic 6 SP 6 installed.
Private Sub Sleep(ByVal nSeconds As Long)
Dim nStart As Long: nStart = Timer
Do
DoEvents
Loop Until (Timer - nStart) >= nSeconds
End Sub
Private Sub Crash()
Dim sTempPath As String: sTempPath = Space(255)
End Sub
Private Sub Form_Initialize()
Sleep 1
Crash
End Sub
Addendum #1:
I put this as a macro in Excel 2010, replacing Form_Initialize() with Workbook_Open(), and sure enough, when you open the document. It crashes!
Addendum #2:
I added break points to every line before hitting "Run" and it crashed before it got to the first break point. But again, if I simplify or remove anything in this, it works fine and does not crash.
Addendum #3:
Tried MicSim's suggestion of removing the colon, and it did not crash. Added it back, ran it again and it did not crash. Closed Visual Basic, and put in the original code and it crashed.
Addendum #4:
Problem Details from Visual Basic 6 IDE:
Problem signature:
Problem Event Name: APPCRASH
Application Name: VB6.EXE
Application Version: 6.0.81.76
Application Timestamp: 3592011f
Fault Module Name: VBA6.dll
Fault Module Version: 6.0.0.8169
Fault Module Timestamp: 358b0c74
Exception Code: c0000005
Exception Offset: 00026329
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional Information 1: 7e3b
Additional Information 2: 7e3beb1e9ccf6d519c5b994ca59a280f
Additional Information 3: 7b83
Additional Information 4: 7b833c57ebcf54809fd3aaccd8ea4f46
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
Addendum #5:
Problem Details from Microsoft Excel 2010:
Problem signature:
Problem Event Name: APPCRASH
Application Name: EXCEL.EXE
Application Version: 14.0.4756.1000
Application Timestamp: 4b9c08e8
Fault Module Name: VBE7.DLL
Fault Module Version: 7.0.15.90
Fault Module Timestamp: 4b7b1248
Exception Code: c0000005
Exception Offset: 00045b6a
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional information about the problem:
LCID: 1033
skulcid: 1033
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
After reviewing your question and all the addendums, I realized that your computer is running the release version of VB6, and not SP6.
Your crash details indicate the following versions:
VB6.exe: 6.0.81.76
VBA6.dll: 6.0.0.8179
The exact build numbers of Visual Basic 6.0 SP6 files are as follows:
VB6.exe: 6.0.97.82
VBA6.dll: 6.0.0.9782
Exception code c0000005 corresponds to an access violation in module vba6.dll. A similar problem is documented on Microsoft KB
I have not found an accurate source listing build numbers for each VB6 service packs, but it looks like this is the RTM version. Even though you might have installed SP6 yourself, a rogue installer may have overwritten shared system files by an older version after the service pack was installed. This would explain why a lot of users commented that the code is working fine for them with a seemingly similar setup.

The Just-In-Time debugger was launched without necessary security permission

We are working on vs 2010 windows 7, 32 bit and the project is running under target framework 3.5.
Now we are implementing credit card process in the website project in signup page.
It's running fine when running from VS IDE, but after publishing to the local IIS when clicked on signup button, it's showing this error:
An unhandled win32 exception occured in w3wp.exe The Just-In-Time
debugger was launched without necessary security permissions. To debug
this proces, the JIT debugger must be run as an administrator. Would
you like to debug the proces?
In Application error log im seeing this
Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bcd2b
Faulting module name: ntdll.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdadb
Exception code: 0xc0000374
Fault offset: 0x000c283b
Faulting process id: 0x3e4
Faulting application start time: 0x01cca60dbfd76d52
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 126cc4b9-1201-11e1-b3db-003018a9eb5e
It was working fine three days ago from IIS. I do not understand what change caused this issue.
Edited
if i select debug this process.. app working fine. The real problem is after publishing same build to the live server(win 2k8, 64 bit), in sign up page i used captcha even i entered correct code its saying you are not entered correct code. which is working fine in local system.
I don't know if your problem had the same cause, but I got this error when trying to debug my app (just pressing F5).
We got crazy trying to figure why the w3wp.exe was failing with this error when minutes before it was running fine.
After some investigation we realized that the real problem was in the code of the global.asax: it was throwing an stack overflow exception (pretty ironic for answering here) and that was crashing the w3wp.exe process before VS could attach it to begin debug.
Fixing the buggy code made the VS to run nicely again.
I see the question is from long ago, but I hope it helps somebody.
To solve this issue, let the dialog help you. Agree to launch an elevated debugger and debug your problem. You probably have some sort of configuration problem. Your real problem isn't whether or not the debugger is elevated, it's the fact you need a debugger at all. In other words the first sentence on the dialog is "you have a problem." All the other sentences are "I would like to help you with that problem; is that cool with you?"
I believe an update to the latest version of VS and .NET Core 2.1 is what caused this for me.
Then for the first time, I noticed this setting. Setting it to 'Enabled' fixed it for me.
If you usually attach to process and debug but you can't (because you can't get the app to successfully run), run the app via Visual Studio and it'll break and show you the exception cause in some detail.
Please check for System.Diagnostics.Debugger.Launch(); or Debugger.Launch(); in the cs file. Commenting the code, starting the application worked fine for me.!
I was experiencing this error because of the AppPool that was associated with my site. Originally, I was using DefaultAppPool. The fix was to use a different app pool (custom, from our app) that had NetworkService as the identity.
In my case it was stackoverflow due to circular dependency injection
public class ServiceA : IServiceA
{
public ServiceA(IServiceB serviceB){...}
}
public class ServiceB : IServiceB
{
public ServiceB(IServiceA serviceA){...}
}

Resources