orleans: NullReferenceException in deserialization when mixing serializers
Hi, I have a strange case.
I have an EventConsumerGrain that retrieves events from an event sourcing database and calls an IEventConsumer.
One of these consumers throws a NullReferenceException:
System.NullReferenceException: Object reference not set to an instance of an object.
at Squidex.Domain.Apps.Entities.Contents.Text.GrainTextIndexer.On(Envelope`1 event) in /src/src/Squidex.Domain.Apps.Entities/Contents/Text/GrainTextIndexer.cs:line 68
at Squidex.Infrastructure.EventSourcing.Grains.EventConsumerGrain.DispatchConsumerAsync(Envelope`1 event) in /src/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerGrain.cs:line 232
at Squidex.Infrastructure.EventSourcing.Grains.EventConsumerGrain.<>c__DisplayClass10_0.<<OnEventAsync>b__0>d.MoveNext() in /src/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerGrain.cs:line 83
--- End of stack trace from previous location where exception was thrown ---
at Squidex.Infrastructure.EventSourcing.Grains.EventConsumerGrain.DoAndUpdateStateAsync(Func`1 action, String caller) in /src/src/Squidex.Infrastructure/EventSourcing/Grains/EventConsumerGrain.cs:line 165
The code where the exception is thrown:
As you can see there is only a reference to the grain. The content event cannot be null because of the pattern matching.
If I scale down the cluster to 1 it works, so I guess it has something to do with the remote call. But I do not receive details.
EDIT: I am not sure yet, but I would say that it only happens under load, e.g. when many requests per second are done (~100)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 28 (28 by maintainers)
@ReubenBond I have another observation. I made the mistake again and now I get this: