RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Compiling Errors with "Custom" RunUO

Smjert

Sorceror
Compiling Errors with "Custom" RunUO

I'm on Debian Lenny, i'm using Mono 1.9.1.
The RunUO i'm trying to run is core modded, but i just did a merge with the latest RunUO svn (at least for the most important files).
Main.cs and ScriptCompiler.cs are almost the same... but when i RunUO compiles after a bit it gives this:

Code:
RunUO - [www.runuo.com] Version 2.0, Build 3577.38851
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Core: Unix environment detected
Scripts: Compiling C# scripts...ScriptCompiler: :   at Mono.CSharp.Expression.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Expression target) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Expression.Clone (Mono.CSharp.CloneContext clonectx) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.TypeOf.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Expression t) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Expression.Clone (Mono.CSharp.CloneContext clonectx) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Binary.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Expression t) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Expression.Clone (Mono.CSharp.CloneContext clonectx) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Binary.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Expression t) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Expression.Clone (Mono.CSharp.CloneContext clonectx) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Binary.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Expression t) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Expression.Clone (Mono.CSharp.CloneContext clonectx) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Return.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Statement t) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Statement.Clone (Mono.CSharp.CloneContext clonectx) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Block.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Statement t) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.ExplicitBlock.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Statement t) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.ToplevelBlock.CloneTo (Mono.CSharp.CloneContext clonectx, Mono.CSharp.Statement t) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Statement.Clone (Mono.CSharp.CloneContext clonectx) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Statement.PerformClone () [0x00000] 
ScriptCompiler: :   at Mono.CSharp.AnonymousMethodExpression.CompatibleMethod (Mono.CSharp.EmitContext ec, Mono.CSharp.TypeInferenceContext tic, System.Type return_type, System.Type delegate_type) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.AnonymousMethodExpression.Compatible (Mono.CSharp.EmitContext ec, System.Type type) [0x00000] --- End of inner exception stack trace ---
ScriptCompiler: :   at Mono.CSharp.AnonymousMethodExpression.Compatible (Mono.CSharp.EmitContext ec, System.Type type) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.AnonymousMethodExpression.ImplicitStandardConversionExists (System.Type delegate_type) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Convert.ImplicitStandardConversionExists (Mono.CSharp.Expression expr, System.Type target_type) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Convert.ImplicitConversionExists (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression expr, System.Type target_type) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.MethodGroupExpr.IsArgumentCompatible (Mono.CSharp.EmitContext ec, Modifier arg_mod, Mono.CSharp.Argument argument, Modifier param_mod, System.Type parameter) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.MethodGroupExpr.IsApplicable (Mono.CSharp.EmitContext ec, System.Collections.ArrayList arguments, Int32 arg_count, System.Reflection.MethodBase& method, System.Boolean& params_expanded_form) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.MethodGroupExpr.OverloadResolve (Mono.CSharp.EmitContext ec, System.Collections.ArrayList& Arguments, Boolean may_fail, Location loc) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags flags) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Assign.DoResolve (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags flags) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.If.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
ScriptCompiler: :   at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext anonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.Parameters ip, IMethodData md, System.Boolean& unreachable) [0x00000] 
done (0 errors, 0 warnings)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
Exiting...done

With a clean RunUO svn build it works... can someone help me spot where the problem can lie?
Thnx.
 

Smjert

Sorceror
Mark;815157 said:
There are MONO fixes in Scripts\Misc\Emitter.cs, make sure you have those.

And not only there as i can see ^^.
Oh well, thnx, i totally forgot that also Scripts could have MONO changes, i'll merge these fixes and let you know if i succeded.
 

Smjert

Sorceror
Now it gives me that after compiling:

Code:
RunUO - [www.runuo.com] Version 2.1, Build 3578.30878
Core: Running on .NET Framework Version 2.0.50727
Core: Running with arguments: -debug
Core: Optimizing for 2 64-bit processors
Core: Unix environment detected
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Skipping VB.NET Scripts...done (use -vb to enable)
Scripts: Verifying...
** ERROR **: generic_params table claims method has generic parameters, but signature says it doesn't
aborting...
Stacktrace:

  at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes (bool) <0x0004f>
  at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes (bool) <0xffffffff>
  at System.Reflection.Assembly.GetTypes () <0x0000f>
  at Server.Core.VerifySerialization (System.Reflection.Assembly) [0x0001b] in /home/smjert/UODSvn/Source/Server/Main.cs:575
  at Server.Core.VerifySerialization () [0x0001d] in /home/smjert/UODSvn/Source/Server/Main.cs:565
  at Server.ScriptCompiler.Compile (bool,bool) [0x000b3] in /home/smjert/UODSvn/Source/Server/ScriptCompiler.cs:601
  at Server.Core.Main (string[]) [0x0039d] in /home/smjert/UODSvn/Source/Server/Main.cs:456
  at (wrapper runtime-invoke) Server.Core.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	mono [0x536e71]
	/lib/libpthread.so.0 [0x7f190c909a80]
	/lib/libc.so.6(gsignal+0x35) [0x7f190c356ed5]
	/lib/libc.so.6(abort+0x183) [0x7f190c3583f3]
	/usr/lib/libglib-2.0.so.0 [0x7f190cd5e46e]
	/usr/lib/libglib-2.0.so.0(g_log+0x83) [0x7f190cd5e4f3]
	mono(mono_method_signature+0x34a) [0x45791a]
	mono [0x4b9f09]
	mono [0x4bb077]
	mono(mono_class_init+0x6c6) [0x4bb796]
	mono(mono_type_get_object+0x10d) [0x487a6d]
	mono [0x49ac0e]
	mono [0x49e78e]
	[0x4185a5cf]

Debug info from gdb:

(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0x7f190d5e9710 (LWP 10654)]
[New Thread 0x417a7950 (LWP 10656)]
[New Thread 0x40b56950 (LWP 10655)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0x00007f190c3edce2 in select () from /lib/libc.so.6
  3 Thread 0x40b56950 (LWP 10655)  0x00007f190c9090e1 in nanosleep ()
   from /lib/libpthread.so.0
  2 Thread 0x417a7950 (LWP 10656)  0x00007f190c905d29 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
  1 Thread 0x7f190d5e9710 (LWP 10654)  0x00007f190c3edce2 in select ()
   from /lib/libc.so.6

Thread 3 (Thread 0x40b56950 (LWP 10655)):
#0  0x00007f190c9090e1 in nanosleep () from /lib/libpthread.so.0
#1  0x00000000004d5532 in ?? ()
#2  0x00007f190c901fc7 in start_thread () from /lib/libpthread.so.0
#3  0x00007f190c3f45ad in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x417a7950 (LWP 10656)):
#0  0x00007f190c905d29 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/libpthread.so.0
#1  0x00000000004dad55 in ?? ()
#2  0x00000000004dcfbb in ?? ()
#3  0x00000000004e705e in ?? ()
#4  0x000000000053ccf3 in ?? ()
#5  0x00000000004c6d5b in ?? ()
#6  0x00000000004eaab3 in ?? ()
#7  0x00000000004fe702 in ?? ()
#8  0x00007f190c901fc7 in start_thread () from /lib/libpthread.so.0
#9  0x00007f190c3f45ad in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f190d5e9710 (LWP 10654)):
#0  0x00007f190c3edce2 in select () from /lib/libc.so.6
#1  0x00007f190cd8b61c in g_spawn_sync () from /usr/lib/libglib-2.0.so.0
#2  0x00007f190cd8b9f8 in g_spawn_command_line_sync ()
   from /usr/lib/libglib-2.0.so.0
#3  0x0000000000536f09 in ?? ()
#4  <signal handler called>
#5  0x00007f190c356ed5 in raise () from /lib/libc.so.6
#6  0x00007f190c3583f3 in abort () from /lib/libc.so.6
#7  0x00007f190cd5e46e in g_logv () from /usr/lib/libglib-2.0.so.0
#8  0x00007f190cd5e4f3 in g_log () from /usr/lib/libglib-2.0.so.0
#9  0x000000000045791a in mono_method_signature ()
#10 0x00000000004b9f09 in ?? ()
#11 0x00000000004bb077 in ?? ()
#12 0x00000000004bb796 in mono_class_init ()
#13 0x0000000000487a6d in mono_type_get_object ()
#14 0x000000000049ac0e in ?? ()
#15 0x000000000049e78e in ?? ()
#16 0x000000004185a5cf in ?? ()
#17 0x0000000000f025f0 in ?? ()
#18 0x0000000040b43658 in ?? ()
#19 0x0000000000f025f0 in ?? ()
#20 0x0000000000000000 in ?? ()
#0  0x00007f190c3edce2 in select () from /lib/libc.so.6


=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Line 575 in Main.cs is:
foreach( Type t in a.GetTypes() ) (that is the same of the org RunUO)

I read an old thread on this forum that mono had problem with generics.. (but i merged all the scripts with mono mod..), maybe it's because of the use of generics in our custom scripts but.. what's the problem with that?
Where you can find the differences of coding "styles" between Mono and MS Net? (so i can produce code that "always" compile?).

PS: Most of the times mono (RunUO) hangs compiling... i see that it continues to use the disk, as if it's in an infinite loop....
 

Smjert

Sorceror
Mark;815383 said:
Try using the latest version of MONO, 2.4.2.3

This is a great problem, i'm on Debian and to use the new version of Mono i need to update almost all the distro (to Unstable).
The last time i installed Mono 2.4 from source, but i wasn't able to install Monodevelop (too library dependancy... a really headache).
I know that this is a problem generated by my custom scripts (not Core)... since as i said official RunUO works... but it would be nice to understand why they are "wrong".
Bah:\
 

Mark

Knight
Smjert;815390 said:
This is a great problem, i'm on Debian and to use the new version of Mono i need to update almost all the distro (to Unstable).
The last time i installed Mono 2.4 from source, but i wasn't able to install Monodevelop (too library dependancy... a really headache).
I know that this is a problem generated by my custom scripts (not Core)... since as i said official RunUO works... but it would be nice to understand why they are "wrong".
Bah:\

There are some bugs with Mono (particularly those earlier versions) that are quite annoying.

In your situation, this is likely what is causing the problem for you:

void Method<T>() where T : Class
void Method<T>()
void Method()

Mono is being confused by generic parameter overload. If I remember correctly, this was an issue for some methods in Serialization.cs

You can probably find some examples by searching this forum.
 

Smjert

Sorceror
Mark;815397 said:
There are some bugs with Mono (particularly those earlier versions) that are quite annoying.

In your situation, this is likely what is causing the problem for you:

void Method<T>() where T : Class
void Method<T>()
void Method()

Mono is being confused by generic parameter overload. If I remember correctly, this was an issue for some methods in Serialization.cs

You can probably find some examples by searching this forum.

Thanks for your help again, but i saw that in official RunUO code this isn't fixed.. so i'm asking why that code works for me and not my version.. since they are almost identical.
 

Mark

Knight
Smjert;815441 said:
Thanks for your help again, but i saw that in official RunUO code this isn't fixed.. so i'm asking why that code works for me and not my version.. since they are almost identical.

We typically only add Mono workarounds for the latest release of Mono.
 

Smjert

Sorceror
Mark;815515 said:
We typically only add Mono workarounds for the latest release of Mono.

Yeah, this is clear.
But what i can't understand is why RunUO 2.0 (the latest svn version) works with mono 1.9.1 (and this version doesn't have workarounds for Mono, for generics, as you said), and my custom RunUO no.. since they are identical in the main scripts and all Mono differences.
Anyway.. i understand now that we are coming to and "end", i asked help on Debian forum to install the latest things... we'll se..
 

Mark

Knight
Smjert;815558 said:
Yeah, this is clear.
But what i can't understand is why RunUO 2.0 (the latest svn version) works with mono 1.9.1 (and this version doesn't have workarounds for Mono, for generics, as you said), and my custom RunUO no.. since they are identical in the main scripts and all Mono differences.
Anyway.. i understand now that we are coming to and "end", i asked help on Debian forum to install the latest things... we'll se..

There must be some other issue. It will be difficult to solve without much trial and error.
 

Smjert

Sorceror
Mark;815560 said:
There must be some other issue. It will be difficult to solve without much trial and error.

I found that in lenny-backports i have the new mono version, luckily RunUO compiles with it, now i'm fixing all windows paths referenced in the scripts.
It should work all then ;).

PS: I succeeded in compiling all scripts, and now i'm into my local server ^^, thnx for your help Mark.
 
Top