Full Version : crashing with 3.21
xmlspawner >>Troubleshooting >>crashing with 3.21
<< Prev | Next >>
Syznow- 03-18-2007
I just installed version 3.21 to replace version 3.19 of XmlSpawner on a Runuo 2.0 RC1 system. Standard quests worked find, but trying to retrieve a quest that was put up on a player questboard crashes the shard with the exception below.
I am not familiar with the internals of the spawner scripts, but I am guessing this is something incorrectly handled during the 3.19 to 3.21 upgrade. Does this upgrade require removal of all previously existing quest objects? Any help would be appreciated.
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Map.OnLeave(Item item)
at Server.Item.set_Parent(Object value)
at Server.Item.AddItem(Item item)
at Server.Items.Container.DropItem(Item dropped)
at Server.Items.BaseContainer.TryDropItem(Mobile from, Item dropped, Boolean sendFullMessage)
at Server.Items.LockableContainer.TryDropItem(Mobile from, Item dropped, Boolean sendFullMessage)
at Server.Items.XmlQuestHolder.ReturnReward()
at Server.Items.XmlQuestHolder.get_IsValid()
at Server.Gumps.XmlQuestBookGump..ctor(PlayerMobile from, XmlQuestBook book, Int32 page, ArrayList list)
at Server.Items.XmlQuestBook.OnDoubleClick(Mobile from)
at Server.Mobile.Use(Item item)
at Server.Engines.XmlSpawner2.XmlAttach.UseReq(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
ArteGordon- 03-19-2007
I'll check that out.
It is probably a combination of some changes that were made in quest reward handling and problems that RC1 has with the region and map OnLeave method.
I only test on the latest SVN, so if it is RC1-specific I might have some trouble tracking it down.
ArteGordon- 03-19-2007
ok, I think I may have found the problem. v3.21a contains the fix.
It is a change to XmlQuestHolder.cs in XmlSpawner2-20-v321a-2of3.zip
This fixes a nasty bug with gold rewards in playermade quests.
Syznow- 03-19-2007
Thanks for the quick response.
I replaced XmlQuestHolder.cs with the 3.21a version but now get an exception when the world is loading. I looked at your code and did not see any variable type changes that would cause this. Am I having problems because of changes in the SVN code since RC1?
Error:
System.Reflection.TargetInvocationException: Exception has been thrown by the ta
rget of an invocation. ---> System.InvalidOperationException: Collection was mod
ified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resour
ce)
at System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator.MoveNex
t()
at Server.Items.XmlQuestHolder.Initialize()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] argum
ents, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle
typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] argume
nts, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwn
er)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at Server.ScriptCompiler.Compile(Boolean debug)
at Server.Core.Main(String[] args)
This exception is fatal, press return to exit
ArteGordon- 03-19-2007
hmm. Try this version of XmlQuestHolder.cs
Syznow- 03-19-2007
Thanks Arte.
I did a quick test and that fixes the issue with the quest board crashing the shard.
I will test more thoroughly later tonight.
I appreciate the very quick response. Hopefully it saves someone else from having this problem.
Like everyone has said before.... Thanks for the great scripts!
ArteGordon- 03-20-2007
I have posted an official fix of XmlQuestHolder.cs in the release that is an improvement on the one posted above.
Thanks for testing this out.
ravyn38- 03-24-2007
ok well, I got a strange crash as well, and I'm posting it here, because I'm unsure, but thinking it's the same issue... here's the error I got

CODE
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527 Core: Running on .NET Framework Version 2.0.50727 Scripts: Compiling C# scripts...done (0 errors, 0 warnings) Scripts: Compiling VB.NET scripts...no files found. Scripts: Verifying...done (4155 items, 901 mobiles)
Regions: Loading...done
World: Loading...done (72586 items, 27694 mobiles) (9.59 seconds)
Reports: Stats: Loading...done
Reports: Staff: Loading...done
Error:
System.Reflection.TargetInvocationException: Exception has been thrown by the ta
rget of an invocation. ---> System.NullReferenceException: Object reference not
set to an instance of an object.
at Server.Map.OnLeave(Item item)
at Server.Item.set_Parent(Object value)
at Server.Item.AddItem(Item item)
at Server.Items.Container.DropItem(Item dropped)
at Server.Items.XmlQuestHolder.UnHideRewards()
at Server.Items.XmlQuestHolder.UpdateWeight()
at Server.Items.XmlQuestHolder.Initialize()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] argum
ents, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle
typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] argume
nts, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwn
er)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at Server.ScriptCompiler.Compile(Boolean debug)
at Server.Core.Main(String[] args)
This exception is fatal, press return to exit

I'm downloading this quick fix... oh... also... fyi, I just downloaded the spawner 2 yesturday and I'm running the 2.0 shard also just downloaded yesturday.
ArteGordon- 03-24-2007
is this with the latest 3.21a? Is the date on the XmlQuestHolder.cs script 3/20/2007 6:56am?