Eddie Rangel | 5 Mar 19:52 2015

Mono-Project GSoC Proposals

Hello Mono-Project GSoC Team,


I am interested in applying to the Google Summer of Code 2015 program and am very interested in contributing to the Mono-Project.


Projects that I am interested in contributing to are “Microsoft .NET and Mono Integration” and “Integrate Reference Sources code into Mono”


I have read through many pages of documentation on the Mono-Project site regarding the strategies that will be employed. I want to ensure that the specific pieces that I will work on follow the priority outlined.


I would like to discuss further with the Mono-Project GSoC Team where I should focus my efforts regarding which components would be more favorable in porting initially.


I am in my final semester as a graduate student working towards completion of my M.S. in Software Engineering from California State University, Fullerton.


I’m looking forward to discussing my proposal with the Mono-Project GSoC Team. I’ve been monitoring the IRC #monosoc room and have joined the various mailing lists. I have also requested access to the Trello board for the Mono/.Net integration.


In the mean time, I will be working on getting my Dev machine prepared.


Thanks.


-Eddie Rangel

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Neale Ferguson | 5 Mar 19:28 2015
Picon

NRE building from head

I cloned from head yesterday and am now crashing in
IKVM.Reflection.TypeName.GetHashCode with a NRE. Does this look familiar?
Before the clone, the copy I was using was up to date as of Monday and it
was working. I recloned just to have a clean slate after Atushi committed
my endian fixes for the reference sources.

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of
an object
  at IKVM.Reflection.TypeName.GetHashCode () [0x00000] in <filename
unknown>:0 
  at 
System.Collections.Generic.GenericEqualityComparer`1[IKVM.Reflection.TypeNa
me].GetHashCode (TypeName obj) [0x00000] in <filename unknown>:0
  at 
System.Collections.Generic.Dictionary`2[IKVM.Reflection.TypeName,IKVM.Refle
ction.Type].Insert (TypeName key, IKVM.Reflection.Type value, Boolean add)
[0x00000] in <filename unknown>:0
  at 
System.Collections.Generic.Dictionary`2[IKVM.Reflection.TypeName,IKVM.Refle
ction.Type].Add (TypeName key, IKVM.Reflection.Type value) [0x00000] in
<filename unknown>:0
  at IKVM.Reflection.Reader.ModuleReader.PopulateTypeDef () [0x00000] in
<filename unknown>:0
  at IKVM.Reflection.Reader.ModuleReader.FindType (TypeName typeName)
[0x00000] in <filename unknown>:0
  at IKVM.Reflection.Reader.AssemblyReader.FindType (TypeName typeName)
[0x00000] in <filename unknown>:0
  at IKVM.Reflection.Assembly.GetType (System.String name, Boolean
throwOnError, Boolean ignoreCase) [0x00000] in <filename unknown>:0
  at IKVM.Reflection.Assembly.GetType (System.String name, Boolean
throwOnError) [0x00000] in <filename unknown>:0
  at IKVM.Reflection.Assembly.GetType (System.String name) [0x00000] in
<filename unknown>:0
  at Mono.CSharp.StaticImporter.InitializeBuiltinTypes
(Mono.CSharp.BuiltinTypes builtin, IKVM.Reflection.Assembly corlib)
[0x00000] in <filename unknown>:0
  at Mono.CSharp.StaticLoader.LoadReferences (Mono.CSharp.ModuleContainer
module) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename
unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object
reference not set to an instance of an object
Eberhard Beilharz | 5 Mar 09:15 2015

PR-977 updated

Just wanted to bring pull request #977 to attention since it got
recently updated. It basically already got improved almost a year ago,
and the last outstanding thing was a squash of two commits and a rebase.
This is done now. It would be great it that PR could be merged soon.

Thanks,
    Eberhard

https://github.com/mono/mono/pull/977
Spo1ler | 4 Mar 19:20 2015
Picon

Google Summer of Code 2015

Good day everyone.

When I checked Google SoC organizations page I've immediately noticed that there was a project connected with porting some of the code that Microsoft outsourced to work with Mono. I'm very interested in low-level aspects of developing for .NET Platform, and even though I've almost never developed specifically for Mono. I instantly decided that I want to get involved in it.

My name is Egor Shkorov. I'm 4th year student at Belorussian State University, Faculty of Applied Mathematics and Computer science.  I have a 1.5 year experience working as .NET/C++ (alternately) in Belorussian company Relon-Soft, we develop software for american company SIGMA3. Before that I've worked for half a year as .NET developer. 

The projects that I'm interested in are
  • Port the coreclr GC to work on top of Mono. (Mentor: Mark Probst).  I find this the most interesting one. When Microsoft opened coreclr sources, I've spent some time reading gc sources and this is one of the most interesting experience with open-source projects I've had. This project is very challenging, but very rewarding, from standpoint of experience for a programmer and performance for Mono framework.
  • Port mono to asm.js. (Mentor: João Matos). This one is very interesting from other point of view. There is a tendency now for everything to work inside a browser and even such complex systems as big managed frameworks like Mono and .NET shouldn't ignore this trend. I have some experience working with JavaScript, and I would be very grateful for an opportunity to work on such a project.
  • Port CoreCLR Features to Mono (Mentor: Ludovic Henry) I don't have much experience developing specifically for Mono, so when I saw the projects I've started looking through the repositories to compare features so I can, as required, say what feature I want to develop, but one day isn't enough to find this information, so I need to spent some more time. But this one is really cool.
  • Integrate Reference Sources code into Mono  (Mentor: Ludovic Henry). This one is important for many reasons. Especially for the purpose of keeping everything consistent across platforms and incorporating best decisions from both frameworks.
I've listed some of the projects I'm interested in, but I would gladly do any other project, if mentors think that there are better projects for someone like me to do or if I'm not qualified enough to do projects I've enumerated above. 

I'm very interested in participating in my first Google Summer of Code and in particular in Mono project, because I think this is a great experience for any programmer, who is interested in .NET Framework on all levels of programming, from low-level run-time programming to implementing specific library features.

I'm seeking guidance from SoC mentors and will gladly accept any advice.

Thanks everyone for reading this wall of text, hope this will get noticed by mentors.
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Lihini Senanayake | 4 Mar 16:47 2015
Picon

GSoC 2015 - Integrate Reference Sources code into Mono

Hello everyone,

I'm a senior computer science undergraduate from University of Moratuwa, Sri Lanka. I would like to contribute to the above mentioned project in GSoc 2015. I've heard about the Mono project before, but I never got a chance to work with it. A little research on current implementation of reference sources in mono lead me to https://github.com/mono/mono/tree/master/mcs/class and the classes open sourced by Microsoft on https://github.com/mono/referencesource. But I'm still lost on how to advance on this.

I might be new to Mono project but I have being developing with C# for some time. I hope that would be enough as a starting point. Any pointers are gladly appreciated.

Best regards,

Lihini Senanayake
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Neale Ferguson | 27 Feb 17:10 2015
Picon

Endian problem - #27258

This appears to solve the problem I reported that was causing build
problems on s390x (big-endian). I get a clean build at least, and the
tests in mono/mini & mono/tests pass. I'm sure it is suboptimal (it seems
that a generic method might be an option) but it illustrates what needs
doing:

--- a/mscorlib/system/globalization/charunicodeinfo.cs
+++ b/mscorlib/system/globalization/charunicodeinfo.cs
 <at>  <at>  -109,6 +109,54  <at>  <at>  namespace System.Globalization {
             internal sbyte digit;
         }

+        unsafe private static int EndianSwap(int value)
+        {
+            if (!BitConverter.IsLittleEndian) {
+                byte *ptr = (byte *) &value;
+                int res;
+                byte *buf = (byte *) &res;
+                int t = sizeof(int) - 1;
+
+                for (int i = 0; i < sizeof(int); i++)
+                    buf[t-i] = ptr[i];
+                
+                return(res);
+            } else
+                return(value);
+        }
+
+        unsafe private static uint EndianSwap(uint value)
+        {
+            if (!BitConverter.IsLittleEndian) {
+                byte *ptr = (byte *) &value;
+                uint res;
+                byte *buf = (byte *) &res;
+                uint t = sizeof(uint) - 1;
+
+                for (uint i = 0; i < sizeof(uint); i++)
+                    buf[t-i] = ptr[i];
+                
+                return(res);
+            } else
+                return(value);
+        }
+
+        unsafe private static ushort EndianSwap(ushort value)
+        {
+            if (!BitConverter.IsLittleEndian) {
+                byte *ptr = (byte *) &value;
+                ushort res;
+                byte *buf = (byte *) &res;
+                ushort t = sizeof(ushort) - 1;
+
+                for (ushort i = 0; i < sizeof(ushort); i++)
+                    buf[t-i] = ptr[i];
+                
+                return(res);
+            } else
+                return(value);
+        }
+

         //We need to allocate the underlying table that provides us with
the
information that we
         //use.  We allocate this once in the class initializer and then we
don't need to worry
 <at>  <at>  -125,11 +173,11  <at>  <at>  namespace System.Globalization {
             UnicodeDataHeader* mainHeader =
(UnicodeDataHeader*)pDataTable;

             // Set up the native pointer to different part of the tables.
-            s_pCategoryLevel1Index = (ushort*) (pDataTable +
mainHeader->OffsetToCategoriesIndex);
-            s_pCategoriesValue = (byte*) (pDataTable +
mainHeader->OffsetToCategoriesValue);
-            s_pNumericLevel1Index = (ushort*) (pDataTable +
mainHeader->OffsetToNumbericIndex);
-            s_pNumericValues = (byte*) (pDataTable +
mainHeader->OffsetToNumbericValue);
-            s_pDigitValues = (DigitValues*) (pDataTable +
mainHeader->OffsetToDigitValue);
+            s_pCategoryLevel1Index = (ushort*) (pDataTable +
EndianSwap(mainHeader->OffsetToCategoriesIndex));
+            s_pCategoriesValue = (byte*) (pDataTable +
EndianSwap(mainHeader->OffsetToCategoriesValue));
+            s_pNumericLevel1Index = (ushort*) (pDataTable +
EndianSwap(mainHeader->OffsetToNumbericIndex));
+            s_pNumericValues = (byte*) (pDataTable +
EndianSwap(mainHeader->OffsetToNumbericValue));
+            s_pDigitValues = (DigitValues*) (pDataTable +
EndianSwap(mainHeader->OffsetToDigitValue));

             return true;
         }
 <at>  <at>  -254,11 +302,11  <at>  <at>  namespace System.Globalization {
         internal unsafe static double InternalGetNumericValue(int ch) {
             Contract.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid
Unicode range.");
             // Get the level 2 item from the highest 12 bit (8 - 19) of
ch.
-            ushort index = s_pNumericLevel1Index[ch >> 8];
+            ushort index = EndianSwap(s_pNumericLevel1Index[ch >> 8]);
             // Get the level 2 WORD offset from the 4 - 7 bit of ch.  This
provides the base offset of the level 3 table.
             // The offset is referred to an float item in
m_pNumericFloatData.
             // Note that & has the lower precedence than addition, so
don't
forget the parathesis.
-            index = s_pNumericLevel1Index[index + ((ch >> 4) & 0x000f)];
+            index = EndianSwap(s_pNumericLevel1Index[index + ((ch >> 4) &
0x000f)]);
             byte* pBytePtr = (byte*)&(s_pNumericLevel1Index[index]);
             // Get the result from the 0 -3 bit of ch.
 #if WIN64
 <at>  <at>  -448,12 +496,13  <at>  <at>  namespace System.Globalization {

         [System.Security.SecuritySafeCritical]  // auto-generated
         internal unsafe static byte InternalGetCategoryValue(int ch, int
offset) {
+
             Contract.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid
Unicode range.");
             // Get the level 2 item from the highest 12 bit (8 - 19) of
ch.
-            ushort index = s_pCategoryLevel1Index[ch >> 8];
+            ushort index = EndianSwap(s_pCategoryLevel1Index[ch >> 8]);
             // Get the level 2 WORD offset from the 4 - 7 bit of ch.  This
provides the base offset of the level 3 table.
             // Note that & has the lower precedence than addition, so
don't
forget the parathesis.
-            index = s_pCategoryLevel1Index[index + ((ch >> 4) & 0x000f)];
+            index = EndianSwap(s_pCategoryLevel1Index[index + ((ch >> 4) &
0x000f)]);
             byte* pBytePtr = (byte*)&(s_pCategoryLevel1Index[index]);
             // Get the result from the 0 -3 bit of ch.
             byte valueIndex = pBytePtr[(ch & 0x000f)];
techi eth | 26 Feb 07:12 2015
Picon

crash at mono_class_vtable

Hi All,

 

I am getting one exception when running  IPhone application using mono. Please find below stack trace.

 

Assertion at mini.c:6289, condition `vtable' not met

 

Stacktrace:

 

  at <unknown> <0xffffffff>

  at IPhone.MainService..ctor () <0x000ab>

  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>

  at <unknown> <0xffffffff>

  at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) <0xffffffff>

  at System.Reflection.MonoCMethod.InternalInvoke (object,object[]) <0x0003b>

  at System.Activator.CreateInstance (System.Type,bool) <0x0018b>

  at System.Activator.CreateInstance (System.Type) <0x00017>

  at System.Reflection.Assembly.CreateInstance (string,bool) <0x0006f>

  at System.Reflection.Assembly.CreateInstance (string) <0x0001f>

 

Below is the detail of mono version.

mono --version

Mono JIT compiler version 3.10.0 (tarball Mon Dec  8 11:37:11 GMT 2014)

Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com

        TLS:           __thread

        SIGSEGV:       normal

        Notifications: epoll

        Architecture:  armel,vfp+fallback

        Disabled:      aot,profiler

        Misc:          softdebug

        LLVM:          supported, not enabled.

        GC:            sgen

 

Regards,

techi

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Christian Hofstaedtler | 24 Feb 21:45 2015
Picon

Patch for Bug 8207: Can't set 1000000 baud with System.IO.Ports.SerialPort.BaudRate

This patch (against mono-2.10.8.1 from Debian) allows setting
custom baud rates, and very likely would support a baudrate of
1000000.

I release this patch under the MIT license.

--- serial.c.orig	2013-01-30 12:06:52.379691461 +0100
+++ serial.c.orig	2013-01-30 13:05:50.383390154 +0100
 <at>  <at>  -17,6 +17,11  <at>  <at>  
 #endif
 #include <sys/ioctl.h>

+/* This is for ASYNC_*, serial_struct on linux */
+#if defined(__linux__)
+#include <linux/serial.h>
+#endif
+
 #include <glib.h>

 /* This is for FIONREAD on solaris */
 <at>  <at>  -151,6 +156,7  <at>  <at>  
 set_attributes (int fd, int baud_rate, MonoParity parity, int dataBits, MonoStopBits stopBits,
MonoHandshake handshake)
 {
 	struct termios newtio;
+	gboolean custom_baud_rate = FALSE;

 	if (tcgetattr (fd, &newtio) == -1)
 		return FALSE;
 <at>  <at>  -227,8 +233,10  <at>  <at>  
 	    break;
 	case 50:
 	case 0:
-	default:
 	    baud_rate = B9600;
+	    break;
+	default:
+	    custom_baud_rate = TRUE;
 		break;
 	}

 <at>  <at>  -319,16 +327,54  <at>  <at>  
 	    newtio.c_iflag |= IXOFF | IXON;
 		break;
 	}
-	
-	if (cfsetospeed (&newtio, baud_rate) < 0 || cfsetispeed (&newtio, baud_rate) < 0 ||
-	    tcsetattr (fd, TCSANOW, &newtio) < 0)
+
+	if (custom_baud_rate == FALSE)
 	{
-		return FALSE;
+		if (cfsetospeed (&newtio, baud_rate) < 0 || cfsetispeed (&newtio, baud_rate) < 0)
+		{
+			return FALSE;
+		}
 	}
 	else
 	{
-	return TRUE;
+		/* On Linux, to set a custom baud rate, we must set the "standard" baud_rate
+		 * to 38400. */
+		if (cfsetospeed (&newtio, B38400) < 0 || cfsetispeed (&newtio, B38400) < 0)
+		{
+			return FALSE;
+		}
+	}
+
+	if (tcsetattr (fd, TCSANOW, &newtio) < 0)
+	{
+		return FALSE;
+	}
+
+	if (custom_baud_rate == TRUE)
+	{
+#if defined(__linux__)
+		struct serial_struct ser;
+
+		if (ioctl (fd, TIOCGSERIAL, &ser) < 0)
+		{
+			return FALSE;
+		}
+
+		ser.custom_divisor = ser.baud_base / baud_rate;
+		ser.flags &= ~ASYNC_SPD_MASK;
+		ser.flags |= ASYNC_SPD_CUST;
+
+		if (ioctl (fd, TIOCSSERIAL, &ser) < 0)
+		{
+			return FALSE;
+		}
+#else
+		/* Don't know how to set custom baud rate on this platform. */
+		return FALSE;
+#endif
 	}
+
+	return TRUE;
 }
Chad Dettmering | 24 Feb 19:02 2015
Picon

ToolStripManager.RevertMerge

Hello Mono Devs! This is my first time posting to this mailing list so forgive me if I step on any toes.

I was running an application called Chummer5 link: https://code.google.com/p/chummer5/ with Mono. The application kept crashing on the method Windows.Systems.Forms.ToolStripManager.RevertMerge. 

Being the curious software dev that I am, I decided to download the Mono and Chummer5 source code to figure out the problem. I might add the application runs fine on a Windows machine using the official .NET runtime.

After poking around I came to this line of code in Chummer5

// Merge the ToolStrips.
ToolStripManager.RevertMerge("toolStrip");
ToolStripManager.Merge(toolStrip, "toolStrip"); 

which leads to an ArgumentNullException in Mono. The argument is not null of course but this method calls the base RevertMerge method which takes (ToolStrip, ToolStrip) as it's parameters, and uses the FindToolStrip method to find the ToolStrip based on the name. Now this implementation will always cause the RevertMerge parameter to be null if a Merge has not been called with the same name.

Digging into the Mono source I came to this line of code inside the RevertMerge method implementation

if (sourceToolStrip == null)
    throw new ArgumentNullException ("sourceToolStrip");

So Mono is throwing an Exception explicitly in this case and will throw an Exception everytime RevertMerge is called before Merge using the same

I thought this was odd so I went to the msdn documentation here: https://msdn.microsoft.com/en-us/library/b4e35dwy%28v=vs.110%29.aspx

According to the documentation this method shouldn't throw any Exceptions, instead it should return false if the RevertMerge failed. Also looking at the example on the page it shows this as a valid way to use the method

// Undo previous merge, if any. 
ToolStripManager.RevertMerge(cmsBase, cmsItemsToMerge);

which implies that sending null is valid.

Given all of this information is this a "bug" in Mono? Someone wrote that Exception explicitly so the code is working as intended but it breaks compatibility on the application I'm running.

Any more info on this topic would be great! Nice to meet everyone! :)

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Rodrigo Kumpera | 24 Feb 16:30 2015
Picon

Re: Mono release headsup

The patch looks ok, but for it to be merge it must be released under the MIT license, so the author will have to do it.



On Tue, Feb 24, 2015 at 4:52 AM, Ariel Rocholl <publico <at> arocholl.com> wrote:
Hi there,

Could the fix proposed for bug #8207 be considered for the release? This was proposed long ago but didn't progress, and recent renewed interest on high speed custom baud serial communication is required by all IoT gadgets and sort. We are not being able to propose Mono for IoT just because of this, and fix seems really easy to propagate.

Best Regards,
----
Ariel Rocholl



On Tue, Feb 24, 2015 at 1:08 AM, Rodrigo Kumpera <kumpera <at> gmail.com> wrote:
Hello everyone,

We're branching mono for next release as we speak.

We'll be able to easily merge community PR until March 6. After that it will have to go through our
internal QA process, which raises the bar a lot and only release blockers can get in.

I'll be handling the intake of community changes for the release so make sure I'm aware of any PR targeting it to increase their likelihood of been included.

--
Rodrigo

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list



_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Rodrigo Kumpera | 24 Feb 01:08 2015
Picon

Mono release headsup

Hello everyone,

We're branching mono for next release as we speak.

We'll be able to easily merge community PR until March 6. After that it will have to go through our
internal QA process, which raises the bar a lot and only release blockers can get in.

I'll be handling the intake of community changes for the release so make sure I'm aware of any PR targeting it to increase their likelihood of been included.

--
Rodrigo
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list <at> lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Gmane