You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing a Qgis plugin and Qgis 3.0.3 Crashes sometimes.
I know the source of the problem is QSqlTableModel, I am thinking that perhaps, is a matter of time… when I leave the plugin without any action for some minutes, perhaps the database connection is closed or something like that, and then, when I try to show the tableView again, it internally calls the broken connection(it is a presumption).
QGIS Info
QGIS Version: 3.0.3-Girona
QGIS code revision: 8a899c8
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4
System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17134
The text was updated successfully, but these errors were encountered:
I finaly found that QGis crashed because I was using a:
QSqlDatabase->QSqlTableModel->QTableView schema
And the order to reinit this keeping the original QTableView, is very important.
The solution was to do it in order:
So that the model QTableView-> QSqlTableModel doesn’t try to access a populated model, and a closed databases
if self.db!=None:
self.model.revertAll()
self.model.clear()
self.db.close()
Author Name: Alfredo GarciaWoods (Alfredo GarciaWoods)
Original Redmine Issue: 19184
Affected QGIS version: 3.0.3
Redmine category:python_plugins
I am developing a Qgis plugin and Qgis 3.0.3 Crashes sometimes.
I know the source of the problem is QSqlTableModel, I am thinking that perhaps, is a matter of time… when I leave the plugin without any action for some minutes, perhaps the database connection is closed or something like that, and then, when I try to show the tableView again, it internally calls the broken connection(it is a presumption).
Stack Trace
QGIS Info
QGIS Version: 3.0.3-Girona
QGIS code revision: 8a899c8
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4
System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17134
The text was updated successfully, but these errors were encountered: