midspace / midspace/SEToolbox

Object reference not set to an instance of an object error when regenerating a planet

Open
#163 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
156
Forks
62
PR merge metrics
No merged PRs in 30d

Description

SEToolbox Version: 1.189.33
SE Version: 1.190

SEToolbox crashed

---What were you doing with SEToolbox when it happened?---
Regenerating a planet. I want to change the radius of it, but the feature is broken.

Steps to Reproduce
  1. Open a save with a planet.
  2. Click "Regenerate"
  3. Do something. Or don't, it doesn't matter.
  4. Click "OK"
  5. Crash.
SEToolbox Event Log
2019-04-14 23:11:31,277 [1] FATAL SEToolbox.Support.DiagnosticsLogging [(null)] - Unhandled Exception
Application: C:\Program Files (x86)\MidSpace\SEToolbox\SEToolbox.exe
CommandLine: "C:\Program Files (x86)\MidSpace\SEToolbox\SEToolbox.exe" /B /B
CurrentDirectory: C:\Program Files (x86)\MidSpace\SEToolbox
SEBinPath: C:\Program Files (x86)\Steam\SteamApps\common\SpaceEngineers\Bin64
SEBinVersion: 1.190.9
ProcessorCount: 12
OSVersion: Microsoft Windows NT 6.2.9200.0
Version: 4.0.30319.42000
Is64BitOperatingSystem: True
IntPtr.Size: 8
IsAdmin: False
CurrentUICulture: en-US
CurrentCulture: 
Times started total: 6
Times started since last reset: 6
Times started since game update: 6

Files:
2019-04-09T17:18:07.9520735-04:00	25,089,208		HavokWrapper.dll
2017-06-02T08:49:12.0000000-04:00	498,176	2014.2.17.1	HelixToolkit.Wpf.dll
2017-03-08T18:26:22.0000000-05:00	276,480	2.0.8.0	log4net.dll
2019-03-10T21:58:02.9556656-04:00	660,128	12.00.21005.1 built by: REL	msvcp120.dll
2019-03-10T21:58:02.9566631-04:00	963,232	12.00.21005.1 built by: REL	msvcr120.dll
2018-09-09T01:31:30.0000000-04:00	911,360	0.32.0.0	Octokit.dll
2019-04-09T17:18:11.8904976-04:00	73,912	1.0.0.0	Sandbox.Common.dll
2019-04-09T17:18:07.9550481-04:00	7,513,784	1.0.0.0	Sandbox.Game.dll
2019-04-09T17:18:07.9560406-04:00	392,376	1.0.0.0	Sandbox.Graphics.dll
2019-04-09T17:18:11.9257138-04:00	20,664	1.0.0.0	Sandbox.RenderDirect.dll
2019-03-01T05:56:52.0000000-05:00	1,323,008	01.189.33.1	SEToolbox.exe
2017-06-02T08:49:12.0000000-04:00	745		SEToolbox.exe.config
2019-03-01T05:56:48.0000000-05:00	62,464	1.0.0.0	SEToolbox.ImageLibrary.dll
2019-03-01T05:56:48.0000000-05:00	7,680	1.0.0.0	SEToolbox.ImageShaders.dll
2019-03-01T05:56:52.0000000-05:00	2,248,192		SEToolbox.pdb
2019-03-01T05:56:48.0000000-05:00	53,248	1.0.0.0	SEToolboxUpdate.exe
2019-04-09T17:18:07.9565372-04:00	487,608	3.1.0	SharpDX.Direct2D1.dll
2019-04-09T17:18:07.9570325-04:00	286,904	3.1.0	SharpDX.Direct3D11.dll
2019-04-09T17:18:07.9580250-04:00	268,472	3.1.0	SharpDX.dll
2019-04-09T17:18:11.9441073-04:00	138,424	3.1.0	SharpDX.DXGI.dll
2019-04-09T17:18:07.9590165-04:00	485,048	1.0.0.0	SpaceEngineers.Game.dll
2019-04-09T17:18:11.9515049-04:00	62,136	1.0.0.0	SpaceEngineers.ObjectBuilders.dll
2019-04-09T17:18:07.9590165-04:00	5,076,152	1.0.0.0	SpaceEngineers.ObjectBuilders.XmlSerializers.dll
2019-04-09T17:18:07.9595132-04:00	327,864	11.0.0	Steamworks.NET.dll
2019-03-10T21:58:43.5561071-04:00	250,656	04.28.51.07	steam_api64.dll
2019-04-09T17:18:07.9605052-04:00	322,232	1.0.102.0	System.Data.SQLite.dll
2013-03-09T17:25:10.0000000-05:00	39,936	2.0.20525.0	System.Windows.Interactivity.dll
2019-04-09T17:18:11.9549776-04:00	21,688	1.0.0.0	VRage.Ansel.dll
2019-04-09T17:18:11.9805855-04:00	65,208	1.0.0.0	VRage.Audio.dll
2019-04-09T17:18:07.9610010-04:00	486,072	1.0.0.0	VRage.dll
2019-04-09T17:18:07.9614968-04:00	1,348,280	1.0.0.0	VRage.Game.dll
2019-04-09T17:18:07.9619930-04:00	7,312,568	1.0.0.0	VRage.Game.XmlSerializers.dll
2019-04-09T17:18:12.1944622-04:00	92,344	1.0.0.0	VRage.Input.dll
2019-04-09T17:18:07.9624888-04:00	713,912	1.0.0.0	VRage.Library.dll
2019-04-09T17:18:07.9629845-04:00	542,904	1.0.0.0	VRage.Math.dll
2019-04-09T17:18:12.1979340-04:00	204,984		VRage.Native.dll
2019-04-09T17:18:12.2043827-04:00	93,880	1.0.0.0	VRage.OpenVRWrapper.dll
2019-04-09T17:18:07.9634808-04:00	341,688	1.0.0.0	VRage.Render.dll
2019-04-09T17:18:07.9639765-04:00	914,616	1.0.0.0	VRage.Render11.dll
2018-03-27T15:51:20.0000000-04:00	77,824	3.0.1.0	WPFLocalizeExtension.dll
2018-01-08T20:35:48.0000000-05:00	27,648	1.2.2	XAMLMarkupExtensions.dll

System.NullReferenceException: Object reference not set to an instance of an object.
   at Sandbox.Engine.Voxels.MyPlanetStorageProvider.Init(Int64 seed)
   at Sandbox.Engine.Voxels.MyPlanetStorageProvider.Init(Int64 seed, MyPlanetGeneratorDefinition generator, Double radius)
   at SEToolbox.Models.StructurePlanetModel.RegeneratePlanet(Int32 seed, Single radius) in D:\Development\GitHub\SEToolbox\Main\SEToolbox\SEToolbox\Models\StructurePlanetModel.cs:line 385
   at SEToolbox.ViewModels.StructurePlanetViewModel.RegenerateExecuted() in D:\Development\GitHub\SEToolbox\Main\SEToolbox\SEToolbox\ViewModels\StructurePlanetViewModel.cs:line 185
   at SEToolbox.Services.DelegateCommand.Execute() in D:\Development\GitHub\SEToolbox\Main\SEToolbox\SEToolbox\Services\DelegateCommand.cs:line 72
   at SEToolbox.Services.DelegateCommand.System.Windows.Input.ICommand.Execute(Object parameter) in D:\Development\GitHub\SEToolbox\Main\SEToolbox\SEToolbox\Services\DelegateCommand.cs:line 154
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Models/StructurePlanetModel.cs at line 385, where RegeneratePlanet calls MyPlanetStorageProvider.Init, then trace the command from ViewModels/StructurePlanetViewModel.cs line 185. Reproduce the crash using the listed regeneration steps and verify that regenerating a planet completes without the NullReferenceException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, game-dev, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.