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!

Raspberry-pi RUNUO server problems

moneo

Sorceror
Hi all,

I thought it would be an interesting project to see if i could use a raspberry pi system-on-a-chip to host a runuo server. The system is low spec by todays standards (arm 11 chip and 512mb of ram) but figured it could be interesting for development or running a low numbers server.

The operating system is Raspbian, which is basically Debian-7-testing(wheezy) compiled for ARM.
Initially i tried this on a normal amd64/Debian7 PC, and everything works fine. However repeating the same steps on the raspberry i get errors (shown at end of the post)

On both platforms im installing "mono-complete" from the apt repositories.

libz is installed on both architectures as default as /lib/architecture name/libz.so.1.2.7 (eg on arm its /lib/arm-linux-gnueabihf/libz.so.1.2.7)

Im compiling runuo 2.3 r987 with

Code:
gmcs -optimize -unsafe -d:MONO -out:RunUO.exe -win32icon:Server/runuo.ico -recurse:Server/*.cs

Im not using RunUO.exe.config as on the AMD64 platform everythings working fine without it (including saves), so im guessing its finding the compression library.

Following the same steps on the raspberry the server boots up fine, i can move around, use [admin and all the other commands ive tried. The problems come when i goto save , i get the following error

Code:
Time: 734971/00/0001 00:02:41
Mobiles: 1
Items: 28
Exception:
System.Exception: World Save event threw an exception.  Save failed! ---> System.DivideByZeroException: Division by zero
  at System.DateTimeUtils.ToString (DateTime dt, Nullable`1 utc_offset, System.String format, System.Globalization.DateTimeFormatInfo dfi) [0x00000] in <filename unknown>:0
  at System.DateTimeUtils.ToString (DateTime dt, System.String format, System.Globalization.DateTimeFormatInfo dfi) [0x00000] in <filename unknown>:0
  at System.DateTime.ToString (System.String format, IFormatProvider provider) [0x00000] in <filename unknown>:0
  at System.Xml.XmlConvert.ToString (DateTime value, XmlDateTimeSerializationMode mode) [0x00000] in <filename unknown>:0
  at Server.Accounting.Account.Save (System.Xml.XmlTextWriter xml) [0x00000] in <filename unknown>:0
  at Server.Accounting.Accounts.Save (Server.WorldSaveEventArgs e) [0x00000] in <filename unknown>:0
  at (wrapper delegate-invoke) <Module>:invoke_void__this___WorldSaveEventArgs (Server.WorldSaveEventArgs)
  at (wrapper delegate-invoke) <Module>:invoke_void__this___WorldSaveEventArgs (Server.WorldSaveEventArgs)
  at Server.EventSink.InvokeWorldSave (Server.WorldSaveEventArgs e) [0x00000] in <filename unknown>:0
  at Server.World.Save (Boolean message, Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at Server.World.Save (Boolean message, Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.Misc.AutoSave.Save (Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.Misc.AutoSave.Save () [0x00000] in <filename unknown>:0
  at Server.Commands.CommandHandlers.Save_OnCommand (Server.Commands.CommandEventArgs e) [0x00000] in <filename unknown>:0
  at Server.Commands.CommandSystem.Handle (Server.Mobile from, System.String text, MessageType type) [0x00000] in <filename unknown>:0
  at Server.Mobile.DoSpeech (System.String text, System.Int32[] keywords, MessageType type, Int32 hue) [0x00000] in <filename unknown>:0
  at Server.Mobiles.PlayerMobile.DoSpeech (System.String text, System.Int32[] keywords, MessageType type, Int32 hue) [0x00000] in <filename unknown>:0
  at Server.Network.PacketHandlers.UnicodeSpeech (Server.Network.NetState state, Server.Network.PacketReader pvSrc) [0x00000] in <filename unknown>:0
  at Server.Network.MessagePump.HandleReceive (Server.Network.NetState ns) [0x00000] in <filename unknown>:0
  at Server.Network.MessagePump.Slice () [0x00000] in <filename unknown>:0
  at Server.Core.Main (System.String[] args) [0x00000] in <filename unknown>:0

Can anyone help with this please?
 

Bittiez

Sorceror
Code:
System.DivideByZeroException: Division by zero

Did you recently add/change any deserialize methods? This is telling you that you are trying to divide a number by 0 somewhere, from what I can see anyways..
 

moneo

Sorceror
Code:
System.DivideByZeroException: Division by zero

Did you recently add/change any deserialize methods? This is telling you that you are trying to divide a number by 0 somewhere, from what I can see anyways..

Nothings been changed its just clean runuo2.3 rev 987 . Regarding that devide by 0, look at the code around it. System.DateTimeUtils.ToString is crashing and the time index is not displayed correctly. Presuming that an unconverted unix time number its 9 jan 1970.

Worth noting The Raspberry Pi itself does NOT have a hardware battery backed clock, so it synchronises its time by NTP on boot. However this is syncing fine and using "date" command at the commandline shows the time correctly
 

moneo

Sorceror
Ok i should have researched this more before posting :(

Its not a RUNUO problem, there is issues with Mono compiled with ARM Hard floating point ABI. Found a number of bug reports on this now and the Debian/mono community are actively working on it. Ill look at a different distro for now that does not use the ARM floating point unit
 

Bittiez

Sorceror
Ok i should have researched this more before posting :(

Its not a RUNUO problem, there is issues with Mono compiled with ARM Hard floating point ABI. Found a number of bug reports on this now and the Debian/mono community are actively working on it. Ill look at a different distro for now that does not use the ARM floating point unit
Sorry, I don't speak chinese =/ Haha nah jk, good luck though!
 

gunkar

Sorceror
If you can keep us updated! I also have a raspi that would like to install runuo for testing!!
 

moneo

Sorceror
Got this working!

Debian Wheezy (armel) is running mono/runuo fine.
Sadly the performance is lower due to it not using the raspberry FPU. Compiling scripts + saves are slow at the moment.

Im using a full neruns distro spawn (all maps) on runuo2.3. 190,000 items and 40,000 mobiles in the world. Memory usage is sitting comfortably around 55% (my pi has 512mb). CPU overhead sitting around 10% when idle. World save takes around 20 seconds. Running a smaller setup like the uoorigins build (just felucca spawned) memory usage is around 35%

Overall this is working better than i expected.
I haven't optimized this setup yet. Theres a bunch of drivers/services installed i don't need. I'm also using a class 4 SD card which really isnt helping with I/O
Hopefully mono will be fixed for ARM-floating point units sometime soon.

Once i get things running as smooth as i can, ill write a guide if there's interest

Next step is to print a cool case design on a http://www.raspberrypi.org/wp-content/uploads/2012/05/Punnet.jpg
Im thinking a UO logo on the top with the air hole in the center of the O :D
 

gunkar

Sorceror
Nice nice, the version i'm playing with is 256, i tried to compile it but it crashed, since that i haven't got back into it.
 

moneo

Sorceror
Xeroxx , I noticed on your googlecode bug report your getting the same error on soft float with 1057.

Runuo 2.3 R987 on the downloads page runs and saves perfectly with Wheezy (armel soft float ABI). Give that a try to see if its a problem with 1057 or the way your PI is configured.

For 987 make sure the following packages are installed mono-runtime mono-devel mono-gmcs mono-dmcs
Also make sure your kernel is updated if using the 2012-08-08-wheezy-armel image as the included kernel only sees 256mb of ram.


Make a script to compile and generate a RunUO.exe.config for the libz paths.

Code:
gmcs -optimize -unsafe -d:MONO -out:RunUO.exe -nowarn:0219,0414,0618 -win32icon:Server/runuo.ico -recurse:Server/*.cs
 
echo "<configuration>" >> RunUO.exe.config
echo "<dllmap dll=\"libz\" target=\"/lib/arm-linux-gnueabi/libz.so.1.2.7\"/>" >>
RunUO.exe.config
echo "</configuration>" >> RunUO.exe.config
 

Xeroxxx

Traveler
Hey moneo,
I'm quite familiar with the raspberry.

Latest wheezy hard-float with hard-float mono.

2.3 R987 runs fine, world save is working. So no configuration issue with mono or issue with mono hf.


Note: Don't install mono before or after with apt-get if you've download the hf mono from rpi forum!

EDIT: After creating the spawner or deco. (Teleporters,etc is fine)

RunUO crashes on saving.

Code:
Documentation is being generated, please wait.
Documentation complete.
Core: Using standard save strategy
World: Saving...Closing Save Files.
Save done in 0.02 seconds.
Match type not found ('FullJar')
Match type not found ('VioletStemmedBottle')
Match type not found ('FullJars3')
Match type not found ('FullJars4')
Match type not found ('FullJars2')
Match type not found ('HalfEmptyJars2')
Match type not found ('DummyTheif')
Match type not found ('ToxicElemental')
Core: Using standard save strategy
World: Saving...Error:
System.NullReferenceException: Object reference not set to an instance of an object
  at Server.BinaryFileWriter.Write (Double value) [0x00000] in <filename unknown>:0
  at Server.Mobiles.BaseCreature.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.Mobiles.BaseVendor.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.Mobiles.BaseHealer.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.Mobiles.Healer.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.StandardSaveStrategy.SaveMobiles (Server.SaveMetrics metrics) [0x00000] in <filename unknown>:0
  at Server.StandardSaveStrategy.Save (Server.SaveMetrics metrics, Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.World.Save (Boolean message, Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.Misc.AutoSave.Save (Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.Misc.AutoSave.OnTick () [0x00000] in <filename unknown>:0
  at Server.Timer.Slice () [0x00000] in <filename unknown>:0
  at Server.Core.Main (System.String[] args) [0x00000] in <filename unknown>:0
Crash: Generating report...done

Code:
World: Saving...Closing Save Files.
Save done in 0.02 seconds.
Core: Using standard save strategy
World: Saving...Error:
System.NullReferenceException: Object reference not set to an instance of an object
  at Server.BinaryFileWriter.Write (Double value) [0x00000] in <filename unknown>:0
  at Server.Mobiles.BaseCreature.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.Mobiles.BaseVendor.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.Mobiles.BaseHealer.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.Mobiles.Healer.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.StandardSaveStrategy.SaveMobiles (Server.SaveMetrics metrics) [0x00000] in <filename unknown>:0
  at Server.StandardSaveStrategy.Save (Server.SaveMetrics metrics, Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.World.Save (Boolean message, Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.Misc.AutoSave.Save (Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.Misc.AutoSave.Save () [0x00000] in <filename unknown>:0
  at Server.Commands.CommandHandlers.Save_OnCommand (Server.Commands.CommandEventArgs e) [0x00000] in <filename unknown>:0
  at Server.Commands.CommandSystem.Handle (Server.Mobile from, System.String text, MessageType type) [0x00000] in <filename unknown>:0
  at Server.Commands.CommandSystem.Handle (Server.Mobile from, System.String text) [0x00000] in <filename unknown>:0
  at Server.Gumps.AdminGump.InvokeCommand (System.String c) [0x00000] in <filename unknown>:0
  at Server.Gumps.AdminGump.OnResponse (Server.Network.NetState sender, Server.Gumps.RelayInfo info) [0x00000] in <filename unknown>:0
  at Server.Network.PacketHandlers.DisplayGumpResponse (Server.Network.NetState state, Server.Network.PacketReader pvSrc) [0x00000] in <filename unknown>:0
  at Server.Network.MessagePump.HandleReceive (Server.Network.NetState ns) [0x00000] in <filename unknown>:0
  at Server.Network.MessagePump.Slice () [0x00000] in <filename unknown>:0
  at Server.Core.Main (System.String[] args) [0x00000] in <filename unknown>:0
Crash: Generating report...done
Exiting...Terminated
 

Simon Omega

Traveler
My first thought when looking at this was the floating point issue. I was going to ask if you tried Debian ARM.
Since all my assumptions have been covered I have an honest question.

Have you had a chance to see how many concurrent clients is can handle with just Felucca?
Might make a Good Dev Code Test Box. O_O

Also this is fitting for here.
http://coen.boisestate.edu/ece/raspberry-pi/
33 Node Beowulf Cluster built with Raspberry Pi
 

QNX

Traveler
Interesting idea... if working and documented, perhaps it'll create some free 'buzz' for RunUO.
 

Xeroxxx

Traveler
I still do not understand why the server is crashing on RPi after world saving with generated "signs" from world building menu.

Doors, Teleporters, Moongates is no problem.

EDIT: Adding a horse, world save -> crash. Seems to be a problem with serialization of mobiles.
 

Simon Omega

Traveler
I've never looked at the code for the serialization stuff. I can see both sides of the serialization coin. Bu you said it happens on Signs (Sign posts, Shop Signs, etc.) and Mobiles that are not Players?

I am swamped with work, but can you share the log or error message you receive?
Maybe someone can look at it, or i can learn something new...
 

Xeroxxx

Traveler
With current SVN it crashes instantly on worldsave (ML Stuff) and with 2.3 (978 i guess) only with mobiles, signs, deco.

I will post the output.
 

fwiffo

Sorceror
check capitalization, enable debug mode, this seems to me as it can't generate some files and fails when writing on them.

Maybe the problem is that.

Or maybe something else that isn't considered, some error in IO handling?
 

Xeroxxx

Traveler
Current SVN (With MLQuest):
Code:
RunUO - [www.runuo.com] Version 2.2, Build 4921.23154
Core: Running on .NET Framework Version 4.0.30319
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...done (2925 items, 742 mobiles) (8.23 seconds)
Regions: Loading...done
World: Loading...done (0 items, 0 mobiles) (0.11 seconds)
ServerList: Auto-detecting public IP address...done ()
This server has no accounts.
Do you want to create the owner account now? (y/n)
Username: Test
Password: Test
Account created.
Listening: 127.0.0.1:2593
Listening: 192.168.0.3:2593
Core: Using standard save strategy
World: Saving...Error:
System.NullReferenceException: Object reference not set to an instance of an object
  at Server.BinaryFileWriter.Write (Double value) [0x00000] in <filename unknown>:0
  at Server.Mobiles.BaseCreature.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.Engines.MLQuests.Definitions.Aurelia.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.StandardSaveStrategy.SaveMobiles (Server.SaveMetrics metrics) [0x00000] in <filename unknown>:0
  at Server.StandardSaveStrategy.Save (Server.SaveMetrics metrics, Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.World.Save (Boolean message, Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.Misc.AutoSave.Save (Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.Misc.AutoSave.OnTick () [0x00000] in <filename unknown>:0
  at Server.Timer.Slice () [0x00000] in <filename unknown>:0
  at Server.Core.Main (System.String[] args) [0x00000] in <filename unknown>:0
Crash: Generating report...done
Crash: Sending email...done
Exiting...


RunUO 2.3 (r987) after generating Signs + Decoration:
Code:
RunUO - [www.runuo.com] Version 2.2, Build 4942.32993
Core: Running on .NET Framework Version 4.0.30319
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...done (2841 items, 594 mobiles) (6.94 seconds)
Regions: Loading...done
World: Loading...done (0 items, 0 mobiles) (0.11 seconds)
ServerList: Auto-detecting public IP address...done ()
This server has no accounts.
Do you want to create the owner account now? (y/n)
Username: Test
Password: Test
Account created.
Listening: 127.0.0.1:2593
Listening: 192.168.0.3:2593
Client: 192.168.0.17: Connected. [1 Online]
Login: 192.168.0.17: Valid credentials for 'Test'
Client: 192.168.0.17: Connected. [2 Online]
Login: 192.168.0.17: Account 'Test' at character list
Client: 192.168.0.17: Disconnected. [1 Online] [Test]
Login: 192.168.0.17: New character being created (account=Test)
- Character: Test (serial=0x00000001)
- Started: New Haven (3503, 2574, 14) in Trammel
Core: Using standard save strategy
World: Saving...Closing Save Files.
Save done in 0.75 seconds.
Core: Using standard save strategy
World: Saving...Closing Save Files.
Save done in 0.04 seconds.
Core: Using standard save strategy
World: Saving...Error:
System.NullReferenceException: Object reference not set to an instance of an object
  at Server.BinaryFileWriter.Write (Double value) [0x00000] in <filename unknown>:0
  at Server.Mobiles.BaseCreature.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.Mobiles.BaseVendor.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.Engines.Quests.BaseQuester.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.Engines.Quests.Naturalist.Naturalist.Serialize (Server.GenericWriter writer) [0x00000] in <filename unknown>:0
  at Server.StandardSaveStrategy.SaveMobiles (Server.SaveMetrics metrics) [0x00000] in <filename unknown>:0
  at Server.StandardSaveStrategy.Save (Server.SaveMetrics metrics, Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.World.Save (Boolean message, Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.Misc.AutoSave.Save (Boolean permitBackgroundWrite) [0x00000] in <filename unknown>:0
  at Server.Misc.AutoSave.Save () [0x00000] in <filename unknown>:0
  at Server.Commands.CommandHandlers.Save_OnCommand (Server.Commands.CommandEventArgs e) [0x00000] in <filename unknown>:0
  at Server.Commands.CommandSystem.Handle (Server.Mobile from, System.String text, MessageType type) [0x00000] in <filename unknown>:0
  at Server.Commands.CommandSystem.Handle (Server.Mobile from, System.String text) [0x00000] in <filename unknown>:0
  at Server.Gumps.AdminGump.InvokeCommand (System.String c) [0x00000] in <filename unknown>:0
  at Server.Gumps.AdminGump.OnResponse (Server.Network.NetState sender, Server.Gumps.RelayInfo info) [0x00000] in <filename unknown>:0
  at Server.Network.PacketHandlers.DisplayGumpResponse (Server.Network.NetState state, Server.Network.PacketReader pvSrc) [0x00000] in <filename unknown>:0
  at Server.Network.MessagePump.HandleReceive (Server.Network.NetState ns) [0x00000] in <filename unknown>:0
  at Server.Network.MessagePump.Slice () [0x00000] in <filename unknown>:0
  at Server.Core.Main (System.String[] args) [0x00000] in <filename unknown>:0
Crash: Generating report...done

Maybe the SD Card is to slow?
 

fwiffo

Sorceror
No, to me there is something wrong in Double value handling, note that it crashes only when writing a Double value.
 
Top