Re: [Mono-docs-list] Monkeyguide license?

2004-01-27 Thread Hector E. Gomez Morales
Well I thought that monkeyguide was too in MIT X11 license like monodoc,
seeing this situation I think it will be better that all the
documentation is under one license be it X11 or GPL FDA. I have some
unfinished docs for monkeyguide so it will be good for me to know the
consensus on this.










On Mon, 2004-01-26 at 17:07, John Luke wrote:
 On Mon, 2004-01-26 at 17:53 -0500, Jonathan Pryor wrote:
  On Mon, 2004-01-26 at 14:36, Miguel de Icaza wrote:
   Hey guys,
   
   I had the impression that we had agreed to use the MIT X11 license
   for the Monkeyguide instead of the GNU FDL, is that correct?
   
   (the GNU FDL not being free documentation and all that).
   
   Miguel.
  
  Sort of.  IIRC, the license was originally unspecified; lots was
  written, but not everyone documented (a) what they wrote, and (b) what
  license they had written it under.  I know that some of what I wrote I
  contributed to the Public Domain (interop.html).
  
  This issue was last brought up in July 2003.  My recollection was that
  this was never fully settled; it was pointed out the GNU FDL was listed
  as the license for some documentation, that X11/BSD would be preferable,
  and that we'd have to talk to each of the contributors to see if they'd
  be willing to re-license.  I don't see anything remotely like each
  contributor explicitly stating what license they released their work
  under, but my email archive only goes back to February 4, 2002. 
  
  BTW, monodoc explicitly mentions that any contributions are licensed
  under X11, so we know at least know what all new API documentation
  should be licensed under.
  
   - Jon
 
 I think what Jon summarized is correct as far as I recall. Everything I
 have contributed can be licensed under X11.
 
 ___
 Mono-docs-list maillist  -  [EMAIL PROTECTED]
 http://lists.ximian.com/mailman/listinfo/mono-docs-list
___
Mono-docs-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-docs-list] Please add to monodoc.

2004-01-27 Thread Miguel de Icaza

 Hello all.
 
   Would you please include this into the next release of monodoc?

Well, these errors should be part of the compiler, is there any reason
why this must be added to the current error?

 
 TIA
-- 
Miguel de Icaza [EMAIL PROTECTED]
___
Mono-docs-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-docs-list


Re: [Mono-list] adapter.Fill(dataset)

2004-01-27 Thread Mohammad DAMT
Hmm, I experience the same...
I went investigate this, and found that in Fill method in DBDataAdapter
there are:
...
dataTable.BeginLoadData ();
//dataTable.LoadDataRow (itemArray,
AcceptChangesDuringFill);
dataTable.LoadDataRow (tableArray,
AcceptChangesDuringFill);
dataTable.EndLoadData ();
...
 

the dataTable.EndLoadData (); threw this exception:

System.InvalidOperationException: The comparer threw an exception ---
System.NotImplementedException: The requested feature is not yet
implemented
in 0x00030 System.Collections.CaseInsensitiveHashCodeProvider:.ctor
(System.Globalization.CultureInfo)
in 0x00073 System.Data.UniqueConstraint:CalcHashValue
(System.Data.DataRow,bool)
in 0x00086 .RowsComparer:Compare (object,object)
in 0x0008f System.Array:compare
(object,object,System.Collections.IComparer)
in 0x00084 System.Array:qsort
(System.Array,System.Array,int,int,System.Collections.IComparer)
in 0x0021a System.Array:Sort
(System.Array,System.Array,int,int,System.Collections.IComparer)
--- End of inner exception stack trace ---
  
in 0x00258 System.Array:Sort
(System.Array,System.Array,int,int,System.Collections.IComparer)
in 0x00075 System.Array:Sort
(System.Array,System.Collections.IComparer)
in 0x0015f System.Data.UniqueConstraint:AssertConstraint ()
in 0x00153 System.Data.DataSet:set_EnforceConstraints (bool)
in 0x0004c System.Data.DataTable:EndLoadData ()
in 0x003db System.Data.Common.DbDataAdapter:Fill
(System.Data.DataSet,string,System.Data.IDataReader,int,int)
  

unfortunately, the CaseInsensitiveHashCodeProvider (CultureInfo culture)
ctor is not implemented. For temporary, you can comment out the
exception in
mcs/class/corlib/System.Collections.CaseInsensitiveHashCodeProvider.cs
to be look like this

public CaseInsensitiveHashCodeProvider (CultureInfo culture)
{
//throw new NotImplementedException ();
}

sorry no patch, I'm not familiar with case insensitive string
comparison.

On Rab, 2004-01-21 at 08:42, Carlo Jedi wrote:
 Hi all, I'm new in this mailing list and I have a great problem:
 
 I'm using Mono 0.29 (but I've tried also earlier versions, cvs and daily 
 builds), MySQL 4.0.17 (but I've tried also earlier versions) and ByteFX Data 
 Provider (the one included in Mono and also ver 0.74 and earlier versions).
 
 My problem is that when I do adapter.Fill(dataset) only first two records 
 are stored even if table has 5,10,100,n records. 
 I've tested the select and it is working fine, so problem seems to be 
 located in fill method. 
 This is my code:
 
 ###
 MySqlConnection myConnection = new MySqlConnection();
 try
 {
 myConnection.ConnectionString = Server=myserver;database=mydb;User 
 ID=mylogin;password=mypass;;
 myConnection.Open();
 MySqlCommand myCommand = new MySqlCommand(SELECT idServizio FROM TServizi 
 where IdPadre=0,myConnection);
 MySqlDataAdapter adapter = new MySqlDataAdapter();
 adapter.SelectCommand = myCommand;
 DataSet myDs = new DataSet();
 adapter.Fill(myDs);
 Console.WriteLine(myDs.Tables[0].Rows.Count);
 myConnection.Dispose();
 }
 catch (Exception e)
 {
 Console.WriteLine(e.ToString()); 
 }
 
 ###
 
 Could you help me? I've also tried to connect to MsSQL instead of MySQL and it 
 works fine, so problem really seems to be ByteFX... is there any other data 
 provider for mono/mysql??? Thank you in advance.
 ___
 Mono-list maillist  -  [EMAIL PROTECTED]
 http://lists.ximian.com/mailman/listinfo/mono-list
 
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: AW: [Mono-list] Assembly.LoadFrom() - Assembly.CreateInstance() - Activator.CreateInstanceFrom() --- invalid cast

2004-01-27 Thread Gonzalo Paniagua Javier
El mar, 27-01-2004 a las 10:20, Jaroslaw Kowalski escribió:
  
 file:///D:/ttt/A.1.dll
 file:///D:/ttt/A.1.dll
 file:///D:/ttt/a.DLL
 A.Y, a, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
 A.Y, a, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
 A.Y, a, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
 2c21befd-5a3f-3d21-ab48-1c6c1361dc0b
 2c21befd-5a3f-3d21-ab48-1c6c1361dc0b
 2c21befd-5a3f-3d21-ab48-1c6c1361dc0b
 True
 False
 False
 
 Note that LoadFrom(A.2.dll) caused A.1.dll to be loaded. Strange.

May be you compiled A.dll and then just renamed it to A.1.dll and copied
to A.2.dll. That will get you 2 different files with the same assembly
name.

-Gonzalo


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


Re: AW: [Mono-list] Assembly.LoadFrom() - Assembly.CreateInstance() - Activator.CreateInstanceFrom() --- invalid cast

2004-01-27 Thread Timothy Parez




Christian Birkl wrote:

  Hi,

  
  
Stating it is an invalid cast.

  
  
Can someone please explain me the following behaviour:

	Assuming you have Assembly "A.dll", with one class Y (no
methods, no fields, just a plain class). Now copy this assembly to
A.1.dll, A.2.dll. You now have 3 assembly, A.dll, A.1.dll, A.2.dll (they
just differ in date of last modification).

Create a new project which references "A.dll" and write the following
main function:

	static void Main(string[] args)
	{
		Type t1 = Assembly.LoadFrom(@"A.1.dll").GetType("A.Y");
		Type t2 = Assembly.LoadFrom(@"A.2.dll").GetType("A.Y");
		Type t3 = typeof(A.Y);			
			
		Console.WriteLine(t1.GUID);
		Console.WriteLine(t2.GUID);
		Console.WriteLine(t3.GUID);

		Console.WriteLine(t1 == t2);
		Console.WriteLine(t1 == t3);
		Console.WriteLine(t2 == t3);			
	}

Now guess the output (MS.NET 1.1 runtime):

d899aa25-2426-3ef7-91c2-95e6f8aaed27
d899aa25-2426-3ef7-91c2-95e6f8aaed27
d899aa25-2426-3ef7-91c2-95e6f8aaed27
True
False
False

Hu? :-). Why is t1 != t3, but t1 equals t2? Anyone?

So i guess that's related to your problem with your MySQL.ByteFX
DataProvider. You load your ByteFX assembly via Assembly.LoadFrom, which
references System.Data in its own "dll" scope. Your program also
references "System.Data", but somehow the "System.Data" of your program
isn't the same as in your lazy loaded ByteFX assembly.

I can't give you a solution for this, but if your application is a web
app i think you run into the problems if you're not using XSP but IIS
since IIS copies all bin\* files into some temporary directories and
there you'll get the same behaviour as stated above. (IIS does this in
order to enable dynamic reloading of web apps. Ever tried to update one
dll in your C:\inetpub\wwwroot\App\bin\ directory? It is not locked,
you can overwrite it and if you do it, IIS will implicitly redeploy your
web app to reflect the update - makes life much easier 8-))

Christian

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

  

 My app will be a simple class library, but what you said does make
sense, but there has to be a way :)





Re: AW: [Mono-list] Assembly.LoadFrom() - Assembly.CreateInstance() - Activator.CreateInstanceFrom() --- invalid cast

2004-01-27 Thread Timothy Parez




Christian Birkl wrote:

  Hi,

  
  
Stating it is an invalid cast.

  
  
Can someone please explain me the following behaviour:

	Assuming you have Assembly "A.dll", with one class Y (no
methods, no fields, just a plain class). Now copy this assembly to
A.1.dll, A.2.dll. You now have 3 assembly, A.dll, A.1.dll, A.2.dll (they
just differ in date of last modification).

Create a new project which references "A.dll" and write the following
main function:

	static void Main(string[] args)
	{
		Type t1 = Assembly.LoadFrom(@"A.1.dll").GetType("A.Y");
		Type t2 = Assembly.LoadFrom(@"A.2.dll").GetType("A.Y");
		Type t3 = typeof(A.Y);			
			
		Console.WriteLine(t1.GUID);
		Console.WriteLine(t2.GUID);
		Console.WriteLine(t3.GUID);

		Console.WriteLine(t1 == t2);
		Console.WriteLine(t1 == t3);
		Console.WriteLine(t2 == t3);			
	}

Now guess the output (MS.NET 1.1 runtime):

d899aa25-2426-3ef7-91c2-95e6f8aaed27
d899aa25-2426-3ef7-91c2-95e6f8aaed27
d899aa25-2426-3ef7-91c2-95e6f8aaed27
True
False
False

Hu? :-). Why is t1 != t3, but t1 equals t2? Anyone?

So i guess that's related to your problem with your MySQL.ByteFX
DataProvider. You load your ByteFX assembly via Assembly.LoadFrom, which
references System.Data in its own "dll" scope. Your program also
references "System.Data", but somehow the "System.Data" of your program
isn't the same as in your lazy loaded ByteFX assembly.

I can't give you a solution for this, but if your application is a web
app i think you run into the problems if you're not using XSP but IIS
since IIS copies all bin\* files into some temporary directories and
there you'll get the same behaviour as stated above. (IIS does this in
order to enable dynamic reloading of web apps. Ever tried to update one
dll in your C:\inetpub\wwwroot\App\bin\ directory? It is not locked,
you can overwrite it and if you do it, IIS will implicitly redeploy your
web app to reflect the update - makes life much easier 8-))

Christian

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

  

Hmm, what if I load System.Data.dll aswell ?





Re: AW: [Mono-list] Assembly.LoadFrom() - Assembly.CreateInstance() - Activator.CreateInstanceFrom() --- invalid cast

2004-01-27 Thread Jaroslaw Kowalski



I've enhanced the test code:

 Type t1 = 
Assembly.LoadFrom(@"A.1.dll").GetType("A.Y"); 
Type t2 = 
Assembly.LoadFrom(@"A.2.dll").GetType("A.Y"); 
Type t3 = typeof(A.Y); 

 
Console.WriteLine(t1.Assembly.EscapedCodeBase); 
Console.WriteLine(t2.Assembly.EscapedCodeBase); 
Console.WriteLine(t3.Assembly.EscapedCodeBase);

 
Console.WriteLine(t1.AssemblyQualifiedName); 
Console.WriteLine(t2.AssemblyQualifiedName); 
Console.WriteLine(t3.AssemblyQualifiedName);

 
Console.WriteLine(t1.GUID); 
Console.WriteLine(t2.GUID); 
Console.WriteLine(t3.GUID);

 
Console.WriteLine(t1 == t2); 
Console.WriteLine(t1 == t3); 
Console.WriteLine(t2 == t3); 
and on .NET 1.0 it produces:

file:///D:/ttt/A.1.dllfile:///D:/ttt/A.1.dllfile:///D:/ttt/a.DLLA.Y, a, Version=0.0.0.0, 
Culture=neutral, PublicKeyToken=nullA.Y, a, Version=0.0.0.0, 
Culture=neutral, PublicKeyToken=nullA.Y, a, Version=0.0.0.0, 
Culture=neutral, 
PublicKeyToken=null2c21befd-5a3f-3d21-ab48-1c6c1361dc0b2c21befd-5a3f-3d21-ab48-1c6c1361dc0b2c21befd-5a3f-3d21-ab48-1c6c1361dc0bTrueFalseFalse
Note that LoadFrom("A.2.dll") caused A.1.dll to be loaded. 
Strange.

Jarek


  - Original Message - 
  From: 
  Timothy Parez 
  To: Christian Birkl 
  Cc: [EMAIL PROTECTED] 
  Sent: Tuesday, January 27, 2004 9:09 
  AM
  Subject: Re: AW: [Mono-list] 
  Assembly.LoadFrom() - Assembly.CreateInstance() - 
  Activator.CreateInstanceFrom() --- invalid cast
  Christian Birkl wrote:
  Hi,

  
Stating it is an invalid cast.

Can someone please explain me the following behaviour:

	Assuming you have Assembly "A.dll", with one class Y (no
methods, no fields, just a plain class). Now copy this assembly to
A.1.dll, A.2.dll. You now have 3 assembly, A.dll, A.1.dll, A.2.dll (they
just differ in date of last modification).

Create a new project which references "A.dll" and write the following
main function:

	static void Main(string[] args)
	{
		Type t1 = Assembly.LoadFrom(@"A.1.dll").GetType("A.Y");
		Type t2 = Assembly.LoadFrom(@"A.2.dll").GetType("A.Y");
		Type t3 = typeof(A.Y);			
			
		Console.WriteLine(t1.GUID);
		Console.WriteLine(t2.GUID);
		Console.WriteLine(t3.GUID);

		Console.WriteLine(t1 == t2);
		Console.WriteLine(t1 == t3);
		Console.WriteLine(t2 == t3);			
	}

Now guess the output (MS.NET 1.1 runtime):

d899aa25-2426-3ef7-91c2-95e6f8aaed27
d899aa25-2426-3ef7-91c2-95e6f8aaed27
d899aa25-2426-3ef7-91c2-95e6f8aaed27
True
False
False

Hu? :-). Why is t1 != t3, but t1 equals t2? Anyone?

So i guess that's related to your problem with your MySQL.ByteFX
DataProvider. You load your ByteFX assembly via Assembly.LoadFrom, which
references System.Data in its own "dll" scope. Your program also
references "System.Data", but somehow the "System.Data" of your program
isn't the same as in your lazy loaded ByteFX assembly.

I can't give you a solution for this, but if your application is a web
app i think you run into the problems if you're not using XSP but IIS
since IIS copies all bin\* files into some temporary directories and
there you'll get the same behaviour as stated above. (IIS does this in
order to enable dynamic reloading of web apps. Ever tried to update one
dll in your C:\inetpub\wwwroot\App\bin\ directory? It is not locked,
you can overwrite it and if you do it, IIS will implicitly redeploy your
web app to reflect the update - makes life much easier 8-))

Christian

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

  Hmm, what if I load System.Data.dll aswell 
?


[Mono-list] DirectX.NET implementation?

2004-01-27 Thread Martin Jochems
Hello there,

I have a question for the mono-team:
Will there be a DirectX.NET implementation in the future? (or even now)
So that DirectX could, for example run on Linux.
And if so, how can that be done? Since DirectX is now a COM technologie.
Is DirectX.NET (for windows) a complete 'native' Direct.NET implementation? 
Or does is
still rely on COM (partly)?

best regards,
Martin
-
p.s. I really like the idea of an opensource DirectX implementation. Good 
work.

_
Talk with your online friends with MSN Messenger http://messenger.msn.nl/
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Assembly.LoadFrom() - Assembly.CreateInstance() - Activator.CreateInstanceFrom() --- invalid cast

2004-01-27 Thread Timothy Parez
Jaroslaw Kowalski wrote:

Hi Timothy,

I found the reason why this isn't working (and solution). This applies to MS
.NET and is related to assembly versioning but I thought it might be
interesting.
Sorry for quite a long post.

REPRODUCING THE PROBLEM:

1. I grabbed ByteFX.Data from mcs and created a VS.NET 2003 project, and
compiled it (obviously using .NET 1.1.4322).
2. Among other things ildasm ByteFX.Data.dll shows a reference to
System.Data that comes with .NET 1.1
.assembly extern System.Data
{
 .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) //
.z\V.4..
 .ver 1:0:5000:0
}
3. I created a test file: test.cs
---
using System;
using System.Reflection;
using System.Data;
public class Class1
{
   public static void Main()
   {
   Assembly DataProvider;
   DataProvider = Assembly.LoadFrom(@bytefx\ByteFX.Data.dll);
   object dbConnection =
DataProvider.CreateInstance(ByteFX.Data.MySqlClient.MySqlConnection,false)
;
   Console.WriteLine(dbConnection.ToString());
   IDbConnection dbConn = (IDbConnection)dbConnection;
   }
}
---
4. I have both MS.NET 1.0 and 1.1 and csc.exe from 1.0.3705 happens to be in
my path. So when I compiled test.cs by:
csc test.cs

it referenced all libraries from .NET 1.0. ildasm test.exe shows:

.assembly extern System.Data
{
 .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) //
.z\V.4..
 .ver 1:0:3300:0
}
5. When I run test.exe I get invalid cast exception.

HERE'S WHY:

a) IDbConnection in test.cs acually means (using assembly-qualified type
names)
System.Data.IDbConnection, System.Data, Version=1.0.3300.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089, Custom=null
b) IDbConnection in ByteFX.Data.dll IDbConnection means:
System.Data.IDbConnection, System.Data, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089, Custom=null
c) Under .NET 1.0 the types aren't compatible and you have to provide
assembly redirection to get it working.
d) Under .NET 1.1 things have changed, and every time you ask for ANY type
from ANY assembly that shipped with MS.NET 1.1 (regardless of the version)
you always get the one that comes with .NET 1.1.
SOLUTION:

a) Recompile test.cs with csc.exe that comes with .NET 1.1. (In general -
use the same compiler for both library and an exe)
OR (when you want to run this on .NET 1.0)
b) Create a config file test.exe.config
configuration
  runtime
 assemblyBinding xmlns=urn:schemas-microsoft-com:asm.v1
dependentAssembly
   assemblyIdentity name=System.Data
 publicKeyToken=b77a5c561934e089
 culture=neutral /
   bindingRedirect oldVersion=1.0.5000.0
newVersion=1.0.3300.0/
/dependentAssembly
 /assemblyBinding
  /runtime
/configuration
that will redirect all request to System.Data to version that comes with
.NET 1.0
c) Note that when you compile test.cs for .NET 1.1 you don't need the config
file even if the ByteFX.Data was compiled against .NET 1.0 System.Data.dll
because of the auto-redirection feature from 1.1.
MY ADVICE:

Use Activator.CreateInstance() and pass it the full name of the type you
want to create. Something like:
Activator.CreateInstance(Type.GetType(ByteFX.Data.MySqlClient.MySqlConnecti
on, ByteFX.Data))
This works like a charm provided that ByteFX.Data.dll is in your application
directory or in assembly probe path.
Jarek

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

Thnx, that helped a lot
I hope you don't mind me copying your e-mail to my site
Thnx.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] [patch] MacOSX autoconf/automake fixes

2004-01-27 Thread Andy Satori
With the current AnonCVS snapshot on 10.3.2

autogen.sh still fails out of the gate, and must be worked around:

checking for pkg-config... /opt/local/bin/pkg-config
./configure: line 20045: syntax error near unexpected token 
`BASE_DEPENDENCIES,'
./configure: line 20045: `PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 
= $GLIB_REQUIRED_VERSION)'

where: 'which pkg-config'
	returns: '/opt/local/bin/pkg-config'
where: 'pkg-config --cflags glib-2.0'
	returns: '-I/opt/local/include/glib-2.0 
-I/opt/local/lib/glib-2.0/include'

modifying ./configure.in to skip this check results in a complete run

make fullbuild fails:

make[3]: Nothing to be done for `install-data-am'.
(cd runtime; make install assemblies_DATA=mscorlib.dll 
monobins_DATA=mcs.exe)
make[2]: Nothing to be done for `install-exec-am'.
/bin/sh ../mkinstalldirs /usr/local/lib
 /usr/bin/install -c -m 644 mscorlib.dll /usr/local/lib/mscorlib.dll
/bin/sh ../mkinstalldirs /usr/local/bin
 /usr/bin/install -c -m 644 mcs.exe /usr/local/bin/mcs.exe
(cd ../mcs/class; make)
Creating ../../../build/deps/I18N.dll.makefrag ...
touch ../../../build/deps/I18N.dll.stamp
MONO_PATH=../../../class/lib:$MONO_PATH mono  ../../../mcs/mcs.exe 
/r:mscorlib.dll  -d:NET_1_1 -d:ONLY_1_1 -g /noconfig  /target:library 
/out:../../../class/lib/I18N.dll @I18N.dll.sources

Unhandled Exception: System.IO.FileNotFoundException: File 
'mscorlib.dll' not found.
in (unmanaged) (wrapper managed-to-native) 
System.Reflection.Assembly:LoadFrom (string)

make[3]: *** [../../../class/lib/I18N.dll] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [mcs-rest] Error 2
looks like there is a missing /lib:../../../class/lib

still alot of warnings about point from int without cast,
	added to my todo list of things to cleanup if / when I get time 
(tramp-ppc.c)

Andy

On Jan 27, 2004, at 11:07 AM, Andy Satori wrote:

I'm pulling a current CVS right now, and I'll run the test this 
evening.

Andy

On Jan 27, 2004, at 10:54 AM, Paolo Molaro wrote:

On 01/26/04 Benjamin Reed wrote:
Attached is a patch that fixes these issues properly, within autoconf
and automake.  You still need to do glibtoolize and friends 
(autogen.sh
stuff) until a new release is made, though.
Thanks for the patch: the issues should be already fixed in cvs
without any additional patch. Feel free to try and report if it works
for you. Also reports of running the jit on 10.3 (success or failure 
for
make test in mono/mono/tests) are appreciated.

Thanks.
lupus
--
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Calls to CIL code from native threads

2004-01-27 Thread Patrick Hartling
On Tue, 2004-01-27 at 09:52, Paolo Molaro wrote:
 On 01/26/04 Patrick Hartling wrote:
  I am working on a project that mixes CIL code with natively compiled C
  and C++ in a multi-threaded environment.  The natively compiled code may
  make calls into the CIL universe from different threads, and I am trying
  to figure out how to manage that with Mono's C API.  In the
  documentation about embedding Mono, I see a reference to the function
  mono_thread_attach().  My (very preliminary) testing has allowed me to
  make a call from a native thread other than the primordial thread into
  the CIL universe by calling mono_thread_attach() first.  I pass in a
  pointer to a MonoDomain object allocated on the heap by the calling
  thread via mono_domain_create().
 
 Are you really using multiple domains in your app?

My understand of application domains is still very limited, so I am not
sure I can answer this question definitively.  If threads spawned by
native code each need their own domain, then yes, I am using multiple
domains.  Is there something different that I could call besides
mono_domain_create() to get a valid MonoDomain* to hand off to
mono_thread_attach()?

 If that's not the case you should pass the MonoDomain you get back from
 mono_jit_init().

I may not have described my situation in enough detail.  I have a C#
class with a static Main() function that I execute using Mono.  That
class instantiates an object that (conceptually) derives from a native
C++ object.  The C# object is handed off to C++ code where callbacks are
invoked from a thread spawned by the native code.  The end result is
that a C# object is handled polymorphically by C++ code.  The primary
thread of control in the C# Main() function blocks until the C++ code
shuts down.

At this point, I do not have code of my own that calls mono_jit_init(). 
In the long term, I probably will, but for now, I am concentrating on
making C# applications that can activate and utilize the native C++
libraries I am exposing for use with CLS-compliant languages.

  After the call into the CIL code returns, however, I appear to get into
  a deadlock state later when I make another call to
  mono_thread_attach().  I have successfully dealt with a similar
 
 mono_thread_attach() should be called only once per-thread.
 If you're using multiple application domains, you may get all sort of
 issues, since the mono_thread_attach() implementation is broken in that
 case, there is already a bug filed about that.

I think that my analysis regarding a deadlock was wrong.  The
application was hanging, but I do not know where.  I modified things so
that mono_thread_attach() is called precisely once pre thread, and
things appear to be working quite well now.

  situation using Python/C where the Global Interpreter Lock (GIL) must be
  acquired and released to allow native code threads to call into the
  Python interpreter.  I am wondering if calling mono_thread_attach() has
  the effect of acquiring a mutex somewhere that needs to be released by
  my code when I no longer need to hold it.  Is that the case?  If so,
  what is the call to make this happen?  Or am I just on the wrong track
  entirely?
 
 If you're using multiple appdomains you're hitting a mono bug. If you're
 not, just try using mono_thread_attach() once per thread.
 
  Lastly, is there any documentation for doing multi-threaded programming
  with Mono?  So far, I have mostly been looking through the code trying
  to find types and functions that look roughly like what I need.
 
 The API is supposed to be thread-safe, so there should be no particular
 thing to do apart from calling mono_thread_attach() in threads not
 created by mono. Please, see the suggestions above and report bavk if
 they solve your issue.
 Thanks.

Your suggestion of calling mono_thread_attach() once per thread appears
to have put things into good working order.  Thanks for the help.

 -Patrick


-- 
Patrick L. Hartling | Research Assistant, VRAC
[EMAIL PROTECTED]| 2274 Howe Hall Room 2624
http://www.vrac.iastate.edu/~patrick/   | http://www.vrac.iastate.edu/
PGP: http://wwwkeys.gpg.cz:11371/pks/lookup?op=getsearch=0xEBF86398



signature.asc
Description: This is a digitally signed message part


Re: [Mono-list] How to run an Individual TestFixture using nunit-console.exe ?

2004-01-27 Thread Karl Waclawek
You attached a bitmap of almost 2 MB in size!!!
I leave it up to you to interpret the three exclamation marks.

Karl

- Original Message - 
From: Rathna N [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 27, 2004 5:01 AM
Subject: [Mono-list] How to run an Individual TestFixture using nunit-console.exe ?


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


Re: [Mono-list] NullRefException compiling with mcs

2004-01-27 Thread Miguel de Icaza
Hello,

 I'm getting the following exception when trying to compile a (fairly 
 large) set of files using mcs. I'm using 0.28 because that's the last 
 stable Debian package, and I can't upgrade to the -cvs versions because 
 they conflict with the libapache-mod-mono package.
 
 Is this a known bug that's been fixed since? Is there anything I can do 
 in my code to avoid it? Or should I expend some effort to track down 
 exactly which file causes it to happen? (I probably can't send my source 
 code to the list, but I can send it to someone in private email if it 
 will help)

It is hard to tell from the stack trace that you provided, and that
version of the compiler is fairly old, we have fixed roughly a hundred
bugs since that release.

It would be useful if you could try with a new compiler, or isolate a
sample test case.


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


Re: [Mono-list] Debian Package + LibApache Mod_mono

2004-01-27 Thread Michael Ott
Hello Stuart!

 Pablo Fischer wrote:
 Thanks for the report!
 
 I'll work tomorrow in it and work in the service (init.d).
 
 I found out why this was failing: my /tmp/mod_mono_server already 
 existed and was owned by a different user, so mod-mono-server.exe didn't 
 have permission to delete it.

I have written a small application starting and stopping mono on boot or
on shutdown.

Here it is. Perhaps you can use some lines of this terrible :-D code
   
CU
 
  Michael  
  
--   
   Michael Ott, e-mail: [EMAIL PROTECTED], www.zolnott.de   
I am registered as user #275453 with the Linux Counter, http://counter.li.org.
#!/bin/sh
#
# mod_mono  Start the mod_mono-server

NAME=mod_mono
MONOPIDFILE=/var/run/mono.pid

start_mod_mono() {

tmp=`ps ax | grep -m 1 /usr/bin/mono`
tmp=`echo $tmp | grep /usr/bin/mod-mono-server.exe | awk '{print $1}'`
if [ $tmp ]; then
echo -n $NAME already started
else
echo Starting server $NAME
#/usr/bin/mono /usr/bin/mod-mono-server.exe --root 
/usr/local/share/doc/xsp/test/ --applications /mono:. --nonstop 
/usr/bin/mono /usr/bin/mod-mono-server.exe --root /var/www/html/mono/ 
--applications /mono:. --nonstop 
sleep 3
chmod 666 /tmp/mod_mono_server
fi

}

stop_mod_mono() {

# (MO): Asking for an existing process for the mod-mono-server
# (MO): Abfragen, ob es eine Prozeß für mod-mono-server schon gibt.
tmp=`ps ax | grep -m 1 /usr/bin/mono`
tmp=`echo $tmp | grep /usr/bin/mod-mono-server.exe | awk '{print $1}'`
if [ $tmp ]; then
echo -n Stopping mod_mono
tmp=`ps ax | grep /usr/bin/mono | grep 
/usr/bin/mod-mono-server.exe | awk '{print $1}'`
kill -9 $tmp
else
echo -n $NAME is not started
fi

}

case $1 in
  start)
start_mod_mono
;;

  stop)
stop_mod_mono
echo
;;

  restart)
echo Restarting $NAME
stop_mod_mono
echo
sleep 1
start_mod_mono
;;

status)
tmp=`ps ax | grep -m 1 /usr/bin/mono`
tmp=`echo $tmp | grep /usr/bin/mod-mono-server.exe | awk '{print 
$1}'`
if [ $tmp ]; then
echo $NAME is running;
else
echo $NAME is not runnung;
fi
;;

  *)
echo Usage: /etc/init.d/$NAME {start|stop|restart|status}
exit 1
;;
esac

if [ $? -eq 0 ]; then
#echo 
exit 0
else
echo  failed
exit 1
fi


Re: [Mono-list] Debian Package + LibApache Mod_mono

2004-01-27 Thread Pablo Fischer
Hi Stuart!

El mar, 27-01-2004 a las 15:54, Stuart Ballard escribió:
 I found out why this was failing: my /tmp/mod_mono_server already 
 existed and was owned by a different user, so mod-mono-server.exe didn't 
 have permission to delete it.
Heheh .. :)


 I'm now having some problems with mcs that I'd love to test against a 
 newer version, but libapache-mod-mono conflicts with mono-cvs and 
 company. Are you working on 0.30 versions yet?
Ok..

I'm going to work officialy in the libapache and xsp packages, official
and snapshot versions. And also, I'm going to maintain the snapshot
versions of mono and mcs, in the last days we (mono debian package team)
found many problems trying to maintain/build two versions of mono/mcs,
the official ones and the snapshot ones.

To get more info, you can subscribe to our newsletter or go to
[EMAIL PROTECTED]

More Info:

http://pkg-mono.alioth.debian.org/

Regards, 
Pablo
 
 Thanks,
 Stuart.
-- 
Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx)
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt

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