Re: [Mono-dev] HttpListener hangs with r106513

2008-07-03 Thread Gert Driesen
Hey Casey,

Miguel prepared a fix for this issue (committed by Martin in r107127), and
I've added a unit test based on your repro.

Gert

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Casey
Marshall
Sent: woensdag 25 juni 2008 1:05
To: mono-devel
Subject: [Mono-dev] HttpListener hangs with r106513

I've noticed that it recent SVN mono snapshots (r106513) using
HttpListener and WebRequest in the same process hangs. This doesn't hang
with 1.9.1, and didn't with less recent snapshots.

I haven't tried having the client and server in different processes, and
don't know if it reproduces there.

Test case:


using System;
using System.IO;
using System.Net;
using System.Threading;

class simplehttp
{
public static void Main(string[] argv)
{
simplehttp sh = new simplehttp();
Thread srv = new Thread(new ThreadStart(sh.ServerMain));
srv.Name = HttpServer;
srv.Start();

for (;;)
{
HttpWebRequest req = (HttpWebRequest)
WebRequest.Create (http://localhost:/foobar/;);
req.ServicePoint.Expect100Continue = false;
req.ServicePoint.UseNagleAlgorithm = false;
req.Method = POST;
StreamWriter w = new
StreamWriter(req.GetRequestStream());
w.WriteLine(Hello, server!);
w.Close();

HttpWebResponse resp = (HttpWebResponse)
req.GetResponse();
StreamReader r = new
StreamReader(resp.GetResponseStream());
System.Console.WriteLine(client reads: {0},
r.ReadToEnd());
r.Close();
}
}

private void ServerMain()
{
HttpListener listener = new HttpListener();
listener.Prefixes.Add(http://*:/foobar/;);
listener.Start();
while (true)
{
HttpListenerContext ctx = listener.GetContext();
ThreadPool.QueueUserWorkItem(new
WaitCallback(HandleConnection), ctx);
}
}

private void HandleConnection(object state)
{
HttpListenerContext ctx = (HttpListenerContext) state;
HttpListenerRequest req = ctx.Request;
StreamReader r = new StreamReader(req.InputStream);
System.Console.WriteLine (server reads {0},
r.ReadToEnd());

HttpListenerResponse resp = ctx.Response;
StreamWriter o = new StreamWriter(resp.OutputStream);
o.WriteLine(Hello, world!);
o.Close();
}
}

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

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


Re: [Mono-dev] [Mono-patches] r107145 - trunk/mcs/class/System.Data/System.Data

2008-07-03 Thread Gert Driesen
Hey Veerapuram,

I don't think this change is correct. I've done some more tests, and this is
the behavior I'm seeing:

* on 1.0 profile, you are never allowed to set value to NULL.
* on 2.0 profile, you are only allowed to set value to NULL if the column is
backed by a reference type.

I'll add unit tests for this to DataRowTest2.cs in a few minutes, and mark
them NotWorking.

Let me know if you want me to submit a patch that changes our implementation
accordingly.

Gert

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Veerapuram
Varadhan ([EMAIL PROTECTED])
Sent: donderdag 3 juli 2008 15:38
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [Mono-patches] r107145 - trunk/mcs/class/System.Data/System.Data

Author: varadhan
Date: 2008-07-03 09:38:09 -0400 (Thu, 03 Jul 2008)
New Revision: 107145

Modified:
   trunk/mcs/class/System.Data/System.Data/ChangeLog
   trunk/mcs/class/System.Data/System.Data/DataRow.cs
Log:
Use DBNull value instead of throwing an exception


Modified: trunk/mcs/class/System.Data/System.Data/ChangeLog
===
--- trunk/mcs/class/System.Data/System.Data/ChangeLog   2008-07-03 13:37:14
UTC (rev 107144)
+++ trunk/mcs/class/System.Data/System.Data/ChangeLog   2008-07-03 13:38:09
UTC (rev 107145)
@@ -1,3 +1,7 @@
+2008-07-03  Marek Habersack  [EMAIL PROTECTED]
+
+   * DataRow.cs (this []): Use DBNull instead of throwing an exception
+   
 2008-07-01  Rodrigo Kumpera  [EMAIL PROTECTED]
 
* DataTable.cs: Kill some foreach loops.

Modified: trunk/mcs/class/System.Data/System.Data/DataRow.cs
===
--- trunk/mcs/class/System.Data/System.Data/DataRow.cs  2008-07-03 13:37:14
UTC (rev 107144)
+++ trunk/mcs/class/System.Data/System.Data/DataRow.cs  2008-07-03 13:38:09
UTC (rev 107145)
@@ -178,9 +178,8 @@
DataColumn column =
_table.Columns[columnIndex];
_table.ChangingDataColumn (this, column,
value);

-   if (value == null  column.DataType !=
typeof(string)) {
-   throw new ArgumentException(Cannot
set column  + column.ColumnName +  to be null, Please use DBNull
instead);
-   }
+   if (value == null  column.DataType !=
typeof(string))
+   value = DBNull.Value;
_rowChanged = true;

CheckValue (value, column);

___
Mono-patches maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-patches

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


Re: [Mono-dev] HttpListener hangs with r106513

2008-07-03 Thread Casey Marshall
On Thu, 2008-07-03 at 10:44 +0200, Gert Driesen wrote:
 Hey Casey,
 
 Miguel prepared a fix for this issue (committed by Martin in r107127), and
 I've added a unit test based on your repro.
 

Works fine now, both in the test case and the real app.

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


[Mono-dev] Mono.Addins suppress console window showing

2008-07-03 Thread Vladimir Dimitrov
Hello guys,

 

Recently I started using Mono.Addins in my application and it looks very
good. But as the application is primary used under windows (should be
working fine under Linux too) I get an annoying console window showing when
I run:

 

  AddinManager.Initialize ();

 

And then another one when I run:

 

  AddinManager.Registry.Rebuild (null);

 

I noticed in the code that at some point the .dll executes itself in a
separate process ??!?! So if we add the following line:

 

process.StartInfo.CreateNoWindow = true;

 

to the file Mono.Addins/Mono.Addins/Database/SetupProcess.cs this would
suppress the window to show under Window and should not cause any other
complications.

Please let me know what you think.

 

Best regards,

 Vladimir Dimitrov

 

P.S. I tried compiling my own copy with the change but it didn't worked
because when the process was trying to execute the .dll I compiled an
exception was throws saying this is not a valid windows app. Maybe I need to
compile it to .exe and just rename it?

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


Re: [Mono-dev] HttpListener hangs with r106513

2008-07-03 Thread Martin Baulig

On Thu, 2008-07-03 at 10:44 +0200, Gert Driesen wrote:

 Miguel prepared a fix for this issue (committed by Martin in r107127), and
 I've added a unit test based on your repro.

Yeah, I run into the same issue yesterday and Miguel and me finally
figured it out.  Closing the output stream did not close the
HttpResponse, so the connection never shut down.

-- 
Martin Baulig - [EMAIL PROTECTED]
Novell GmbH, Düsseldorf
GF: Volker Smid, Djamel Souici; HRB 21108 (AG Düsseldorf)


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


[Mono-dev] Mono.Data.Sqlite

2008-07-03 Thread Anders Aagaard

Hi

I've been using Mono.Data.Sqlite in a multi threaded application, since the
code says it's based on Robert Simpson's library I've been looking at his
page for documentation (as Mono.Data.Sqlite documentation seems extremely
sparse).

My problem is that when using multiple threads, all writing to the database,
I get :
Unhandled Exception: Mono.Data.Sqlite.SqliteException: The database file is
locked
Every thread has it's own cloned SqliteConnection (during the creation of
the thread I call MasterConnection.Clone (), and only use the referenced
connection).  The exception happens instantly when two threads begin a
transaction to the same database.

Is the instructions for Robert Simpson's library not accurate for mono's
sqlite library, or am I hitting a bug?  Any suggestions on how to cleanly
work around this problem?

I have one file scanner that adds files to the database, one text file
scanner that scans all text files added and adds web links from them, and
one web updater that takes the links and updates that from an online
database.  They are all seperate threads.  The main thread will also
occasionally do a small commit, but it will mostly read from the database.
-- 
View this message in context: 
http://www.nabble.com/Mono.Data.Sqlite-tp18179121p18179121.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

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


Re: [Mono-dev] Migrating Mono 2.0. Crossplatform GUI components.

2008-07-03 Thread burning snow

Hi Pablo,

I just wanted to ask if there is any progress / date for releasing the
library?


[EMAIL PROTECTED] wrote:
 
 Hi there,
 
 I've good news!
 
 We're going to release our I3 library (the cross-platform MWF controls) 
 as open source!
 
 I expect we'll be releasing it in about one or two weeks.
 
 
 Regards,
 
 pablo
 
 
 www.plasticscm.com
 
 
 Debacker escribió:
 Yes, please. I really love the look of your app. It would be great if 
 you could publish your widgets :D

 Thanks
 Laurent.

 On Mon, May 19, 2008 at 8:34 PM, [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi,

 Well, it's not actually a product but an internal library we use.
 We don't sell it. Did you like how it looks like? If so I'll check
 here whether everyone agrees to make it open.

 pablo

 Debacker escribió:

 Hi,

 Is the GUI part of Plastic SCM free/open-source? I only see
 marketing for your commercial package, which is a bit
 overskill if someone wants your widgets only.

 Regards,
 Laurent Debacker.

 On Sun, May 18, 2008 at 11:38 AM, [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

Hi,

We've developed a small set of controls for Plastic SCM to
 make
our GUI
fully portable using winforms.

You can take a look at some screenshots here:
  
 
 http://www.flickr.com/photos/[EMAIL PROTECTED]/sets/72157603891722391/


pablo





Jonathan Pobst escribió:
 I guess it depends on your requirements.  .Net (and Mono)
 comes
with a
 toolbar, grid, and tree.  So part of it will be figuring
 out what
 additional functionality you need that you are getting from
third party
 controls.

 Right now, I do not know of any third party controls that
 work
out of
 the box with Mono.  Hopefully, with the release of Mono 2.0,
this will
 change as we work with some third party vendors to get their
controls
 working on Mono.

 Jonathan


 Yakov Danilov wrote:

 Hi everyone.

 Because of Mono 2.0. release our firm has some plans
 about
creation of crossplatorm client that could be used with
 .Net 2.0
on Windows and Mono 2.0 on Linux systems.

 Business logic can be used without any problem, but
 GUI has
been created using Infragistics components that have too
 many Win
Api calls and can be used only on Windows.

 Thats why we need components written in managed C# and
WinForms that can be used on both platforms. Basically we need
Toobar, Grid, Tree. At this time I find only SourceGrid. Can
anybody advice us such components? Writing own components too
 laborious.

 p.s. Sorry if my English is not so well.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 mailto:Mono-devel-list@lists.ximian.com
mailto:Mono-devel-list@lists.ximian.com
 mailto:Mono-devel-list@lists.ximian.com

 http://lists.ximian.com/mailman/listinfo/mono-devel-list




 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 mailto:Mono-devel-list@lists.ximian.com
mailto:Mono-devel-list@lists.ximian.com
 mailto:Mono-devel-list@lists.ximian.com

 http://lists.ximian.com/mailman/listinfo/mono-devel-list



___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
 mailto:Mono-devel-list@lists.ximian.com
mailto:Mono-devel-list@lists.ximian.com
 mailto:Mono-devel-list@lists.ximian.com

http://lists.ximian.com/mailman/listinfo/mono-devel-list




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

-- 
View this message in context: 
http://www.nabble.com/Migrating-Mono-2.0.-Crossplatform-GUI-components.-tp17290400p18255999.html
Sent from the Mono - Dev mailing list archive at 

Re: [Mono-dev] [Mono-patches] r107198 - trunk/mcs/class/corlib/System

2008-07-03 Thread Mirco Bauer
On Thu, 2008-07-03 at 18:23 -0400, Andreas Nahr
([EMAIL PROTECTED]) wrote:
 Author: andreas
 Date: 2008-07-03 18:23:54 -0400 (Thu, 03 Jul 2008)
 New Revision: 107198
 
 Modified:
trunk/mcs/class/corlib/System/ChangeLog
trunk/mcs/class/corlib/System/IntPtr.cs
 Log:
 2008-07-04  Andreas Nahr [EMAIL PROTECTED]
 
   * IntPtr: Fix parameter names, change internal name to accomodate for 
 parameter changes
 
 Modified: trunk/mcs/class/corlib/System/ChangeLog
 ===
 --- trunk/mcs/class/corlib/System/ChangeLog   2008-07-03 22:22:43 UTC (rev 
 107197)
 +++ trunk/mcs/class/corlib/System/ChangeLog   2008-07-03 22:23:54 UTC (rev 
 107198)
 @@ -1,5 +1,9 @@
  2008-07-04  Andreas Nahr [EMAIL PROTECTED]
  
 + * IntPtr: Fix parameter names, change internal name to accomodate for 
 parameter changes
 +
 +2008-07-04  Andreas Nahr [EMAIL PROTECTED]
 +
   * Predicate.cs:
   * Object.cs:
   * Nullable.cs
 
 Modified: trunk/mcs/class/corlib/System/IntPtr.cs
 ===
 --- trunk/mcs/class/corlib/System/IntPtr.cs   2008-07-03 22:22:43 UTC (rev 
 107197)
 +++ trunk/mcs/class/corlib/System/IntPtr.cs   2008-07-03 22:23:54 UTC (rev 
 107198)
 @@ -57,44 +57,44 @@
  #endif
   public unsafe struct IntPtr : ISerializable
   {
 - private void *value;
 + private void *m_value;

I am not sure, but doesn't this break binary serialization
compatibility?

  
   public static readonly IntPtr Zero;
  
  #if NET_2_0
   [ReliabilityContract (Consistency.MayCorruptInstance, 
 Cer.MayFail)]
  #endif
 - public IntPtr (int i32)
 + public IntPtr (int value)
   {
 - value = (void *) i32;
 + m_value = (void *) value;

afaik the goal can also be archived using this.value = value;

thats all, thanks.

-- 
Regards,

Mirco 'meebey' Bauer

PGP-Key ID: 0xEEF946C8

FOSS Developer[EMAIL PROTECTED]  http://www.meebey.net/
PEAR Developer[EMAIL PROTECTED] http://pear.php.net/
Debian Developer  [EMAIL PROTECTED]  http://www.debian.org/

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


Re: [Mono-dev] Mono.Data.Sqlite

2008-07-03 Thread Joe Audette
Hi,

My impression is that SQLite is not that great a choice for a multi
threaded app. If you google sqlite mutli threading, in the first
result which links to here:

http://www.sqlite.org/cvstrac/wiki?p=MultiThreading

you'll see:
It has never been safe to use the same database connection
simultaneously in multiple threads.

Sqlite is really meant to be a lightweight db for single threaded apps.

Hope it helps,

Joe

On Sun, Jun 29, 2008 at 6:16 AM, Anders Aagaard [EMAIL PROTECTED] wrote:

 Hi

 I've been using Mono.Data.Sqlite in a multi threaded application, since the
 code says it's based on Robert Simpson's library I've been looking at his
 page for documentation (as Mono.Data.Sqlite documentation seems extremely
 sparse).

 My problem is that when using multiple threads, all writing to the database,
 I get :
 Unhandled Exception: Mono.Data.Sqlite.SqliteException: The database file is
 locked
 Every thread has it's own cloned SqliteConnection (during the creation of
 the thread I call MasterConnection.Clone (), and only use the referenced
 connection).  The exception happens instantly when two threads begin a
 transaction to the same database.

 Is the instructions for Robert Simpson's library not accurate for mono's
 sqlite library, or am I hitting a bug?  Any suggestions on how to cleanly
 work around this problem?

 I have one file scanner that adds files to the database, one text file
 scanner that scans all text files added and adds web links from them, and
 one web updater that takes the links and updates that from an online
 database.  They are all seperate threads.  The main thread will also
 occasionally do a small commit, but it will mostly read from the database.
 --
 View this message in context: 
 http://www.nabble.com/Mono.Data.Sqlite-tp18179121p18179121.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

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




-- 
Joe Audette
Software Solutions Architect
Source Tree Solutions, LLC
PO Box 621861
Charlotte, NC 28262
704.323.8225
[EMAIL PROTECTED]
http://www.sourcetreesolutions.com
http://www.mojoportal.com
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono.Addins suppress console window showing

2008-07-03 Thread Brad Taylor
Hey Vlad,

 Recently I started using Mono.Addins in my application and it looks
 very good. But as the application is primary used under windows
 (should be working fine under Linux too) I get an annoying console
 window showing when I run:
snip

You can also compile Mono.Addins as a winexe target to suppress the
console.  You'll probably have to rename it to a .dll afterwards if you
compile under Windows.

Hope this helps,

-Brad


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