Total crash & reboot in XP pro
-
I've been developing apps in c++ for years using various OS's from Win 3.1 onwards. I've had hundreds of 'application errors' as all developers do. Recently we have been converting (and adding functionality to) our set of apps with C#. Generally very pleased with advantages of C# over C++. But...... at least 3 times on one development PC and at least twice on another, a c# app has crashed spectacularly - total reset/reboot of WinXP pro, no warning, no error message, nothing. I haven't seen anything like it since the dreaded 'blue screen' of Win95 and 98. If it's any help, this app's main function is to collect and store (in an SQL database) information arriving via either a network port or a serial port (it has crashed in both cases so I don't think that the external hardware is responsible). After MS's warning ("this computer has recovered from a serious error") after rebooting, and sending the error report to MS, all they can come up with is a 'unknown device driver error'. Has anyone else had similar experiences?
-
I've been developing apps in c++ for years using various OS's from Win 3.1 onwards. I've had hundreds of 'application errors' as all developers do. Recently we have been converting (and adding functionality to) our set of apps with C#. Generally very pleased with advantages of C# over C++. But...... at least 3 times on one development PC and at least twice on another, a c# app has crashed spectacularly - total reset/reboot of WinXP pro, no warning, no error message, nothing. I haven't seen anything like it since the dreaded 'blue screen' of Win95 and 98. If it's any help, this app's main function is to collect and store (in an SQL database) information arriving via either a network port or a serial port (it has crashed in both cases so I don't think that the external hardware is responsible). After MS's warning ("this computer has recovered from a serious error") after rebooting, and sending the error report to MS, all they can come up with is a 'unknown device driver error'. Has anyone else had similar experiences?
chris fearnley wrote: Has anyone else had similar experiences? Nope, in fact the CLR is supposed to protected against this, and it's not like a socket listener application using ADO.NET is anything low-level enough to do something like this (and in fact, it's hard for any managed language to be low-level enough). If you're P/Invoking code, then it's a different matter. In such a case, make sure you're marshaling parameters correctly and make sure you're not using
out
andref
keywords (unless the params are pointers to pointers) for reference types, including arrays of value types (since an array is always a reference type). On one occassion I did see someone's code which included this mistake unexpectedly unload the CLR (and hence crash the app) but never a BSOD. The last time I saw a BSOD was on XP with a bad Creative Labs driver (and aren't they all?). To note, I architect .NET solutions all the time and am responsible for many .NET programmers and developers.Microsoft MVP, Visual C# My Articles
-
chris fearnley wrote: Has anyone else had similar experiences? Nope, in fact the CLR is supposed to protected against this, and it's not like a socket listener application using ADO.NET is anything low-level enough to do something like this (and in fact, it's hard for any managed language to be low-level enough). If you're P/Invoking code, then it's a different matter. In such a case, make sure you're marshaling parameters correctly and make sure you're not using
out
andref
keywords (unless the params are pointers to pointers) for reference types, including arrays of value types (since an array is always a reference type). On one occassion I did see someone's code which included this mistake unexpectedly unload the CLR (and hence crash the app) but never a BSOD. The last time I saw a BSOD was on XP with a bad Creative Labs driver (and aren't they all?). To note, I architect .NET solutions all the time and am responsible for many .NET programmers and developers.Microsoft MVP, Visual C# My Articles
Same thing with me. I've doing .net development for few years now, and have never seem any crashes from it. It might be some bad driver on your machine. I've had similar crashes before (non .net development related) with display drivers for gforce video card. How can you know it's your app crashing the system?
-
Same thing with me. I've doing .net development for few years now, and have never seem any crashes from it. It might be some bad driver on your machine. I've had similar crashes before (non .net development related) with display drivers for gforce video card. How can you know it's your app crashing the system?
It's happened on two machines (while running this app) and the machines have been fine at other times. Not much in common with them otherwise except both have XP pro and VS .NET loaded. They're different makes and they're not even in the same building! Not using any interop services, only the Win32 serial port code as suggested by the JH:Combase class
[DllImport("kernel32.dll", SetLastError=true)] internal static extern IntPtr CreateFile(String lpFileName........
etc... which I think I got from CodeProject but can't find now. Thanks for suggestions so far anyway.