The sample code is as below:
|int||iDBFlags = DB_CREATE;|
|Db * m_pPrimaryDB, *m_pBlobDB, *m_pLastAccessDB;|
|//m_pDBEnv = new DbEnv(DB_CXX_NO_EXCEPTIONS);|
|//m_pDBEnv->open(".", DB_CREATE+DB_INIT_CDB+DB_INIT_MPOOL+DB_THREAD+DB_USE_ENVIRON, NULL);|
|iDBFlags |= DB_THREAD;|
|m_pPrimaryDB||= new Db( NULL, DB_CXX_NO_EXCEPTIONS );|
|/////////////// Primary DB ////////////|
I can not reproduce the issue you mentioned on our Win2008 R2 machine, using the sample code, on db-6.0.19.
The sample code also needs a very small change to make it compile, so have you tested your sample code on the machine to see whether it compiles and works ?
If the sample code works, can you check your application to provide an exact case to reproduce the issue ?
Of caurse I have test this sample code. And I find it can be complied but when it runs in line "delete m_pPrimaryDB;", it has exception. And how do you get db-6.0.19? If you use the release version, I am sure it can reproduce this issue. But if you rebuild the db-6.0.19 source code, I am not sure you can reproduce it. For it has a precondition: The build configuraton on both db-6.0.19 project and sample code project should be different, then this issue can also be reproduced. For example, if the db-6.0.19 project is built by Debug mode and sample code project also is built by Debug mode, then this issue cannot be reproduced. So as Release mode. But if the db-6.0.19 project is built by Release mode and sample code project also is built by Debug mode, then this issue can be reproduced.