Segmentation fault with embedded python framework
(1) By SylvainPer on 2020-10-09 15:52:39 [link] [source]
Hello, I'm using a C program (domoticz) with embedded python plugins. This program uses SQLite-Amalgamation for its own purposes, a database with the devices, options... In a python plugin, we need to use SQLite to allow the plugin to have its own database. The plugin causes a segmentation fault on some request. The creation is going well but it seems that some PRAGMA request are not managed correctly.
By using a debugger, we saw that the following code order is causing the problem: domoticz (CPlugin) > Python (libpython3.7) > pysqlite > libsqlite3.so > sqlite3.c (from sqlite-amalgamation):
It seems that there is a mix between the 2 SQLite libraries and have different version. Do you know what can cause this problem and what can we do ?