#147
Solved
removemarker action causes crash when no marker id is provided
Reported by Hearn on OCTGN · 14/11/2009 08:33:54
- Assigned to:
- jods
- Priority:
- Normal
- Status:
- Solved
- Category:
- Other
- Version:
- 0.6.*
- Issue type:
- Feature
When you execute a <removemarker> script action, a crash occurs if you have provided no id attribute for the marker.
To elaborate, the game XML Schema defines the id attribute as optional for the removemarker script action. I’m not sure if the Schema is wrong by declaring that attribute as optional, or the game manager is wrong in that it expects the id.
Here’s a call stack:
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.Enumerable.First[TSource](IEnumerable`
at Octgn.Game.GetMarkerModel(Guid id)
at Octgn.Script.RemoveMarker.ExecuteOnCards(List`1 cards)
at Octgn.Script.CardsAction.Execute()
at Octgn.Script.ScriptEngine.RunLoop()
at Octgn.Script.ScriptEngine.Run(Action[] actions, IEnumerable`1 cards)
at Octgn.Play.Gui.GroupControl.CardActionClicked(Obje
at System.Windows.RoutedEventHandlerInfo.InvokeHandle
at System.Windows.EventRoute.InvokeHandlersImpl(Objec
at System.Windows.UIElement.RaiseEventImpl(Dependency
at System.Windows.UIElement.RaiseEvent(RoutedEventArg
at System.Windows.Controls.MenuItem.InvokeClickAfterR
at System.Windows.Threading.ExceptionWrapper.Internal
at System.Windows.Threading.ExceptionWrapper.TryCatch
at System.Windows.Threading.Dispatcher.WrappedInvoke(
at System.Windows.Threading.DispatcherOperation.Invok
at System.Windows.Threading.DispatcherOperation.Invok
at System.Threading.ExecutionContext.runTryCode(Objec
at System.Runtime.CompilerServices.RuntimeHelpers.Exe
at System.Threading.ExecutionContext.RunInternal(Exec
at System.Threading.ExecutionContext.Run(ExecutionCon
at System.Windows.Threading.DispatcherOperation.Invok
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(In
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(
at System.Windows.Threading.ExceptionWrapper.Internal
at System.Windows.Threading.ExceptionWrapper.TryCatch
at System.Windows.Threading.Dispatcher.WrappedInvoke(
at System.Windows.Threading.Dispatcher.InvokeImpl(Dis
at System.Windows.Threading.Dispatcher.Invoke(Dispatc
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(
at System.Windows.Threading.Dispatcher.PushFrame(Disp
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at Octgn.OctgnApp.Main()
Attachments
No attachment has been uploaded, yet.
Loading comments...