I'm thinking of rewriting a brand new VB.NET application in VB 6.
The application runs under terminal services and makes heavy use of COM.
For some reason, there is random weirdness with the application -
- Random Access Violation errors (WinDbg exception analysis points into dll's like comdlg32.dll, mscorwks)
- Random Buffer Overflow errors (same)
- Random errors in general - for example this line in Form.Load sometimes throws - Me.Icon = Resources.MyIcon
I have followed all possible advice concerning resources, garbage collection, disposal patterns, etc... It just doesn't seem to do any good.
I'm thinking there is hardware problems. This runs on a Win2k3 virtual machine under terminal services. The base server OS is Win2k3 with 64 GB RAM. The server has many virtual machines each running it's own "stuff" (Exchange, etc..).
Either there's hardware problems, or the .NET environment is not as easy to program against as one may think.
If the hardware were somehow verified (a entirely different story) and the application continued to behave as such would it be a feasible route to take (rewrite closer to the metal)?
I'm not a big fan of virtual machines and doubt their integrity. (Especially on huge servers.)
Edit - Thanks to all for the responses. The issue turned out to be a single .NET .DLL in my application that was not being targeted to x86 code. The COM objects are all 32 bit, the OS is 64 bit, thus my .NET application needs to be targetted to 32 bit. (This explains why my sample VB6 apps always worked. Not that I really wanted to go that route anyway.)