Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Total crash & reboot in XP pro

Total crash & reboot in XP pro

Scheduled Pinned Locked Moved C#
databasehelpcsharpc++sysadmin
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    quilkin
    wrote on last edited by
    #1

    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?

    H 1 Reply Last reply
    0
    • Q quilkin

      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?

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      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 and ref 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

      W 1 Reply Last reply
      0
      • H Heath Stewart

        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 and ref 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

        W Offline
        W Offline
        Werdna
        wrote on last edited by
        #3

        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?

        Q 1 Reply Last reply
        0
        • W Werdna

          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?

          Q Offline
          Q Offline
          quilkin
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups