map.cs error compiling

osarus

Citizen
Hey,

I managed to get 57 to make but cannot get the latest git pull

Getting this output, running Ubuntu latest fresh install.

Also I'm a little unsure on what mul/uop files i should be using to setup a fresh server?
I have seen mention of a list in a config file but can't seem to find it, on whats actually needed?


C#:
/srv/ServUO$ make
mcs -target:library -out:"`pwd`/Server.dll" -r:System.Drawing.dll,System.Web.dll,System.Data.dll,System.IO.Compression.FileSystem.dll -nowarn:0618,0219,0414,1635 -d:MONO -d:ServUO -d:NEWTIMERS -nologo -optimize -unsafe -recurse:"`pwd`/Server/*.cs"
/srv/ServUO/Server/NativeReader.cs(133,25): warning CS1692: Invalid number
/srv/ServUO/Server/NativeReader.cs(143,25): warning CS1692: Invalid number

Unhandled Exception:
Mono.CSharp.InternalErrorException: /srv/ServUO/Server/Map.cs(274,37): Server.PooledEnumeration.EnumerateSectors(Server.Map, Server.Rectangle2D) ---> Mono.CSharp.InternalErrorException: (1,1): ---> Mono.CSharp.InternalErrorException: /srv/ServUO/Server/Map.cs(275,3): Server.PooledEnumeration.<EnumerateSectors>c__Iterator1.<xSector>__0 ---> System.NullReferenceException: Object reference not set to an instance of an object
  at IKVM.Reflection.Signature.WriteType (IKVM.Reflection.Emit.ModuleBuilder module, IKVM.Reflection.Writer.ByteBuffer bb, IKVM.Reflection.Type type) [0x000a7] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at IKVM.Reflection.FieldSignature.WriteSig (IKVM.Reflection.Emit.ModuleBuilder module, IKVM.Reflection.Writer.ByteBuffer bb) [0x00014] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at IKVM.Reflection.Emit.FieldBuilder..ctor (IKVM.Reflection.Emit.TypeBuilder type, System.String name, IKVM.Reflection.Type fieldType, IKVM.Reflection.CustomModifiers customModifiers, IKVM.Reflection.FieldAttributes attribs) [0x00062] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at IKVM.Reflection.Emit.TypeBuilder.__DefineField (System.String fieldName, IKVM.Reflection.Type type, IKVM.Reflection.CustomModifiers customModifiers, IKVM.Reflection.FieldAttributes attributes) [0x00000] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at IKVM.Reflection.Emit.TypeBuilder.DefineField (System.String fieldName, IKVM.Reflection.Type type, IKVM.Reflection.Type[] requiredCustomModifiers, IKVM.Reflection.Type[] optionalCustomModifiers, IKVM.Reflection.FieldAttributes attributes) [0x0000b] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.Field.Define () [0x0006d] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeDefinition.DoDefineMembers () [0x002c2] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.TypeDefinition.DoDefineMembers () [0x002e0] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ClassOrStruct.DoDefineMembers () [0x000da] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.CompilerGeneratedContainer.DoDefineMembers () [0x0002a] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.StateMachine.DoDefineMembers () [0x0002c] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.IteratorStorey.DoDefineMembers () [0x00212] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeDefinition.Define () [0x0000f] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ExplicitBlock.DefineStoreyContainer (Mono.CSharp.EmitContext ec, Mono.CSharp.AnonymousMethodStorey storey) [0x00428] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ParametersBlock.Emit (Mono.CSharp.EmitContext ec) [0x00016] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00021] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x000bb] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.MethodData.Emit (Mono.CSharp.TypeDefinition parent) [0x0008c] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.MethodOrOperator.Emit () [0x001e6] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.Method.Emit () [0x00104] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.Method.Emit () [0x00114] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeDefinition.Emit () [0x0027b] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ClassOrStruct.Emit () [0x0001d] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.Class.Emit () [0x00000] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeDefinition.EmitContainer () [0x0000c] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeContainer.EmitContainer () [0x00018] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00007] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeContainer.EmitContainer () [0x00018] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00007] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeContainer.EmitContainer () [0x00018] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ModuleContainer.EmitContainer () [0x00085] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.AssemblyDefinition.Emit () [0x0008c] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.AssemblyDefinitionStatic.Emit () [0x0010e] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.Driver.Compile () [0x002a8] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.Driver.Main (System.String[] args) [0x0004c] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
[ERROR] FATAL UNHANDLED EXCEPTION: Mono.CSharp.InternalErrorException: /srv/ServUO/Server/Map.cs(274,37): Server.PooledEnumeration.EnumerateSectors(Server.Map, Server.Rectangle2D) ---> Mono.CSharp.InternalErrorException: (1,1): ---> Mono.CSharp.InternalErrorException: /srv/ServUO/Server/Map.cs(275,3): Server.PooledEnumeration.<EnumerateSectors>c__Iterator1.<xSector>__0 ---> System.NullReferenceException: Object reference not set to an instance of an object
  at IKVM.Reflection.Signature.WriteType (IKVM.Reflection.Emit.ModuleBuilder module, IKVM.Reflection.Writer.ByteBuffer bb, IKVM.Reflection.Type type) [0x000a7] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at IKVM.Reflection.FieldSignature.WriteSig (IKVM.Reflection.Emit.ModuleBuilder module, IKVM.Reflection.Writer.ByteBuffer bb) [0x00014] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at IKVM.Reflection.Emit.FieldBuilder..ctor (IKVM.Reflection.Emit.TypeBuilder type, System.String name, IKVM.Reflection.Type fieldType, IKVM.Reflection.CustomModifiers customModifiers, IKVM.Reflection.FieldAttributes attribs) [0x00062] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at IKVM.Reflection.Emit.TypeBuilder.__DefineField (System.String fieldName, IKVM.Reflection.Type type, IKVM.Reflection.CustomModifiers customModifiers, IKVM.Reflection.FieldAttributes attributes) [0x00000] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at IKVM.Reflection.Emit.TypeBuilder.DefineField (System.String fieldName, IKVM.Reflection.Type type, IKVM.Reflection.Type[] requiredCustomModifiers, IKVM.Reflection.Type[] optionalCustomModifiers, IKVM.Reflection.FieldAttributes attributes) [0x0000b] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.Field.Define () [0x0006d] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeDefinition.DoDefineMembers () [0x002c2] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.TypeDefinition.DoDefineMembers () [0x002e0] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ClassOrStruct.DoDefineMembers () [0x000da] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.CompilerGeneratedContainer.DoDefineMembers () [0x0002a] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.StateMachine.DoDefineMembers () [0x0002c] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.IteratorStorey.DoDefineMembers () [0x00212] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeDefinition.Define () [0x0000f] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ExplicitBlock.DefineStoreyContainer (Mono.CSharp.EmitContext ec, Mono.CSharp.AnonymousMethodStorey storey) [0x00428] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ParametersBlock.Emit (Mono.CSharp.EmitContext ec) [0x00016] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00021] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x000bb] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.MethodData.Emit (Mono.CSharp.TypeDefinition parent) [0x0008c] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.MethodOrOperator.Emit () [0x001e6] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.Method.Emit () [0x00104] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
   --- End of inner exception stack trace ---
  at Mono.CSharp.Method.Emit () [0x00114] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeDefinition.Emit () [0x0027b] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ClassOrStruct.Emit () [0x0001d] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.Class.Emit () [0x00000] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeDefinition.EmitContainer () [0x0000c] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeContainer.EmitContainer () [0x00018] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00007] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeContainer.EmitContainer () [0x00018] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00007] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.TypeContainer.EmitContainer () [0x00018] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.ModuleContainer.EmitContainer () [0x00085] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.AssemblyDefinition.Emit () [0x0008c] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.AssemblyDefinitionStatic.Emit () [0x0010e] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.Driver.Compile () [0x002a8] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
  at Mono.CSharp.Driver.Main (System.String[] args) [0x0004c] in <bab2b3ccb8ec412b9376f1cd16ca64aa>:0
make: *** [Makefile:35: Server.dll] Error 1
[email protected]:/srv/ServUO$ mono -version
Unknown command line option: '-version'
[email protected]:/srv/ServUO$ mono --version
Mono JIT compiler version 6.12.0.122 (tarball Mon Feb 22 17:33:28 UTC 2021)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        Interpreter:   yes
        LLVM:          yes(610)
        Suspend:       hybrid
        GC:            sgen (concurrent by default)
[email protected]:/srv/ServUO$
 

broxen

Citizen
I'm getting this same error on Amazon Linux with Mono JIT compiler version 5.18.1.3 (tarball Thu Jun 20 20:26:33 UTC 2019)
 

broxen

Citizen
For OP, or anyone else that may come across this:

DarkLotus shared updated compile instructions with me on the Discord. I've submitted a PR to update them on GitHub for everyone.

Try the below from the ServUO folder. I haven't tested on Ubuntu, but this process works for me on Fedora 32 (using dnf instead of apt-get).
$ apt-get install zlib1g-dev mono-complete dotnet-sdk-5.0
$ dotnet build
then run with
$ mono ServUO.exe

You may have to install the repo for dotnet from Microsoft.
$ curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
$ sudo apt-add-repository Index of /ubuntu/20.04/prod/
$ sudo apt-get update
$ sudo apt-get install dotnet-sdk-5.0

Edit: Fixed for Ubuntu/Deb as it's more popular than CentOS/Fedora
 

rhasce

Citizen
I love you.
Post automatically merged:

AAhh did not worked for me because there is no Serveuo.exe :(
 
Last edited:

broxen

Citizen
From what I can tell, the reason mono wasn't working for me on Fedora is because MSBuild is outdated and no longer packaged with the mono-complete repo.

I've been following the issue here: