Crash on Save
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: Official Release
Version: 4.1.0.1948
Platform(s): Windows 10 Pro
Describe the bug
I hit Ctrl+S and the bug apears.
To Reproduce
Steps to reproduce the behavior:
- Create basic Project from YT Tutorial
- Delete everything
- Delete Scene assets too
- place some objects and play around with the values
- Hit Ctrl+S
Screenshots
Log and callstacks
Error: There was a problem saving the solution. Value cannot be null. (Parameter 'value')
ArgumentNullException: Value cannot be null. (Parameter 'value')
at System.IO.BinaryWriter.Write(String value)
at Stride.Core.Assets.AssetReferenceDataSerializer.Serialize(AssetReference& assetReference, ArchiveMode mode, SerializationStream stream) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\assets\Stride.Core.Assets\AssetReferenceDataSerializer.cs:line 29
at Stride.Core.Serialization.MemberReuseSerializer1.Serialize(T& obj, ArchiveMode mode, SerializationStream stream) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\Serialization\MemberSerializerGenerated.cs:line 1122
at Stride.Core.Serialization.Serializers.KeyedSortedListSerializer3.Serialize(TKeyedList& obj, ArchiveMode mode, SerializationStream stream) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\Serialization\Serializers\KeyedSortedListSerializer.cs:line 50
at Stride.Core.Serialization.MemberReuseSerializer1.Serialize(T& obj, ArchiveMode mode, SerializationStream stream) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\Serialization\MemberSerializerGenerated.cs:line 1122
at Stride.Core.DataSerializers.StrideCoreAssets_PackageSerializer.Serialize(Package& obj, ArchiveMode mode, SerializationStream stream)
at Stride.Core.Serialization.DataSerializer1.Serialize(Object& obj, ArchiveMode mode, SerializationStream stream) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\Serialization\DataSerializer.cs:line 85
at Stride.Core.Serialization.MemberReuseSerializer1.SerializeExtended(T& obj, ArchiveMode mode, SerializationStream stream, DataSerializer1 dataSerializer) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\Serialization\MemberSerializerGenerated.cs:line 1317
at Stride.Core.Assets.AssetCloner..ctor(Object value, AssetClonerFlags flags, IEnumerable`1 externalIdentifiables) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\assets\Stride.Core.Assets\AssetCloner.cs:line 78
at Stride.Core.Assets.Package.Clone() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\assets\Stride.Core.Assets\Package.cs:line 387
at Stride.Core.Assets.PackageSession.Save(ILogger log, PackageSaveParameters saveParameters) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\assets\Stride.Core.Assets\PackageSession.cs:line 1107
at Stride.Core.Assets.Editor.ViewModel.SessionViewModel.<>c__DisplayClass194_0.b__0() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\editor\Stride.Core.Assets.Editor\ViewModel\SessionViewModel.cs:line 924
Additional context
After watching the tutorials i wanted to try around in the editor to get a feel. I deleted everything from the basic tutorial scenery, i also deleted the scenes in the assets. Added 2 empty entities in the current main scene, made 1 cube with no material in the assets, 1 plane with metalic blue material and added both to the scene. Then i added a directional light and a point light.
The directional light was repositioned and then the Point lights radius was adjusted with the mouse first, but it was to wild of an increase, so i typed a number instead, 10.
I noticed that the alt key did not allow me to orbit in the Viewport when alt was pressed either outside of before the Viewport focus/under mouse. Then i hit Ctrl+S and the bug popped. I thought its because the cube without material, deleted it, tried again, same problem.
Then i deleted some assets , same problem still.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Ctrl+S failure with the listed empty-project, deleted-assets setup, then start at Stride.Core.Assets.AssetReferenceDataSerializer.cs line 29 and follow the save path through Package.Clone, PackageSession.Save, and SessionViewModel.cs line 924. Identify which asset reference reaches BinaryWriter.Write with a null value; done means the same project saves without the reported ArgumentNullException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100