View Issue Details

IDProjectCategoryView StatusLast Update
0001612NoesisGUIUnity3Dpublic2020-01-07 10:26
ReporterstonstadAssigned Tosfernandez 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.2.6 
Target Version2.2.6Fixed in Version2.2.6 
Summary0001612: BaseComponent_Release() - Editor Crash During Playback
DescriptionUnity 2019.2.8f1.

Write to location 0000000000000000 caused an access violation.

Context:
RDI: 0x0000000000000000 RSI: 0x0000022c208a4580 RAX: 0x0000022c24040030
RBX: 0x0000022c2450d990 RCX: 0x0000022c208a4580 RDX: 0x0000000000000001
RIP: 0x0000000000000000 RBP: 0x000000a20a2ee6c0 SegCs: 0x0000000000000033
EFlags: 0x0000000000010202 RSP: 0x000000a20a2ee628 SegSs: 0x000000000000002b
R8: 0x0000000000000004 R9: 0x0000000000000001 R10: 0x0000000000008000
R11: 0x00007ffd6060e910 R12: 0x0000022c24943c60 R13: 0x000000a20a2ee750
R14: 0x0000022c2330d2d0 R15: 0x0000022c6f8043a0


Bytes at CS:EIP:
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??

Mono DLL loaded successfully at 'C:\Program Files\Unity\Hub\Editor\2019.2.8f1\Editor\Data\MonoBleedingEdge\EmbedRuntime\mono-2.0-bdwgc.dll'.


Stack Trace of Crashed Thread 16136:
ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 000001D3DFDBAD90)
ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 000001D3DFDBAD90)
0x000001D3DFDBAD90 ((<unknown>)) (function-name not available)
0x0000022C2B198147 (Assembly-CSharp) Noesis.NoesisGUI_PINVOKE.BaseComponent_Release()
0x0000022C2B198023 (Assembly-CSharp) Noesis.BaseComponent.Release()
0x0000022C2DEA5B33 (Assembly-CSharp) Noesis.Extend.ReleasePending()
0x0000022C2DEA4573 (Assembly-CSharp) Noesis.Extend.Update()
0x0000022C2DEA4313 (Assembly-CSharp) Noesis.View.Update()
0x0000022C2DE96EFB (Assembly-CSharp) NoesisView.LateUpdate()
Steps To ReproduceEncl. editor and error logs. Editor crash dump.

I don't have repro steps yet, as this is my first test with 2.2.6. I was cyclingthrough screens in Stellar Conquest and testing functionality.
TagsNo tags attached.
PlatformAny

Activities

stonstad

stonstad

2020-01-01 21:00

reporter  

Crash_2020-01-01_195529081.zip (449,403 bytes)
stonstad

stonstad

2020-01-01 21:07

reporter   ~0006056

Changing reproducible status to 'always'. If I quickly flip between UIs the behavior happens in a few tries. I don't have any additional telemetry to share yet. This is a new behavior in 2.2.6.
stonstad

stonstad

2020-01-01 21:25

reporter   ~0006057

I'm unable to proceed with other testing, as the crash is very repeatable and happens in as little as one or two screen clicks. I'm rolling back to 2.2.5. If you have a new version you would like me to try please feel free to send over an updated DLL.
stonstad

stonstad

2020-01-01 21:38

reporter   ~0006058

Encl. editor and error log w/ crash dump that does not show missing DLL error. That was a separate issue on my end. The Noesis behavior and crash stacktrace remains the same. Thanks.

Crash_2020-01-01_203612344.zip (416,292 bytes)
sfernandez

sfernandez

2020-01-02 13:05

manager   ~0006059

Last edited: 2020-01-02 13:07

View 3 revisions

Hi,

I'm trying to reproduce the crashes with the copy of the game code we have from last summer but I'm getting JSON deserialization errors when logging, probably something that changed in the server.

Newtonsoft.Json.JsonSerializationException: Error resolving type specified in JSON 'StellarConquest.Model.Authentication.CheckedResponse`1[[System.Collections.Generic.List`1[[StellarConquest.Model.Authentication.AuthenticatedPlayer, StellarConquest.Model]], mscorlib]], StellarConquest.Model'. Path '$type', line 1, position 218. ---> Newtonsoft.Json.JsonSerializationException: Could not find type 'StellarConquest.Model.Authentication.CheckedResponse`1[[System.Collections.Generic.List`1[[StellarConquest.Model.Authentication.AuthenticatedPlayer, StellarConquest.Model]], mscorlib]]' in assembly 'StellarConquest.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
  at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeFromTypeNameKey (Newtonsoft.Json.Serialization.DefaultSerializationBinder+TypeNameKey typeNameKey) [0x00093] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at (wrapper delegate-invoke) System.Func`2[Newtonsoft.Json.Serialization.DefaultSerializationBinder+TypeNameKey,System.Type].invoke_TResult_T(Newtonsoft.Json.Serialization.DefaultSerializationBinder/TypeNameKey)
  at Newtonsoft.Json.Utilities.ThreadSafeStore`2[TKey,TValue].AddValue (TKey key) [0x00000] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.Utilities.ThreadSafeStore`2[TKey,TValue].Get (TKey key) [0x00010] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.Serialization.DefaultSerializationBinder.BindToType (System.String assemblyName, System.String typeName) [0x0000d] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName (Newtonsoft.Json.JsonReader reader, System.Type& objectType, Newtonsoft.Json.Serialization.JsonContract& contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.String qualifiedTypeName) [0x00096] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
   --- End of inner exception stack trace ---
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName (Newtonsoft.Json.JsonReader reader, System.Type& objectType, Newtonsoft.Json.Serialization.JsonContract& contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.String qualifiedTypeName) [0x000c9] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties (Newtonsoft.Json.JsonReader reader, System.Type& objectType, Newtonsoft.Json.Serialization.JsonContract& contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue, System.Object& newValue, System.String& id) [0x0015d] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x000bc] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x0006d] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000d9] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00053] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0002d] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <97722d3abc9f4cf69f9e21e6770081b3>:0 
  at StellarConquest.Services.ServiceClient+<GetPlayers>d__12.MoveNext () [0x000d9] in E:\Proyectos\Clients\Stellar Conquest\Assets\Scripts\Web Services\ServiceClient.cs:172 
UnityEngine.Debug:Log(Object)
StellarConquest.Services.<GetPlayers>d__12:MoveNext() (at Assets/Scripts/Web Services/ServiceClient.cs:178)

Could you please provide updated code or assembly?

In the meantime I found an error in our code that is probably the cause of the crashes.
Go to NoesisGUI/Plugins/API/Core/Extend.cs line 4084 and change it to:

IntPtr cPtr = new IntPtr(info.ptr);


stonstad

stonstad

2020-01-02 17:53

reporter   ~0006060

The proposed code change seems to prevent the editor crash behavior. It throws this exception, however --

KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <599589bf4ce248909b8a14cbe4a2034e>:0)
Noesis.Extend.AddDestroyedExtends () (at Assets/NoesisGUI/Plugins/API/Core/Extend.cs:4094)
Noesis.Extend.Update () (at Assets/NoesisGUI/Plugins/API/Core/Extend.cs:4319)
Noesis.View.Update (System.Double timeInSeconds) (at Assets/NoesisGUI/Plugins/API/Core/View.cs:269)
NoesisView.LateUpdate () (at Assets/NoesisGUI/Plugins/NoesisView.cs:822)

I can provide a copy of the project and source code -- but it may not be something I can do today. If there are code changes and/or DLLs you would like me to try please let me know.
sfernandez

sfernandez

2020-01-02 18:31

manager   ~0006061

Does that exception continue to be thrown after re-opening your Unity project or it was just one time after the first recompilation?
I don't see how can the key not be present in the dictionary if it is being added at the same time to both _weakExtends list and _weakExtendsHash dictionary.

stonstad

stonstad

2020-01-02 21:02

reporter   ~0006062

Last edited: 2020-01-02 21:04

View 3 revisions

(nevermind)... my find all references was acting up. ** ignore: I'm reviewing 2.2.6 Extend.cs and I don't see where _weakExtendsHash is added to -- could this be why indexing into it later fails? i.e. there a line that adds an element to the dictionary?

** updated

It feels like a race condition. Twice I was able to recreate the exception by flipping through screens. This was after upgrade/shutdown/restart of the editor.

sfernandez

sfernandez

2020-01-03 16:26

manager   ~0006063

Last edited: 2020-01-03 17:28

View 3 revisions

Could you please try again with the new attached Extend.cs?

sfernandez

sfernandez

2020-01-03 17:28

manager  

Extend.cs (239,238 bytes)
stonstad

stonstad

2020-01-03 23:42

reporter   ~0006064

No issues so far with the updated Extend.cs. It appears stable and working. If I encounter anything I'll be sure to share it here.
stonstad

stonstad

2020-01-05 00:26

reporter   ~0006065

8+ hours of testing with no runtime crash or editor errors/warnings.
sfernandez

sfernandez

2020-01-05 14:07

manager   ~0006066

Those are great news, thanks a lot for your feedback.
jsantos

jsantos

2020-01-05 14:47

manager   ~0006067

Time to close this and release! Thanks!

Issue History

Date Modified Username Field Change
2020-01-01 21:00 stonstad New Issue
2020-01-01 21:00 stonstad File Added: Crash_2020-01-01_195529081.zip
2020-01-01 21:07 stonstad Reproducibility have not tried => always
2020-01-01 21:07 stonstad Description Updated View Revisions
2020-01-01 21:07 stonstad Steps to Reproduce Updated View Revisions
2020-01-01 21:07 stonstad Note Added: 0006056
2020-01-01 21:25 stonstad Note Added: 0006057
2020-01-01 21:26 stonstad Description Updated View Revisions
2020-01-01 21:38 stonstad File Added: Crash_2020-01-01_203612344.zip
2020-01-01 21:38 stonstad Note Added: 0006058
2020-01-02 11:54 sfernandez Assigned To => sfernandez
2020-01-02 11:54 sfernandez Status new => assigned
2020-01-02 11:54 sfernandez Target Version => 2.2.6
2020-01-02 13:05 sfernandez Status assigned => feedback
2020-01-02 13:05 sfernandez Note Added: 0006059
2020-01-02 13:07 sfernandez Note Edited: 0006059 View Revisions
2020-01-02 13:07 sfernandez Note Edited: 0006059 View Revisions
2020-01-02 17:53 stonstad Note Added: 0006060
2020-01-02 17:53 stonstad Status feedback => assigned
2020-01-02 18:31 sfernandez Status assigned => feedback
2020-01-02 18:31 sfernandez Note Added: 0006061
2020-01-02 21:02 stonstad Note Added: 0006062
2020-01-02 21:02 stonstad Status feedback => assigned
2020-01-02 21:03 stonstad Note Edited: 0006062 View Revisions
2020-01-02 21:04 stonstad Note Edited: 0006062 View Revisions
2020-01-03 16:26 sfernandez Status assigned => feedback
2020-01-03 16:26 sfernandez Note Added: 0006063
2020-01-03 16:27 sfernandez File Added: Extend.cs
2020-01-03 16:58 sfernandez File Deleted: Extend.cs
2020-01-03 16:59 sfernandez Note Edited: 0006063 View Revisions
2020-01-03 17:28 sfernandez File Added: Extend.cs
2020-01-03 17:28 sfernandez Note Edited: 0006063 View Revisions
2020-01-03 17:28 sfernandez Note View State: 0006063: private
2020-01-03 17:29 sfernandez Note View State: 0006063: public
2020-01-03 23:42 stonstad Note Added: 0006064
2020-01-03 23:42 stonstad Status feedback => assigned
2020-01-05 00:26 stonstad Note Added: 0006065
2020-01-05 14:07 sfernandez Note Added: 0006066
2020-01-05 14:47 jsantos Note Added: 0006067
2020-01-07 10:26 sfernandez Status assigned => resolved
2020-01-07 10:26 sfernandez Resolution open => fixed
2020-01-07 10:26 sfernandez Fixed in Version => 2.2.6