Re: [Mono-winforms-list] WinForms for OsX excessive delays in responding

2010-07-20 Thread Scott Bolland

thanks for the feedback.  I have also had variable luck with WinForms.  Gtk
seems far more stable.  Time to convert my code, methinks :(
-- 
View this message in context: 
http://mono.1490590.n4.nabble.com/WinForms-for-OsX-excessive-delays-in-responding-tp2289437p2296506.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
___
Mono-winforms-list maillist  -  Mono-winforms-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winforms-list


Re: [Mono-dev] Patch to add epoll to Mono.Posix

2010-07-20 Thread Miguel de Icaza
Hello,

 Attached is a patch that adds epoll support to Mono.Posix.  

Since epoll so far is a Linux-only feature, I think that this patch can
go as-is.   

Do you mind applying it to both 2-6 and trunk?

Miguel

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Patch to add epoll to Mono.Posix

2010-07-20 Thread Jackson Harper
On Tue, 2010-07-20 at 12:38 -0400, Miguel de Icaza wrote:
 Hello,
 
  Attached is a patch that adds epoll support to Mono.Posix.  
 
 Since epoll so far is a Linux-only feature, I think that this patch can
 go as-is.   
 
 Do you mind applying it to both 2-6 and trunk?
 

Thanks, I'll commit to both tonight.


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Detecting 4.0 Support

2010-07-20 Thread Charlie Poole
Hi All,

How can I detect that Mono support for .NET 4.0 is available.

1) If I'm already running under Mono
2) If I'm not but deciding how to launch a mono process

More info - in case it helps...

NUnit has to decide what runtimes to make available. It does so
while running under the initial runtime selected by default, which
could be MS .NET on Windows.

I can do it differently on Windows and Linux if necessary.

Charlie
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-list] SerialPort.ReadTimeout = 0

2010-07-20 Thread Daniel Hughes
If you try and set ReadTimeout to Zero in mono on ubuntu 10.04 you get
a ArgumentOutOfrangeException.

However the MSDN documentation says that Zero is OK, It says that
ArugmentOutOfRangeException is thrown if:

The read time-out value is less than zero and not equal to InfiniteTimeout.

http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.readtimeout.aspx

However I do know why mono  was implemented this way it is because the
MSDN documentation used to be wrong.

http://connect.microsoft.com/VisualStudio/feedback/details/255189/bug-in-documentation-for-serialport-readtimeout-property

So what has happened is that the Mono implementation was implemented
according to buggy documentation.

We have code which we need to run on ubuntu which we can not because
of this. I'm not exactly sure why one would set ReadTimeout to zero. I
will investigate why our code is doing this and will probably have to
work around the problem.

However the problem still stands that the mono implementation is
wrong. What is the best way to handle this?

Should I raise a bug? would it do any good? The last bug I raised on
the mono serial port implementation still exists and has seen no
activity for over a year now.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Opening a file from .aspx

2010-07-20 Thread Tymoteusz Majewski


Hello gurus,


This is on ubuntu, Mono JIT compiler version 2.4.2.3

I have mono setup which I can run c# scripts properly, but I cannot open files. 

Code:
string file = Config/1.txt;
file = Server.MapPath (file);
File.Open (file, FileMode.Open);

Error:
Access to the path /MyPages/website/Config/1.txt is  denied.

The file is accessible through apache, meaning I can go to 
http://192.168.1.125/Config/1.txt; and I can read the file.

If I run the same code from a mono app (not from .aspx page) it works fine.

I read quite a lot about trustLevels, securityPolicy in web.config files, but 
things just don't seem to have any effect.
When I tried to establish the current policy level from the page itself it 
reports as Unrestricted which is an issue on its own, but that's an issue for 
later.

I tried to find something about trust levels in mono asp but I cannot find 
anything. 


The bottom line is I would like to:
a) open and read a file from within the website's directory.
b) open and read a file from a specified directory not in the application's dir 
 
(website's root dir).

Thank you in advance.

Thanks
Tymek


  ___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] SerialPort.ReadTimeout = 0

2010-07-20 Thread Christopher David Howie
On 07/20/2010 06:03 AM, Daniel Hughes wrote:
 Should I raise a bug? would it do any good? The last bug I raised on
 the mono serial port implementation still exists and has seen no
 activity for over a year now.

Bug reports for obscure areas of the framework (like serial ports, which
I'd be surprised if 1% of developers using Mono actually used) stand a
better chance of being fixed in Mono if you provide a patch that fixes
the issue yourself.  :)

For something this simple, I'm sure the patch will be pretty
straightforward.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers

If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5


IMPORTANT INFORMATION/DISCLAIMER

This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am the intended recipient, and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Creating a stand-alone linux executable

2010-07-20 Thread Tim Martin
Hi,

I have an executable that I've written on Windows, and would like to 
package for linux. I have got the executable to run under Mono (2.4.2.3) 
on my linux dev box (Ubuntu Jaunty). I'd like to package this into a 
stand-alone executable that can be deployed to other linux boxes that 
don't have the Mono libraries installed.

Various things I've seen indicate that mkbundle might be a way to 
achieve this. I can't get the automatic dependency inclusion to work, 
but it partially works if I list the executable and all the DLLs on the 
command line. I assume if I'm going to do this that I need to list every 
Mono DLL that is needed to run the final executable. I haven't been able 
to find a way to determine which Mono DLLs are necessary, but I've added 
to the list every time the executable fails with a missing DLL, and I 
have something like the following:

$ mkbundle --static -o mybundle MyApp.exe app-specific DLLS 
/usr/lib/mono/2.0/mscorlib.dll /usr/lib/mono/2.0/System.dll 
/usr/lib/mono/2.0/System.Drawing.dll /usr/lib/mono/2.0/Mono.Posix.dll 
/usr/lib/mono/2.0/System.Configuration.dll 
/usr/lib/mono/2.0/System.Xml.dll /usr/lib/mono/2.0/System.Data.dll 
/usr/lib/mono/2.0/System.Transactions.dll 
/usr/lib/mono/2.0/System.Web.Services.dll 
/usr/lib/mono/2.0/System.EnterpriseServices.dll 
/usr/lib/mono/2.0/System.Web.dll

(I'm aware that --static has licensing implications, I can probably work 
round that when I finally deploy, but I wanted to keep things simple 
ATM. --static has nothing to do with linking the .dll files, right?)

When I run this on a box (Ubuntu Intrepid) that doesn't have Mono 
installed, I get:

Message: An exception was thrown by the type initializer for 
Mono.Unix.Native.Syscall
Stack Trace:
   at System.Windows.Forms.XplatUIX11.UpdateMessageQueue 
(System.Windows.Forms.XEventQueue queue) [0x0]
   at System.Windows.Forms.XplatUIX11.GetMessage (System.Object 
queue_id, System.Windows.Forms.MSG msg, IntPtr handle, Int32 
wFilterMin, Int32 wFilterMax) [0x0]
   at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id, 
System.Windows.Forms.MSG msg, IntPtr hWnd, Int32 wFilterMin, Int32 
wFilterMax) [0x0]
   at System.Windows.Forms.Application.RunLoop (Boolean Modal, 
System.Windows.Forms.ApplicationContext context) [0x0]
   at System.Windows.Forms.Application.Run 
(System.Windows.Forms.ApplicationContext context) [0x0]
   at Psonar.Desktop.Forms.Program.Main (System.String[] args) [0x0] 
Inner Exception Message: libMonoPosixHelper.so
Inner Exception Stack Trace:
   at (wrapper managed-to-native) Mono.Unix.Native.Syscall:_L_ctermid ()
   at Mono.Unix.Native.Syscall..cctor () [0x0]

It's not obvious that this is due to a missing DLL, but I guess it 
probably is since it works fine on the other box.

So I guess my questions are:
1) Is this a sane way to generate a stand-alone executable?
2) What is a saner way?
3) What DLL (if any) am I missing?

Thanks for any suggestions,

Tim
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Creating a stand-alone linux executable

2010-07-20 Thread Alexander Shulgin
On 20.07.2010 17:39, Tim Martin wrote:

 $ mkbundle --static -o mybundle MyApp.exeapp-specific DLLS

You're missing the --deps parameter, obviously.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Creating a stand-alone linux executable

2010-07-20 Thread Robert Jordan
On 20.07.2010 16:39, Tim Martin wrote:
 Inner Exception Message: libMonoPosixHelper.so

...

 It's not obvious that this is due to a missing DLL, but I guess it
 probably is since it works fine on the other box.

It's due to a missing native SO (libMonoPosixHelper.so).
Mkbundle does not embed native libraries (excepting
libmono when the --static option is used).

Those libraries must be deployed manually (side-by-side
with your bundle).

Robert

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] SerialPort.ReadTimeout = 0

2010-07-20 Thread Miguel de Icaza

 However the problem still stands that the mono implementation is
 wrong. What is the best way to handle this?

Submit a fix to the source code, with a test that works on Windows that
shows the intended behavior.

 Should I raise a bug? would it do any good? The last bug I raised on
 the mono serial port implementation still exists and has seen no
 activity for over a year now.

Serial port bugs require a developer to find a serial cable, a serial
device and reproduce the bug, which just happens to be uncommon these
days so those bugs tend to stay there for very long periods of time.

Your best bet is to submit a patch with the fix, or to hire one of the
various fine consultants that have experience in Mono and can fix this
bug for you.

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Announcing the release of Mono 2.6.7

2010-07-20 Thread Curtis Wensley

Awesome work!  I too am glad to see MVC2 is now included. 

One issue I found with this release (wasn't in 2.6.6) is that asp.net
applications can no longer be debugged in monodevelop 2.4 or svn trunk.. (at
least on OSX, don't know about other platforms).

Hope it can be resolved soon!  BTW, is there any way to get my hands on
2.6.6 again?  It was the only one that could add breakpoints while running.. 

Cheers!
Curtis.


Andrew Jorgensen wrote:
 
 Today we release Mono 2.6.7, a bugfix release in the 2.6 series
 containing around 70 bugfixes since 2.6.4.
 
 Major Highlights:
 MVC2 is now included
 Latest versions of:
 * Soft Debugger
 * Mono's xbuild tool
 * LINQ to SQL binding
 
 Due to popular demand from Mono Tools for Visual Studio users, we have
 added packages for RHEL/CentOS 5.  These packages install
 in /opt/novell/mono similarly to our SLE Mono Extension packages and do
 not include GTK#.
 
 http://ftp.novell.com/pub/mono/download-stable/RHEL_5/
 
 Packages for openSUSE 11.3 have been added as well.
 
 Release notes are here:
 http://go-mono.com/archive/2.6.7
 
 and downloads are available here:
 http://go-mono.com/mono-downloads/
 
 Thanks to all those who contributed to this release!
 
 
 ___
 Mono-list maillist  -  Mono-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list
 
 
-- 
View this message in context: 
http://mono.1490590.n4.nabble.com/Announcing-the-release-of-Mono-2-6-7-tp2294713p2295996.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Announcing the release of Mono 2.6.7

2010-07-20 Thread Abe Gillespie
I second that! ;)

On Mon, Jul 19, 2010 at 6:43 PM, Daniel Soto daniel.sot...@gmail.com wrote:
 Great job!

 I'm very excited with this release, because I need to build some web apps
 with MVC2, and this release is perfect to me.

 2010/7/19 Andrew Jorgensen ajorgen...@novell.com

 Today we release Mono 2.6.7, a bugfix release in the 2.6 series
 containing around 70 bugfixes since 2.6.4.

 Major Highlights:
 MVC2 is now included
 Latest versions of:
 * Soft Debugger
 * Mono's xbuild tool
 * LINQ to SQL binding

 Due to popular demand from Mono Tools for Visual Studio users, we have
 added packages for RHEL/CentOS 5.  These packages install
 in /opt/novell/mono similarly to our SLE Mono Extension packages and do
 not include GTK#.

 http://ftp.novell.com/pub/mono/download-stable/RHEL_5/

 Packages for openSUSE 11.3 have been added as well.

 Release notes are here:
    http://go-mono.com/archive/2.6.7

 and downloads are available here:
    http://go-mono.com/mono-downloads/

 Thanks to all those who contributed to this release!


 ___
 Mono-list maillist  -  mono-l...@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list


 ___
 Mono-list maillist  -  mono-l...@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-list


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Announcing the release of Mono 2.6.7

2010-07-20 Thread Michael Hutchinson
On Tue, Jul 20, 2010 at 2:15 PM, Curtis Wensley
curtis.wens...@gmail.com wrote:

 Awesome work!  I too am glad to see MVC2 is now included.

 One issue I found with this release (wasn't in 2.6.6) is that asp.net
 applications can no longer be debugged in monodevelop 2.4 or svn trunk.. (at
 least on OSX, don't know about other platforms).

 Hope it can be resolved soon!  BTW, is there any way to get my hands on
 2.6.6 again?  It was the only one that could add breakpoints while running..

Did you file a bug?

-- 
Michael Hutchinson
http://mjhutchinson.com
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Announcing the release of Mono 2.6.7

2010-07-20 Thread Curtis Wensley


Yeah, was testing a bit more before doing so.  It's #624045

Thanks!
Curtis.


Michael Hutchinson wrote:
 
 Did you file a bug?
 
 
-- 
View this message in context: 
http://mono.1490590.n4.nabble.com/Announcing-the-release-of-Mono-2-6-7-tp2294713p2296171.html
Sent from the Mono - General mailing list archive at Nabble.com.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] String comparisons slow

2010-07-20 Thread Bill Blinn
Hi,

I was trying out some tests to check performance of mono with
multithreading and benchmark Windows .NET, Windows mono and Linux
(ubuntu 9.04) mono. The results I have show that string comparisons
are much slower on mono than on .NET (8x). Am I doing something wrong?

Thanks,
bill

Here are my results:

windows .net

Running test with 2 cores and 40 items
* MyApp.MultiCoreTests.TestMultiThreadInt
Beginning TestMultiThreadInt
TestMultiThreadInt Time 00:00:00.6490421
* MyApp.MultiCoreTests.TestMultiThreadName
Beginning TestMultiThreadName
TestMultiThreadName Time 00:00:02.3353270
* MyApp.MultiCoreTests.TestSingleThreadInt
Beginning TestSingleThreadInt
TestSingleThreadInt Time 00:00:01.0017084
* MyApp.MultiCoreTests.TestSingleThreadString
Beginning TestSingleThreadString
TestSingleThreadString Time 00:00:04.6166498


windows mono

Running test with 2 cores and 40 items
* MyApp.MultiCoreTests.TestMultiThreadInt
Beginning TestMultiThreadInt
TestMultiThreadInt Time 00:00:00.3894325
* MyApp.MultiCoreTests.TestMultiThreadName
Beginning TestMultiThreadName
TestMultiThreadName Time 00:00:16.9111039
* MyApp.MultiCoreTests.TestSingleThreadInt
Beginning TestSingleThreadInt
TestSingleThreadInt Time 00:00:00.6319084
* MyApp.MultiCoreTests.TestSingleThreadString
Beginning TestSingleThreadString
TestSingleThreadString Time 00:00:29.8346654


linux mono

ProcessModel: Default    DomainUsage: Single
Execution Runtime: mono-2.0
Running test with 2 cores and 40 items
.Beginning TestMultiThreadInt
TestMultiThreadInt Time 00:00:00.3695696
.Beginning TestMultiThreadName
TestMultiThreadName Time 00:00:18.2811198
.Beginning TestSingleThreadInt
TestSingleThreadInt Time 00:00:00.6757025
.Beginning TestSingleThreadString
TestSingleThreadString Time 00:00:33.9977345




and here is my code:

    [TestFixture]
    public class MultiCoreTests
    {

    private readonly TestObj[][] m_input = new
TestObj[Environment.ProcessorCount][];
    private const int NUM_ITEMS = 40;

    [TestFixtureSetUp]
    public void TestFixtureSetup()
    {
    if(Environment.ProcessorCount == 1)
    throw new IgnoreException(Cannot run this
multithreaded test on a machine with only one core.);

    Console.Out.WriteLine(Running test with {0} cores and {1}
items, Environment.ProcessorCount, NUM_ITEMS);

    }



    [SetUp]
    public void SetUp()
    {
    var r = new Random(12345);
    for (int i = 0; i  m_input.Length; i ++ )
    {
    m_input[i] = new TestObj[NUM_ITEMS];

    for(var j = 0; j  m_input[i].Length; j++)
    {
    m_input[i][j] = new TestObj()
    {
    ID = r.Next(),
    Name =
string.Format(TestObj-{0}-{1}, r.Next(), r.Next())
    };
    }
    }
    }

    [Test]
    public void TestSingleThreadInt()
    {
    Console.WriteLine(Beginning TestSingleThreadInt);
    var stopwatch = new Stopwatch();
    stopwatch.Start();
    foreach (var t in m_input)
    {
    Array.Sort(t, (x, y) = x.ID.CompareTo(y.ID));
    }

    stopwatch.Stop();

    Console.WriteLine(TestSingleThreadInt Time {0},
stopwatch.Elapsed);
    }

    [Test]
    public void TestSingleThreadString()
    {
    Console.WriteLine(Beginning TestSingleThreadString);
    var stopwatch = new Stopwatch();
    stopwatch.Start();
    foreach (var t in m_input)
    {
    Array.Sort(t, (x, y) = x.Name.CompareTo(y.Name));
    }

    stopwatch.Stop();

    Console.WriteLine(TestSingleThreadString Time {0},
stopwatch.Elapsed);
    }


    [Test]
    public void TestMultiThreadInt()
    {
    var threads = new ListThread();

    for(var i = 0; i  Environment.ProcessorCount; i ++)
    {
    var i1 = i;
    threads.Add(new Thread(
    () = Array.Sort(m_input[i1],
 (x, y) =
x.ID.CompareTo(y.ID;
    }

    Console.WriteLine(Beginning TestMultiThreadInt);
    var stopwatch = new Stopwatch();
    stopwatch.Start();
    foreach (var thread in threads)
    thread.Start();
    foreach (var thread in threads)
    thread.Join();

    stopwatch.Stop();

    Console.WriteLine(TestMultiThreadInt Time {0}, stopwatch.Elapsed);

    }

    [Test]
    public void TestMultiThreadName()
    {
    var threads = new ListThread();

    for (var i = 0; i  Environment.ProcessorCount; i++)
    {