-
Notifications
You must be signed in to change notification settings - Fork 144
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
StackOverflowException occures when subscribeMethod throws an exception using dotnet core #150
Comments
Unfortunately a StackOverflowException has no stack trace. I can give you the top of the stack if it helps. Then I have only calls to SerializeObject until the maximum number of stack frames supported is exceeded. Here is the entire code: |
@srollinet I tried to reproduce this when you reported it, without any success. It just struck me that I was running under 4.5.1 and furthermore I believe I know what the problem is.
Serialization of Exception in dotnet core is not supported, which is exactly what we're doinig here. You can temporary mitigate the issue by implement your own error handler and override I'm open fora discussion as for what the best approach is here. I think it makes sense to get some information about the exception throw, when etc. Perhaps we should just use the |
Sorry, I forgot to mention it was dotnet core. I changed the title. I will try with with a custom error handler for now. |
No worries, I'm glad you reported this so we can update it. |
I have been able to replicate the issue.
It throws the following exception on the
I am not sure if this is related to issue https://github.com/dotnet/coreclr/issues/2715 or not. |
Nice catch! I was under the impression that serialization of exception was not supported in .NET core. It will be interesting to see what you find. Nevertheless, It is not an option to change the default serializer from Json.Net to ServiceStack, so we need to look at other options. |
When subscribeMethod throws an exception, I get a StackOverflowException caused by Newtonsoft.Json (I don't know if it is related to #136)
you can easily reproduce it with the following code, using version 1.10.2
The text was updated successfully, but these errors were encountered: