Crash on finalization #15

d-led opened this Issue Jul 27, 2014 · 3 comments


None yet

2 participants

d-led commented Jul 27, 2014

There seems to be a race condition in finalization of dynamiclua causing a crash 80% of the time.

Example: Program.cs, use using.

The exception is: System.AccessViolationException from KeraLua (I'm on Win 8.1, 64bit .NET 4.5, AnyCpu config). It's thrown from the GC Finalizer Thread, while all other threads are already dead. Perhaps, the finalizer should be empty.

Maybe that would help:

@nrother nrother closed this in b4a701f Jul 28, 2014
nrother commented Jul 28, 2014

I must admit, I never completely understood IDisposable and Finalizers, leading to my buggy implementation that was basically a use-after-free. No I read and made it better :)

d-led commented Jul 29, 2014

superb! will you push it to nuget?

nrother commented Jul 30, 2014

Oh, I forgot that... Now it's also on NuGet, version 1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment