Comments (9)
I'd really love to see the json_debug.txt
file content. This second error seems very different:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at EditorBase`2.set_EditorReady(Boolean value) in /home/hhyyrylainen/Projects/Thrive/src/general/base_stage/EditorBase.cs:line 181
at InvokeStub_EditorBase`2.set_EditorReady(Object, Span`1)
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at BaseThriveConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in /home/hhyyrylainen/Projects/Thrive/src/saving/serializers/ThriveJsonConverter.cs:line 594
That shouldn't able to be any kind of save data reading bug. This looks more like a rare bug in the Godot engine where it has incorrectly loaded a scene with not all of its resources. The game log file from when that error occurred might have errors from the engine that are related to the save load problem.
I had kind of similar problem where the Godot engine refused to consistently load about 3 NodePath variables. Switching those to use direct node references fixed those cases. We have not switched all of our code to use those direct references yet as it is a lot of work, but if this is done it might also fix the save load problem: #4940
from thrive.
Ok, The current json_debug.txt
is unrelated, as I played further already, but I'll attach it if I encounter the bug again. Also, if it's really that Godot bug, then I just have to wait until it's fixed.
from thrive.
I think your save file has data that cannot be correctly loaded for some reason.
For reference this is the error:
Newtonsoft.Json.JsonException: Scene loaded JSON deserialized type can't be assigned to target type
at BaseThriveConverter.CreateDeserializedFromScene(Type objectType, InProgressObjectDeserialization objectLoad) in /home/hhyyrylainen/Projects/Thrive/src/saving/serializers/ThriveJsonConverter.cs:line 432
at InProgressObjectDeserialization.CreateInstance() in /home/hhyyrylainen/Projects/Thrive/src/saving/serializers/InProgressObjectDeserialization.cs:line 389
Meaning that the game was able to read the save file but the data structure ends up it trying to do an invalid data assignment after loading one part of the save.
Loading the provided save file works for me without any errors. Could you verify that that is the save file that doesn't work for you?
Edit: alternatively if there exists a JSON debug log file in the game logs folder, you could provide that as it has quite good information for me to investigate further.
from thrive.
@hhyyrylainen
Like I said, this bug happens suddenly after the save was loaded successfully multiple times. Since some point, it just fails to load the save. Restarting the game is what helps, making it load the save successfully (again).
The save itself is valid. It's just a bug in the loading mechanism or whatever else, I may be mistaken.
from thrive.
I see. I've tried loading the save multiple times but I didn't see any problems. The one thing that could theoretically cause this is that the save file read closes early leaving part of the data unread, but I would suspect more that that would fail with JSON parse error. I can try double checking save file reading to make sure it should read the entire file. Have you seen a similar error in the museum page? That has exact same file loading code as the saving system.
from thrive.
I've tried loading the save multiple times but I didn't see any problems.
I don't think it's easy to reproduce, as it happens occasionally. I don't even know the frequency of the bug, as it's the first time ever me encountering it. All I can assume is me trying to load the save too quickly after it was loaded.
Have you seen a similar error in the museum page? That has exact same file loading code as the saving system.
No. How can I check for it?
from thrive.
Open the thriveopedia and go to the museum page. Things work correctly if you see cells there (of course you need to have fossilized some for them to appear at all) and can click on one to see the properties:
from thrive.
@hhyyrylainen
I checked, it loads normally. I think I should do it multiple times to do it. OR may be, it some in-game thing. Like I said, I can assume is me trying to load the save too quickly after it was loaded.
from thrive.
Just happened again. Here's the log: https://pastebin.com/WT4BxMW8
It seems it's not too difficult to reproduce. I think I understand what can be causing this: I mistakenly confirmed the cell in the editor without any changes, so the game continued. I opened the menu immediately when the game loaded, then deleted the autosave and loaded the editor one. And the crash happened!
It seems the bug has some relation to the time that passes after a non-editor save is loaded. Maybe some background process doesn't manage to initialize something or free some data before I pause the game and load anything?
UPD: Save file here: https://www.mediafire.com/file/xomxym90ust04v2/auto_save_1%25282%2529.thrivesave/file
UPD: Strange, this time the save loaded normally after just exiting to main menu. No restart was needed.
from thrive.
Related Issues (20)
- AI should know how to use the signaling agent to send commands
- AI should be able to sometimes ignore signaling agent commands
- Make endosymbiosis target receive a population benefit
- Add GUI warning if an endosymbiosis candidate is not present in the current patch
- Editor finish button warning badge should have tooltip saying why it is showing
- Editor cancel button focused state has different border rounding compared to the red background
- Test that in-progress endosymbiosis doesn't cause problems when becoming multicellular
- Make Mutations.MutateMicrobeOrganelles and other mutations not throw exceptions
- Add text in organelle unlock conditions popup to mention endosymbiosis option
- Fix flagellum dissolve animation
- Add pilus damage cooldown on ejecting something
- Make cell corpse chunks use the real collision shapes of organelles
- Entering the game from freebuild editor for the first time briefly flashes the screen
- Auto-evo should penalize photosynthesisers without enough storage to survive the night
- UpdateInitialCompounds doesn't work with compound type specific storage
- Create a tool to pre-bake Jolt godot shapes before exporting
- Create a sound effect for removing a hex (organelle) in the editor
- Multipart meshes (OrganelleMeshWithChildren) don't display dissolve animation as chunks correctly
- Inspection results shouldn't print out `Microsoft.CodeAnalysis.Sarif.Result`
- Inspection result problems shouldn't print the help URL twice
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thrive.