Hello, we are currently facing problem with Access violation exception caused by function sqlite3_open_v2 trying to load extensions from unloaded DLLs.
How it happens: - There are 2 (or more) plugin DLLs in main application which are linked to SQLite. - These plugins can be loaded and uloaded by user. - Main application itself does not use SQLite, so each plugin using SQLite must be linked to it. - When any plugin is loaded, it registers its entry point using interface sqlite3_auto_extension. - So when 2 (or more) plugins are loaded, each registers its entry point(s) to the same SQLite module instance. - When one of these plugins is going to be unloaded by user, it can not use sqlite3_reset_auto_extension, because that would uninstall also all entry points of another plugins. So it happens, that SQlite holds entry point(s) to DLL which is unloaded. - Now, if user executes any command from remaining DLL, it invokes sqlite3_open_v2, SQLite invokes all registered entry points including those pointing to released memory, so system raises Access Viloation exception. Possible solution of this issue would be a way to 'uninstall' entry point. something like: int sqlite3_remove_auto_extension(void (*xEntryPoint)(void)); Also it would be fine to be able to load static extensions to separate connections: something like: int sqlite3_load_static_extension(sqlite3 *db, void (*xEntryPoint)(void)); If you would need any additional information about issue, please contact me at: paulo...@gisoft.cz Additional info: SQLite Version: 3.7.14.1, Source ID: 2012-10-04 19:37:12 091570e46d04e84b67228e0bdbcd6e1fb60c6bdb Perhaps irrelevant in this case: OS: Windows Vista Main Application: Bentley MicroStation V8i Plugins: MDL (MicroStation Development Library) Regards, Dusan Paulovic _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users