System.AccessViolationException - Eventstore restart

We have a problem where a projection is causing the Eventstore to restart.

I have tracked down where it is happening:

The projection has been stripped right back, but the part that causes it is when we include a stream that was truncated (indirectly I think)

We have a stream created called projections_StoreProductManager_result and it contains events called StoreProductHistoryUpdatedEvent.
Our projection which kills Eventstore initially did:

fromStream(‘projections_StoreProductManager_result’) but Position stays on -1 (I have another issue on the go for that_

We changed it:

fromStream(‘StoreProductHistoryUpdatedEvent’)

And this is when our Evenstore keeps restarting.

Anyone got a clue what is going on?

Some more information:

Leading up to the problem, I grabbed one of the events “other” argument: (element other[6])

{"$v":“3:-1:1:4”,"$c":3104315285,"$p":3104315285,"$o":"OrganisationProductPricesAggregate-7397df059707a4d866868d2aefc57a3e","$causedBy":“a6cea0ab-29fe-4a0d-a2e9-409805a0bc12”}

Now, just before we get this exception, other looks like this:

{string[7]}
[0]: null
[1]: “”
[2]: null
[3]: “”
[4]: “-1”
[5]: “”
[6]: “{”$v":“4:-1:1:4”,"$c":3335482879,"$p":3335482879,"$causedBy":“1bdb0344-1c1f-4126-aa6e-a38ce4e3752a”}"

Now, I am 99% sure this event no longer exists (truncated and scavenged long ago)
There is no “$o” property on other[6] so could this be the source of the problem?

I don’t know enough about the inner workings of the Eventstore, but ideally, we shouldn’t be seeing these “ghost events” when we are running projections or if that is part of the actual processing, a way to skip past this from the C# before it’s passed onto ExecuteCommandHandler?

Hi Steven, I think it’s better to open an issue in the server reposotiry.

Alexey,

I had the same thought, and created an Issue over here:

I think I found the bug (and applied a fix)