[Opensim-dev] Proposal for removing "ERROR: There was an error while scanning assembly:" messages
Melanie
melanie at t-data.com
Fri Apr 18 20:06:51 UTC 2008
Hi,
if you are looking into shell scripts, please consider that your
normal Linux admin will run OpenSim as a separate user. The
MONO_PATH can easily be set in that users .profile, making
cumbersome shell scripts totally unnecessary.
So, if you do provide any shell scripting, please provide it as an
_additional_ way to start the programs, don't go renaming programs.
Melanie
Justin Clark-Casey wrote:
> Hello,
>
> This is a technical post but I'm copying it to users for information.
> You may (or may not) want to stop reading quickly :-)
>
> So, some of you may have noticed that the latest OpenSim revisions now
> have many more of the subject error messages on the console. The cause
> is the Mono Addins manager we're using, which writes these errors to the
> console if the dll doesn't contain the configuration data it's expecting.
>
> So today I looked at removing these errors. I had to follow several
> lines of investigation.
>
> 1. My initial thought was to move all the external libraries which are
> causing the problem to a separate $OPENSIM_ROOT/lib/ext directory.
> However, this means changes to make sure that the dlls can be found in
> the new directory. For a cross platform application, it's hard. On
> Microsoft's CLR we can simply use <Probing> in config files. However,
> Mono does appear to support this, at least according to
>
> http://www.mono-project.com/Assemblies_and_the_GAC
>
> I tried it anyway, without success. Instead, the only option on Mono is
> to either set the MONO_PATH or put the assemblies in the Global Assembly
> Cache.
>
> 2. This makes things awkward, so instead I looked at moving the plugin
> dlls. Same problem.
>
> 3. So instead I looked at simply suppressing the messages.
> Unfortunately, the Mono addins code writes these messages out to the
> console. Although in theory you could give it an IProgressMonitor and
> stop this, all the classes for this (and the interface) are internal and
> hence not accessible. Later versions of mono-addins than the one we are
> using would appear to have the same problem.
>
> So although we could hack the code in 3. to remove the message (or even
> replace or code our own plugin solution), the fact is that we really
> need to have dlls in different directories eventually anyway - bin/ is
> already overloaded. This means I'm forced to come back to suggestion
> 1. Putting things in the GAC is unrealistic at this stage I think, so
> I'm proposing that we move all the external libraries to
> $OPENSIM_ROOT/lib/ext and set the MONO_PATH environmental variable to
> point to this directory. Under Windows, we would instead put <Probing>
> entries in the executable's config files.
>
> I tried setting MONO_PATH programatically in OpenSimMain.cs, but the set
> doesn't look like it is exported so the load fails. The same path works
> fine when exported from the command line.
>
> If we go the MONO_PATH route, then I think we could provide shell
> scripts for all the executables to set the path and then launch the
> program, even though this is a little messy. The executable itself
> would complain loudly if it is not on Windows and MONO_PATH is unset
> (which would be inconvenient for Windows mono users, though there may
> not be that many of them).
>
> I'm open to constructive suggestions on this, particularly from core
> developers.
>
More information about the Opensim-dev
mailing list