Bug 30501 - new Ping() throw Exeption
Summary: new Ping() throw Exeption
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-27 12:07 UTC by Roman
Modified: 2015-08-03 03:09 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Roman 2015-05-27 12:07:06 UTC
Description of Problem:
Ubuntu 14.04.2 x64

Steps to reproduce the problem:
1. Run debug application in Monodevelop 4.0.12
2. Application has closed with Exception :
Message: System.TypeInitializationException: An exception was thrown by the type initializer for System.Net.NetworkInformation.Ping ---> System.NullReferenceException: Object reference not set to an instance of an object
  at System.Net.NetworkInformation.Ping.CheckLinuxCapabilities () [0x00000] in <filename unknown>:0 
  at System.Net.NetworkInformation.Ping..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Terminal.Payment.UI.AppLoading.IsConnection () [0x00001] in /media/destructor/Documents/Projects/Terminal6/TerminalUI/ScreenManager/AppLoading.cs:545 
  at Terminal.Payment.UI.AppLoading.Initialize () [0x00145] in /media/destructor/Documents/Projects/Terminal6/TerminalUI/ScreenManager/AppLoading.cs:128

How to fix this problem?
Comment 1 Jeffrey Stedfast 2015-05-27 12:42:51 UTC
Upgrade to MonoDevelop 5.9
Comment 2 Roman 2015-05-27 13:49:23 UTC
How to do it?
Comment 3 Jeffrey Stedfast 2015-05-27 14:38:58 UTC
I don't know, consult your Linux vendor.
Comment 4 Roman 2015-05-27 15:33:37 UTC
I guess that new version of monodevelop for my ubuntu x64 does not exist, because I had meet with upgrade monodevelop but that time I used lubuntu x86 OS
Comment 5 Roman 2015-05-28 03:35:08 UTC
Ha ha! I have upgrade monodevelop to 5.9 version but problem not resolved.
Comment 6 Roman 2015-06-16 02:29:16 UTC
So, I understand that problem is unresolved... Bad
Comment 7 David Karlaš 2015-06-18 01:41:20 UTC
If you run this normally(outside MonoDevelop)... Application doesn't crash?

Btw this exception doesn't make much sense because whole method CheckLinuxCapabilities is under try-catch :S
https://github.com/mono/mono/blob/4e27a21367f139cbd13c8f87bb3399321c900ce1/mcs/class/System/System.Net.NetworkInformation/Ping.cs#L122-L144
Comment 8 Roman 2015-06-18 03:16:26 UTC
I run application from terminal emulator without problem, moreover mono --debug=mdb-optimizations also works without problem
Comment 9 Roman 2015-06-18 03:24:42 UTC
I will remove ubuntu and install mint and all will be ok. Do you argee?
Comment 10 Roman 2015-08-03 02:52:31 UTC
I have installed mint rebeca and all works perfect on 5.9.4 version of monodevelop
Comment 11 David Karlaš 2015-08-03 03:09:57 UTC
Based on previous comment, I assume this is fixed, hence closing as fixed. Reopen if this appears again.(probably problem was outdated mono(not monodevelop) on ubuntu based on Comment 7)