The .Increment() function may return an error (the exact value depends on the language you use). Without API documentation, to explain what might cause certain crashes, about everything you can do, drop your stack and continue with a trial and search error.
spinLock
source share