Mono throws OutOfMemoryException on Ubuntu, but not OSX or Windows

I installed Mono on an Ubuntu server and "Hello World" works, but a simplified application that processes and processes some arrays without problems in Mono on OSX or Windows gives:

System.OutOfMemoryException: Out of memory. at (wrapper alloc) object:AllocVector (intptr,intptr) 

It should not contain more than a few MB of memory. The server has 4 GB of RAM.

Running again in the alloc profile gives another exception:

 System.OverflowException: Number overflow. at (wrapper managed-to-native) object:__icall_wrapper_mono_array_new_specific (intptr,int) 

The problem is incompatible, sometimes the code runs once, but not the second time. Sometimes this does not work the first time. Sometimes he fails in a different way, but for the same reason.

The program and full output can be downloaded from http://dev.intelorca.co.uk/2014/gacj_allocproblem.zip It would be nice to see if anyone has problems running the program under mono and can give any idea of ​​the problem . Any pointers to configuring Mono will also be useful to work better on Ubuntu.

The program should output "Cambridge Surprise Major" 128 times.

0
c # linux ubuntu mono
source share
1 answer

The problem arose because of an error in the Mono compiler "right at the point in time" with the amd64 architecture. This has been fixed since January 3, 2015.

Error Report: https://bugzilla.xamarin.com/show_bug.cgi?id=25631
Fix: https://github.com/mono/mono/commit/9e03c10d8fefea9210ca015cf484e819623c0a1a

0
source share

All Articles