StackOverflow Exception in my application - Wisej.Core.WisejSerializer.Serialize... in stack only

0
0

Hello Wisej team,

 

We encountered a very strange StackOverflow exception in our Wisej application and would appreciate your help as stack points to internal Wisej.Core functions.

First and foremost, it can happen locally and neither try-catch blocks nor FirstChanceException catches it obviously. Secondly, it happens when we use a custom control that implements : Widget, IWisejControl, with a js code and OnWidgetEvent events handled, etc… However, there’re no specific steps to reproduce the issue, only by opening-closing the control and randomly it happens.

When I used WinDbg tool to find the exact stack trace, it looks like it stuck serializing an object (full log file attached):

0000009ad04067c0 00007ffe354c645c Wisej.Core.WisejSerializer.SerializeValue(JsonWriter, System.Object)
0000009ad04068a0 00007ffe354c783e Wisej.Core.WisejSerializer.SerializeField(JsonWriter, System.String, System.Object, Boolean, Boolean)
0000009ad04068f0 00007ffe354c7586 Wisej.Core.WisejSerializer.SerializeObject(JsonWriter, System.Object)
0000009ad0406990 00007ffe354c719a Wisej.Core.WisejSerializer.SerializeValue(JsonWriter, System.Object)
0000009ad0406a70 00007ffe354c783e Wisej.Core.WisejSerializer.SerializeField(JsonWriter, System.String, System.Object, Boolean, Boolean)
0000009ad0406ac0 00007ffe354c7586 Wisej.Core.WisejSerializer.SerializeObject(JsonWriter, System.Object)
0000009ad0406b60 00007ffe354c719a Wisej.Core.WisejSerializer.SerializeValue(JsonWriter, System.Object)

..Repeated hundreds of times.. (only SerializeObject(..) repeats 700+ times)

000009ad047dc60 00007ffe354c6f8b Wisej.Core.WisejSerializer.SerializeValue(JsonWriter, System.Object)
0000009ad047dd40 00007ffe354c6078 Wisej.Core.WisejSerializer.SerializeInternal(System.Object, Wisej.Core.WisejSerializerOptions)
0000009ad047dda0 00007ffe389b8bf8 Wisej.Core.ResponseManager+ResponseActions.Wisej.Core.IWisejSerializable.Serialize(System.IO.TextWriter, Wisej.Core.WisejSerializerOptions)
0000009ad047de20 00007ffe354c6e5e Wisej.Core.WisejSerializer.SerializeValue(JsonWriter, System.Object)
0000009ad047df00 00007ffe354c6078 Wisej.Core.WisejSerializer.SerializeInternal(System.Object, Wisej.Core.WisejSerializerOptions)
0000009ad047df60 00007ffe389b893e Wisej.Core.ResponseManager.b__44_0()
0000009ad047dfc0 00007ffe354e36af Wisej.Core.IWisejSynchronizedImplementation.Lock(Wisej.Core.IWisejSynchronized, System.Action)
0000009ad047e010 00007ffe354e36af Wisej.Core.IWisejSynchronizedImplementation.Lock(Wisej.Core.IWisejSynchronized, System.Action)
0000009ad047e060 00007ffe354e36af Wisej.Core.IWisejSynchronizedImplementation.Lock(Wisej.Core.IWisejSynchronized, System.Action)
0000009ad047e0b0 00007ffe354dd32d Wisej.Core.ResponseManager.ProcessRequest(ServiceType, System.Object)
0000009ad047e130 00007ffe389c30e1 Wisej.Core.HttpHandler+c__DisplayClass19_0.b__0()
0000009ad047e180 00007ffe8ed2af27 System.Threading.Tasks.Task.Execute()
0000009ad047e1c0 00007ffe8ecbdf12 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
0000009ad047e290 00007ffe8ecbdd95 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
0000009ad047e2c0 00007ffe8ed2b1e1 System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
0000009ad047e370 00007ffe8ed2a8c1 System.Threading.Tasks.Task.ExecuteEntry(Boolean)
0000009ad047e3b0 00007ffe8ec88e46 System.Threading.ThreadPoolWorkQueue.Dispatch()

 

 

I wonder if there is any mechanism to detect:

when it’s happening like when it’s serializing dynamic Options object or when calling Call(..) function with an object in arguments or something else

with what object;

or if I can replace WiseJ default serializer with a custom one.

 

 

Regards,

Michael

  • You must to post comments
0
0

Update:

All good now, I found the loop reference in an Options object serializing it with Newtonsoft, but PLEASE make sure your serializer can handle loop-references as it may cause severe issues detecting such errors.

  • You must to post comments
0
0

Update:

All good now, I found the loop reference in an Options object serializing it with Newtonsoft, but PLEASE make sure your serializer can handle loop-references as it may cause severe issues detecting such errors.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.