BinaryConstruct/Terraria-Map-Editor — Issue #211: Crashes when placing sprites
Author: Gorloxx
Created: 2012-01-10 08:07:44+00:00
State: open

For some reason when i try to place sprites on the map, it crashes and says Object reference not set to an instance of an object.
I dont quite understand why it is doing this. But I tried downloading Microsoft XNA 4.0 and it still crashes. I hope it is just a simple fix.

Here is the error in my log:

01-10-2012 01:57 v3.1.12009.2302 Error - Object reference not set to an instance of an object.
at TEditXna.Editor.Tools.SpriteTool.MouseDown(TileMouseState e) in D:\Dev\_PROJECTS\Terraria\Terraria-Map-Editor\TEditXna\Editor\Tools\SpriteTool.cs:line 31
at TEditXna.ViewModel.WorldViewModel.MouseDownTile(TileMouseState e) in D:\Dev\_PROJECTS\Terraria\Terraria-Map-Editor\TEditXna\ViewModel\WorldViewModel.cs:line 333
at TEditXna.View.WorldRenderXna.xnaViewport_HwndLButtonDown(Object sender, HwndMouseEventArgs e) in D:\Dev\_PROJECTS\Terraria\Terraria-Map-Editor\TEditXna\View\WorldRenderXna.xaml.cs:line 708
at BCCL.UI.Xaml.XnaContentHost.GraphicsDeviceControl.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) in D:\Dev\_PROJECTS\BCCL\BCCL.Xna\UI\Xaml\XnaContentHost\GraphicsDeviceControl.cs:line 479
at System.Windows.Interop.HwndHost.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
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(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
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 TEditXna.App.Main() in D:\Dev\_PROJECTS\Terraria\Terraria-Map-Editor\TEditXna\obj\x86\Release\App.g.cs:line 0