Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A generic voxel listener is getting serialized. [fairly common] #1006

Open
mklingen opened this issue Feb 16, 2019 · 2 comments
Open

A generic voxel listener is getting serialized. [fairly common] #1006

mklingen opened this issue Feb 16, 2019 · 2 comments
Labels
A Bug High priority bug Saving/Loading

Comments

@mklingen
Copy link
Collaborator

https://sentry.io/cfg/dwarfcorp/issues/874123246/?referrer=github_plugin

TargetInvocationException: Exception has been thrown by the target of an invocation.
  Module "Newtonsoft.Json.Serialization.JsonContract+<>c__DisplayClass73_0", line 0, in CreateSerializationCallback { <lambda> }
    Void <CreateSerializationCallback>b__0(System.Object, System.Runtime.Serialization.StreamingContext)
  Module "Newtonsoft.Json.Serialization.JsonContract", line 22, in InvokeOnSerializing
    Void InvokeOnSerializing(System.Object, System.Runtime.Serialization.StreamingContext)
  Module "Newtonsoft.Json.Serialization.JsonSerializerInternalWriter", line 68, in OnSerializing
    Void OnSerializing(Newtonsoft.Json.JsonWriter, Newtonsoft.Json.Serialization.JsonContract, System.Object)
  Module "Newtonsoft.Json.Serialization.JsonSerializerInternalWriter", line 0, in SerializeObject
    Void SerializeObject(Newtonsoft.Json.JsonWriter, System.Object, Newtonsoft.Json.Serialization.JsonObjectContract, Newtonsoft.Json.Serialization.JsonProperty, Newtonsoft.Json.Serialization.JsonContainerContract, Newtonsoft.Json.Serialization.JsonProperty)
  Module "Newtonsoft.Json.Serialization.JsonSerializerInternalWriter", line 176, in SerializeValue
    Void SerializeValue(Newtonsoft.Json.JsonWriter, System.Object, Newtonsoft.Json.Serialization.JsonContract, Newtonsoft.Json.Serialization.JsonProperty, Newtonsoft.Json.Serialization.JsonContainerContract, Newtonsoft.Json.Serialization.JsonProperty)
...
(30 additional frame(s) were not displayed)

InvalidProgramException: DO NOT SERIALIZE GENERIC VOXEL LISTENERS
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Components\GenericVoxelListener.cs", line 51, in Serializer
    Void Serializer(System.Runtime.Serialization.StreamingContext)

Exception has been thrown by the target of an invocation.
@mklingen mklingen added Saving/Loading A Bug High priority bug labels Feb 17, 2019
@mklingen
Copy link
Collaborator Author

So this could be anywhere that a list of bodies is being serialized. Suggest an audit of such cases, especially when we're dealing with octree lookups, as generic voxel listener will sometimes end up in those searches.

@mklingen
Copy link
Collaborator Author

Added checks to ensure that fire only cares about root objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A Bug High priority bug Saving/Loading
Projects
None yet
Development

No branches or pull requests

1 participant