MantisBT - opensim
View Issue Details
0006109opensim[MISC] Compiling / Buildingpublic2012-07-27 02:322012-12-16 06:18
orenh 
justincc 
normalminorN/A
closedfixed 
master (dev code) 
master (dev code) 
bacab6406c3bbc9587089ada7c675c0dc0359ff9
Grid (Multiple Regions per Sim)
ODE
.NET / Windows64
2.10
0006109: [PATCH] Use the same log4net.dll as OpenMetaverse
Copied the log4net.dll file from OpenMetaverse to OpenSim. This solves the problem where errors that happen in OpenMetaverse aren't logged, and instead we get errors about OpenMetaverse.Logger.
Cause OpenMetaverse to log an error, and you'll see that it logs an unrelated error about OpenMetaverse.Logger because it can't load log4net.

For example: http://opensimulator.org/mantis/view.php?id=5358 [^]
The problem was that we were using a slightly different version of log4net.dll than OpenMetaverse, so whenever OpenMetaverse tried to write to the log it failed and produced an assembly error instead. The two versions of log4net are basically the same (version 1.2.10.0): the only difference is that the version in OpenSim had a publickey, and the version in OpenMetaverse does not.

Here are a few more details. The log4net.dll in OpenSim was taken directly from the log4net site. It includes a publickey, and was compiled for .NET 2.0. The log4net.dll in OpenMetaverse isn't on the log4net site (not now, anyway): perhaps it was compiled separately. It's compiled for .NET 3.5, and doesn't include a publickey.

If you compare the manifests (using ildasm.exe) then you can see the difference:

1. OpenSim.exe manifest:

.assembly extern log4net
{
  .publickeytoken = (1B 44 E1 D4 26 11 58 21 )
  .ver 1:2:10:0
}


2. OpenMetaverse.dll manifest:

.assembly extern log4net
{
  .ver 1:2:10:0
}


An alternative solution would be to change the log4net.dll in OpenMetaverse instead of the one in OpenSim. However, it's easier to change our own project than someone else's... At some point, presumably, everyone will switch to the latest version of log4net (1.2.11) and then we'll all be using the same DLL.
No tags attached.
patch 0001-Use-the-same-log4net.dll-as-OpenMetaverse.patch (269,158) 2012-07-27 02:32
http://opensimulator.org/mantis/file_download.php?file_id=3106&type=bug
patch 0002-Changed-references-to-a-specific-version-of-log4net-.patch (12,510) 2012-07-27 02:33
http://opensimulator.org/mantis/file_download.php?file_id=3107&type=bug
Issue History
2012-07-27 02:32orenhNew Issue
2012-07-27 02:32orenhFile Added: 0001-Use-the-same-log4net.dll-as-OpenMetaverse.patch
2012-07-27 02:33orenhFile Added: 0002-Changed-references-to-a-specific-version-of-log4net-.patch
2012-07-27 02:33orenhAssigned To => orenh
2012-07-27 02:33orenhStatusnew => patch included
2012-07-27 02:34orenhNote Added: 0021911
2012-07-28 21:58orenhAssigned Toorenh =>
2012-08-31 17:33justinccNote Added: 0022506
2012-08-31 17:33justinccAssigned To => justincc
2012-08-31 17:33justinccStatuspatch included => patch feedback
2012-09-07 16:49justinccNote Added: 0022538
2012-09-19 17:30justinccNote Added: 0022634
2012-12-16 01:44orenhMono VersionNone => 2.10
2012-12-16 01:44orenhNote Added: 0023265
2012-12-16 01:44orenhStatuspatch feedback => resolved
2012-12-16 01:44orenhResolutionopen => fixed
2012-12-16 06:18nebadonNote Added: 0023266
2012-12-16 06:18nebadonStatusresolved => closed
2012-12-16 06:19nebadonNote Edited: 0023266bug_revision_view_page.php?bugnote_id=23266#r921

Notes
(0021911)
orenh   
2012-07-27 02:34   
I also recompiled OpenSim.32BitLaunch.exe and Robust.32BitLaunch.exe, because they were using references to a specific version of log4net, and they should be using generic references (like all the other projects).
(0022506)
justincc   
2012-08-31 17:33   
Thanks very much for the analysis Oren. I'm going to attempt to get libomv to update their log4net.dll [1].

Also, I plan to do the .exe changes but would rather recompile the executables myself. It's pretty much project policy to not directly add binary executable patches from non-core committers.

[1] https://github.com/openmetaversefoundation/libopenmetaverse/pull/2 [^]
(0022538)
justincc   
2012-09-07 16:49   
lkalif accepted the pull request. At some point this libomv will be updated in OpenSimulator.
(0022634)
justincc   
2012-09-19 17:30   
libomv updated in OpenSimulator for this as of commit 95809ca
(0023265)
orenh   
2012-12-16 01:44   
I think this issue is done.
(0023266)
nebadon   
2012-12-16 06:18   
(edited on: 2012-12-16 06:19)
original reporter claims this is now fixed.