namecoin-qt/namecoin-qt — pull request #5 by maxpwr (2013-06-29 18:40:19+00:00)
Title: Workaround for exit crash

This patch works around a crash on exit that happens on Mac (and according to one forum user, on Linux). The crash occurs when something in the code calls LockedPageManager::instance.UnlockRange after the instance has been deleted. I haven't had a chance to figure out why this is happening yet, although I suspect it has to do with destructors being called in a different order than the code assumes.

The crash is actually an unhandled lock_exception thrown by Boost when UnlockRange tries to lock a deleted mutex. It seems harmless, since it happens after the databases are closed, so no data is lost. Maybe the workaround is enough for now.