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:


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])


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

[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.


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

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