[Mono-devel-list] Loading of assemblies by runtime and reflection

Zoltan Varga vargaz at gmail.com
Mon Oct 25 16:53:54 EDT 2004


                             Hi Guys,

  Could you run your test program with the MONO_LOG_LEVEL env var set to
'debug' and send the output to the list ?

                       thanks

                             Zoltan

On Mon, 25 Oct 2004 16:24:42 -0400, John Luke <john.luke at gmail.com> wrote:
> Hello,
> I can reproduce it here with the 1.1 cvs branch from today.
> 
> 
> 
> On Mon, 25 Oct 2004 22:11:55 +0200, Kamil Skalski <nazgul at nemerle.org> wrote:
> > Dnia poniedziałek, 25 października 2004 21:38, Zoltan Varga napisał:
> > >                                 Hi,
> > >
> > >   I would like to fix this but I can't reproduce it either with
> > > current CVS or with
> > > the 1.0 branch.
> >
> > Hmm, strange...
> > I'm having this problem on two independent machines with 1.0.2 and 1.1.1 (see
> > below).
> > The issue was commented some time ago by someone, that is might be because of
> > two System.dlls are visible in the path, but on both machines I have only
> > one.
> > Some tips on fighting ./configure script, so I can get cvs up and running...?
> >
> > [nazgul at lilith nazgul]$ mono --version
> > Mono JIT compiler version 1.0.1, (C) 2002-2004 Novell, Inc and Contributors.
> > www.go-mono.com
> >         TLS:           normal
> >         GC:            Included Boehm (with typed GC)
> >         SIGSEGV      : normal
> >         Globalization: ICU
> > [nazgul at lilith nazgul]$ cat > t.cs
> > using System;
> > using System.Reflection;
> >
> > public class Test {
> >        static void Main () {
> >          Console.WriteLine (typeof (int).Assembly.ToString ());
> >          Assembly a = System.Reflection.Assembly.LoadFrom
> >                           ("///usr/lib/mono/1.0/System.dll");
> >          System.Net.Dns.GetHostByName ("localhost");
> >        }
> > }
> >
> > [nazgul at lilith nazgul]$ mcs t.cs
> > Compilation succeeded
> > [nazgul at lilith nazgul]$ mono t.exe
> > mscorlib, Version=1.0.5000.0, Culture=neutral,
> >  PublicKeyToken=b77a5c561934e089
> >
> > Unhandled Exception: System.NullReferenceException: Object reference not set
> > to an instance of an object
> > in (unmanaged) (wrapper managed-to-native)
> > System.Net.Dns:GetHostByName_internal (string,string&,string[]&,string[]&)
> > in <0x00004> (wrapper managed-to-native)
> >  System.Net.Dns:GetHostByName_internal (string,string&,string[]&,string[]&)
> > in <0x0005a> System.Net.Dns:GetHostByName (string)
> > in <0x0004f> Test:Main ()
> >
> > and
> >
> > [nazgul at mordor testsuite]$ mono --version
> > Mono JIT compiler version 1.1.1, (C) 2002-2004 Novell, Inc and Contributors.
> > www.go-mono.com
> >         TLS:           normal
> >         GC:            Included Boehm (with typed GC)
> >         SIGSEGV      : normal
> >         Globalization: ICU
> > [nazgul at mordor testsuite]$ cat > t.cs
> > using System;
> > using System.Reflection;
> >
> > public class Test {
> >        static void Main () {
> >          Console.WriteLine (typeof (int).Assembly.ToString ());
> >          Assembly a = System.Reflection.Assembly.LoadFrom
> >                           ("///usr/lib/mono/1.0/System.dll");
> >          System.Net.Dns.GetHostByName ("localhost");
> >        }
> > }
> >
> > [nazgul at mordor testsuite]$ mcs t.cs
> > Compilation succeeded
> > [nazgul at mordor testsuite]$ mono t.exe
> > mscorlib, Version=1.0.5000.0, Culture=neutral,
> >  PublicKeyToken=b77a5c561934e089
> >
> > Unhandled Exception: System.NullReferenceException: Object reference not set
> > to an instance of an object
> > in <0xc69571d2> (wrapper managed-to-native)
> > System.Net.Dns:GetHostByName_internal (string,string&,string[]&,string[]&)
> > in <0x00004> (wrapper managed-to-native)
> >  System.Net.Dns:GetHostByName_internal (string,string&,string[]&,string[]&)
> > in <0x00057> System.Net.Dns:GetHostByName (string)
> > in <0x0004c> Test:Main ()
> >
> >
> >
> > >                 Zoltan
> > >
> > > On Mon, 25 Oct 2004 21:16:01 +0200, Kamil Skalski <nazgul at nemerle.org>
> >
> > wrote:
> > > > Hi!
> > > >
> > > > I am trying to make some investigation on
> > > > http://bugzilla.ximian.com/show_bug.cgi?id=61152
> > > > so I tracked what is called by Assembly.LoadFrom. It seems that this is
> > > > the same code, which is used by runtime to load referenced assemblies
> > > > (mono_assembly_load_from in metadata/assembly.c).
> > > >
> > > > Can anybody comment if it is true? I don't think that erasure of runtime
> > > > loaded assemblies by reflecting some with the same name is a good
> > > > behaviour.
> > > >
> > > > But even if it is, is shouldn't cause setting system_assembly in
> > > > socket-io.c to NULL.
> > > >
> > > > I wanted to do some more debugging, but I have some problems running mono
> > > > cvs version:
> > > > checking how to run the C++ preprocessor... /lib/cpp
> > > > configure: error: C++ preprocessor "/lib/cpp" fails sanity check
> > > > See `config.log' for more details.
> > > >
> > > > The config.log file ends with some invalid preprocessor directives:
> > > > #define VERSION "1.1.1"
> > > > #endif
> > > > #ifdef __cplusplus
> > > > void exit (int);
> > > >
> > > > It's probably some issue with automake generating bad configure script...
> > > >
> > > > Sorry for this probably bogus message, but the 61152 problem is open now
> > > > for a few months and IMHO it seems to be quite critical issue. Especially
> > > > if it occurs in some more sofisticated scenarios with reflecting
> > > > assemblies with various versions.
> > > >
> > > > Just to put some positive comments, you guys are doing great job.
> > > > According to our summary
> > > > (http://nemerle.org/wiki/index.php/Runtime_issues), mono has currently
> > > > less open bugs interfering with our project than MS.NET.
> > > >
> > > > --
> > > > Kamil Skalski
> > > > http://nemerle.org developer
> > > > _______________________________________________
> > > > 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
> >
> > --
> > Kamil Skalski
> > http://nemerle.org developer
> >
> > -------------------------------------------------------
> > _______________________________________________
> > 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
>



More information about the Mono-devel-list mailing list