Ping bug ,net 2.0 + Vista
-
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
-
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
-
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
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:
-
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
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) -
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:
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
-
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)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
-
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
-
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
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:(