opengisch / qfieldsync

Sync your projects to QField
https://qfield.org/
GNU Lesser General Public License v3.0
55 stars 25 forks source link

Crash when packaging #598

Closed ronantaylorware closed 3 months ago

ronantaylorware commented 4 months ago

Describe the issue

Python Stack Trace Windows fatal exception: access violation

Current thread 0x00002eac (most recent call first): File "C:\Users/Ronan/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qfieldsync\gui\package_dialog.py", line 177 in package_project offline_convertor.convert()

Reproduction steps

I managed to get it to only throw an error by adding each layer i want to export one by one to a new project, and packaging them one by one until something didn't work. By doing this it threw an error (but didn't crash) in the python log only after i added a particular geopackage with some polylines.

2024-06-27T12:41:55 WARNING Traceback (most recent call last): File "C:\Users\Ronan\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\qfieldsync\libqfieldsync.whl\libqfieldsync\offline_converter.py", line 568, in _on_offline_editing_next_layer layer_name=self.__offline_layer_names[layer_index - 1]


             IndexError: list index out of range

That geodatabase had three lines within it, however i did not have them in a folder in the layer panel. When i put them into a folder in the layer panel and tried to package again, the error went away and everything packaged fine. (the geotiffs to be packaged were already copied into the qfield export with their Action set to Keep existent(copy if missing) set.

This fix didn't help with the original qgis project, it would still crash no matter if the polylines in question were in a folder, and even when they were the only layers set to Keep existent(copy if missing).

Cheers

### Desktop (please complete the following information)
QGIS version
3.38.0-Grenoble
QGIS code revision
37aa6188bc
Qt version
5.15.13
Python version
3.12.4
GDAL/OGR version
3.9.0
PROJ version
9.4.0
EPSG Registry database version
v11.004 (2024-02-24)
GEOS version
3.12.2-CAPI-1.18.2
SQLite version
3.45.1
PDAL version
2.6.3
PostgreSQL client version
16.2
SpatiaLite version
5.1.0
QWT version
6.2.0
QScintilla2 version
2.14.1
OS version
Windows 11 Version 2009

Active Python plugins
crayfish
3.6.0
pcraster_tools
0.3.0
processing_saga_nextgen
1.0.0
qfieldsync
v4.9.1
quick_map_services
0.19.34
SRTM-Downloader
3.2.2
valuetool
3.0.19
wbt_for_qgis
1.0.9
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.6
processing
2.12.99
suricactus commented 4 months ago

Can you please provide a sample project, so we can try to reproduce and fix the issue?

github-actions[bot] commented 3 months ago

The QFieldSync project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.