[Mono-list] Assembly.GetExecutingAssembly weirdness on amd64

Marek Habersack grendel at caudium.net
Fri Dec 30 06:52:53 EST 2005


  The Evolve toolbar source (http://www.codeproject.com/aspnet/CrossBrowserToolbar.asp)
contains code that lives in two source files:


protected override void OnPreRender(EventArgs e)
  if (this.RenderRollOverScripts)
     if (log.IsDebugEnabled)
        log.DebugFormat("Executing assembly: {0}", Assembly.GetExecutingAssembly());

  base.OnPreRender (e);


public static void RegisterRollOverScript(Control renderedControl)
   Page page = renderedControl.Page;
   ResourceManager manager = new ResourceManager("Evolve.Web.UI.Toolbar.JavaScript", Assembly.GetExecutingAssembly());
   if (log.IsDebugEnabled) 
     log.DebugFormat("Executing assembly: {0}; manager: {1}", Assembly.GetExecutingAssembly(), manager);
   String script = manager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true).GetString("LibraryScript");

And on x86 both debug messages show the assembly name correctly as
Evolve.Web.UI.Toolbar. However on amd64, the 2nd message claims that the
currently executing assembly name is mscorlib (which breaks the control,
causing an exception and a backtrace). Anybody has any idea what might it
be? Could it be that the RegisterRollOverScript method is executed in a
different thread, one that's associated with mscorlib (just wild-guessing,
as I have no idea)?

Both machines use the same version of mono (current svn)
libc amd64: 2.3.5 (debian/testing, debian version 8.1), no tls
libc x86: 2.3.5 (ubuntu/dapper, ubuntu version 1ubuntu17), tls enabled
kernel amd64:
kernel x86: 2.6.15



More information about the Mono-list mailing list