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. Other Discussions
  3. Clever Code
  4. Ping bug ,net 2.0 + Vista

Ping bug ,net 2.0 + Vista

Scheduled Pinned Locked Moved Clever Code
csharphelpsysadmindata-structures
8 Posts 5 Posters 4 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.
  • N Offline
    N Offline
    NormDroid
    wrote on last edited by
    #1

    This is a proven bug and cost me a day to fix... I have a network scanning app entirely written in C# with a few invoke calls (mainly to listview), when running on Vista it causes a crash in in ntdll.dll with invalid handle and the stack back to the C# app is gone. As this is a multithreading app. with about 9 threads running at any one time, my first suspions where the GUI had something to do with it ( I know, it would of crashed in User32.dll), after a days worth of commenting out I nailed it down to System.Net.NetworkInformation.Ping, it seems this causes to crash when called over and over again. The initial solution was to rework the code use ICMP helper functions outside in a DLL when would be interoped by my application. Once this proved that there definitely was a handle leak or bug with either the network driver or some glue between my app and the network subsystem. I reworked the DLL out to just make the ICMP helper function interoped from inside my app and bingo, were all self contained again. What should I do, I've only ever reported a bug to Microsoft back in '95 and never got any answer and I wouldn't know where to begin to report a bug now.

    We made the buttons on the screen look so good you'll want to lick them. Steve Jobs

    D S A 3 Replies Last reply
    0
    • N NormDroid

      This is a proven bug and cost me a day to fix... I have a network scanning app entirely written in C# with a few invoke calls (mainly to listview), when running on Vista it causes a crash in in ntdll.dll with invalid handle and the stack back to the C# app is gone. As this is a multithreading app. with about 9 threads running at any one time, my first suspions where the GUI had something to do with it ( I know, it would of crashed in User32.dll), after a days worth of commenting out I nailed it down to System.Net.NetworkInformation.Ping, it seems this causes to crash when called over and over again. The initial solution was to rework the code use ICMP helper functions outside in a DLL when would be interoped by my application. Once this proved that there definitely was a handle leak or bug with either the network driver or some glue between my app and the network subsystem. I reworked the DLL out to just make the ICMP helper function interoped from inside my app and bingo, were all self contained again. What should I do, I've only ever reported a bug to Microsoft back in '95 and never got any answer and I wouldn't know where to begin to report a bug now.

      We made the buttons on the screen look so good you'll want to lick them. Steve Jobs

      D Offline
      D Offline
      Dan Neely
      wrote on last edited by
      #2

      for visual studio, report here: http://connect.microsoft.com/feedback/default.aspx?SiteID=210[^]

      -- Rules of thumb should not be taken for the whole hand.

      1 Reply Last reply
      0
      • N NormDroid

        This is a proven bug and cost me a day to fix... I have a network scanning app entirely written in C# with a few invoke calls (mainly to listview), when running on Vista it causes a crash in in ntdll.dll with invalid handle and the stack back to the C# app is gone. As this is a multithreading app. with about 9 threads running at any one time, my first suspions where the GUI had something to do with it ( I know, it would of crashed in User32.dll), after a days worth of commenting out I nailed it down to System.Net.NetworkInformation.Ping, it seems this causes to crash when called over and over again. The initial solution was to rework the code use ICMP helper functions outside in a DLL when would be interoped by my application. Once this proved that there definitely was a handle leak or bug with either the network driver or some glue between my app and the network subsystem. I reworked the DLL out to just make the ICMP helper function interoped from inside my app and bingo, were all self contained again. What should I do, I've only ever reported a bug to Microsoft back in '95 and never got any answer and I wouldn't know where to begin to report a bug now.

        We made the buttons on the screen look so good you'll want to lick them. Steve Jobs

        S Offline
        S Offline
        S Douglas
        wrote on last edited by
        #3

        norm .net wrote:

        I nailed it down to System.Net.NetworkInformation.Ping, it seems this causes to crash when called over and over again.

        How often are you calling Ping?


        I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:

        N 1 Reply Last reply
        0
        • N NormDroid

          This is a proven bug and cost me a day to fix... I have a network scanning app entirely written in C# with a few invoke calls (mainly to listview), when running on Vista it causes a crash in in ntdll.dll with invalid handle and the stack back to the C# app is gone. As this is a multithreading app. with about 9 threads running at any one time, my first suspions where the GUI had something to do with it ( I know, it would of crashed in User32.dll), after a days worth of commenting out I nailed it down to System.Net.NetworkInformation.Ping, it seems this causes to crash when called over and over again. The initial solution was to rework the code use ICMP helper functions outside in a DLL when would be interoped by my application. Once this proved that there definitely was a handle leak or bug with either the network driver or some glue between my app and the network subsystem. I reworked the DLL out to just make the ICMP helper function interoped from inside my app and bingo, were all self contained again. What should I do, I've only ever reported a bug to Microsoft back in '95 and never got any answer and I wouldn't know where to begin to report a bug now.

          We made the buttons on the screen look so good you'll want to lick them. Steve Jobs

          A Offline
          A Offline
          Antony M Kancidrowski
          wrote on last edited by
          #4

          Is this only a Vista problem? I currently have a multithreaded pinger service using System.Net.NetworkInformation.Ping that runs on W2K and XP without a problem. We have not tried on Vista as yet as we currently do not support that platform.

          Ant. I'm hard, yet soft.
          I'm coloured, yet clear.
          I'm fruity and sweet.
          I'm jelly, what am I? Muse on it further, I shall return!
          - David Walliams (Little Britain)

          N 1 Reply Last reply
          0
          • S S Douglas

            norm .net wrote:

            I nailed it down to System.Net.NetworkInformation.Ping, it seems this causes to crash when called over and over again.

            How often are you calling Ping?


            I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:

            N Offline
            N Offline
            NormDroid
            wrote on last edited by
            #5

            Scanning a typical subnet 192.168.0.1 - 192.168.0.254, it crashes after the 4 or 5 ping, inside a thread, it's net my code/multithreading issue because I reworked it to use the icmp ip helper and it works a treat. Could be a mixture of .net and vista network driver for my nvidia n/w card?

            We made the buttons on the screen look so good you'll want to lick them. Steve Jobs

            S 1 Reply Last reply
            0
            • A Antony M Kancidrowski

              Is this only a Vista problem? I currently have a multithreaded pinger service using System.Net.NetworkInformation.Ping that runs on W2K and XP without a problem. We have not tried on Vista as yet as we currently do not support that platform.

              Ant. I'm hard, yet soft.
              I'm coloured, yet clear.
              I'm fruity and sweet.
              I'm jelly, what am I? Muse on it further, I shall return!
              - David Walliams (Little Britain)

              N Offline
              N Offline
              NormDroid
              wrote on last edited by
              #6

              Antony M Kancidrowski wrote:

              Is this only a Vista problem? I

              Yes works a treat on XP. See my thread a above, I also get a PROCESS_HAS_PAGE_LOCKED bsod :wtf:, this usually happens if I stop the app. from Visual studio, and not when I close the app normally. Which I can now suspect the n/w card driver, it works if I rework the .net code to pinvoke icmp helper functions.

              We made the buttons on the screen look so good you'll want to lick them. Steve Jobs

              M 1 Reply Last reply
              0
              • N NormDroid

                Scanning a typical subnet 192.168.0.1 - 192.168.0.254, it crashes after the 4 or 5 ping, inside a thread, it's net my code/multithreading issue because I reworked it to use the icmp ip helper and it works a treat. Could be a mixture of .net and vista network driver for my nvidia n/w card?

                We made the buttons on the screen look so good you'll want to lick them. Steve Jobs

                S Offline
                S Offline
                S Douglas
                wrote on last edited by
                #7

                norm .net wrote:

                after the 4 or 5 ping

                Ouch! That's nothing, it should be able to handle way more than that, me thinks.


                I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:

                1 Reply Last reply
                0
                • N NormDroid

                  Antony M Kancidrowski wrote:

                  Is this only a Vista problem? I

                  Yes works a treat on XP. See my thread a above, I also get a PROCESS_HAS_PAGE_LOCKED bsod :wtf:, this usually happens if I stop the app. from Visual studio, and not when I close the app normally. Which I can now suspect the n/w card driver, it works if I rework the .net code to pinvoke icmp helper functions.

                  We made the buttons on the screen look so good you'll want to lick them. Steve Jobs

                  M Offline
                  M Offline
                  Martin Kalitis
                  wrote on last edited by
                  #8

                  Hmm...that sounds like there ius a bug in the network layer - specifically the io completion/io cancel routines as such is OS/network card driver specific so would assume that it would work fine on anything else. Hmmm looks like Vista is bleeding edge:(

                  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