qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.54k stars 2.99k forks source link

Forward transform fallback error #45073

Open kobusburger opened 3 years ago

kobusburger commented 3 years ago

What is the bug or the crash?

I get a "forward transform of (int, int) Error: Fallback transform failed" This happen even if I close and reopen QGIS.
image
The shapefile is also attached. multiline error.zip

Steps to reproduce the issue

I created 5 single lines on a multiline scratch layer and merged them. The error window appears every time I move the mouse or click on the canvas. The problem seems to start after I merged the single lines into a multiline. I later saved the layer as a shape file. The error persists even after removing the layer.

Versions

QGIS version | 3.20.2-Odense | QGIS code revision | 9f59a156 -- | -- | -- | -- Qt version | 5.15.2 Python version | 3.9.5 GDAL/OGR version | 3.3.1 PROJ version | 8.1.0 EPSG Registry database version | v10.027 (2021-06-17) GEOS version | 3.9.1-CAPI-1.14.2 SQLite version | 3.35.2 PDAL version | 2.3.0 PostgreSQL client version | 13.0 SpatiaLite version | 5.0.1 QWT version | 6.1.3 QScintilla2 version | 2.11.5 OS version | Windows 10 Version 1909   |   |   |   Active Python plugins | changeDataSourceGeometryShapeskmltoolslatlontoolslayer2kmznetworksprofiletoolQGISSortAndNumber-masterQRectangleCreatordb_managerMetaSearchprocessing

Supported QGIS version

New profile

Additional context

This is the first time I am using a multiline layer. I never noticed similar problems with other geometric types in the past.

gioman commented 3 years ago

I created 5 single lines on a multiline scratch layer and merged them. The error window appears every time I move the mouse or click on the canvas. The problem seems to start after I merged the single lines into a multiline. I later saved the layer as a shape file. The error persists even after removing the layer.

@kobusburger cannot replicate.

Active Python plugins changeDataSourceGeometryShapeskmltoolslatlontoolslayer2kmznetworksprofiletoolQGISSortAndNumber-masterQRectangleCreatordb_managerMetaSearchprocessing

have you really tested with a new QGIS profile and no 3rd party plugins installed?

kobusburger commented 3 years ago

I tried with a new profile with o plugins and restarted my laptop and got the same result.

gioman commented 3 years ago

@kobusburger then there is something else at play, bacause just adding the layer to a blank project is not enough to replicate.

agiudiceandrea commented 3 years ago

I can replicate the issue on Windows 10 with QGIS 3.20.3 and QGIS 3.16.11 (v1 and v2 OSGeo4W).

@kobusburger are you sure the layer has the correct CRS and the vertices of the line have the correct coordinates? The CRS set for the layer is a projected ESRI:102483 - Hartebeesthoek94_Lo21 CRS which is valid for South Africa, while the feature in the layer, based on its coordinates, is in DR Congo.

kobusburger commented 3 years ago

I did not give particular attention to the CRS and where I created the lines. It was a test but I feel that QGIS should not raise an exception even if the CRS is wrong or the geometries are in the wrong place.

agiudiceandrea commented 3 years ago

Some other details:

The exception error "forward transform of (int, int) Error: Fallback transform failed" doesn't occur with QGIS 3.10.14 (OSGeo4W v1, PROJ 6.3.2) so it is possible to pan the map without issue.

Anyway the error "WARNING Transform error caught: Could not transform bounding box to target CRS" is logged in the CRS Log Messages panel and the layer feature geometry is not yet visible in the map changing the map CRS to say 4326.

rduivenvoorde commented 10 months ago

Not sure if this should/could be fixed, but I can reproduce this with some lines from a plugin I created. In short: it loads an online WMTS layer, and immidiatly after that I try to trigger the 'zoom to native/100% scale'. It looks like triggering this BEFORE the layer apparently is loaded will trigger this issue. Note that I can easily reproduce this in a plugin, but the code below does not show the popup but just freeze my QGIS.

uri = 'tileMatrixSet=EPSG:28992&crs=EPSG:28992&layers=Actueel_orthoHR&styles=default&format=image/jpeg&url=https://service.pdok.nl//hwh/luchtfotorgb/wmts/v1_0?request%3DGetCapabilities%26service%3DWMTS'
layer = QgsRasterLayer(uri, "title", "wms")
QgsProject.instance().addMapLayer(layer, True)
iface.setActiveLayer(layer)
iface.actionZoomActualSize().trigger()

If helpful, the plugin creates the following stacktrace:

/home/richard/bin/qgis_/master/debug/bin/qgis(+0xe8b7)[0x560aa2da18b7]
/lib/x86_64-linux-gnu/libQt5Core.so.5(+0xc3b50)[0x7f14d40c3b50]
/lib/x86_64-linux-gnu/libQt5Core.so.5(qt_message_output(QtMsgType, QMessageLogContext const&, QString const&)+0xd)[0x7f14d40c50fd]
/lib/x86_64-linux-gnu/libQt5Core.so.5(QDebug::~QDebug()+0x68)[0x7f14d41c6fa8]
/home/richard/bin/qgis_/master/debug/lib/libqgis_core.so.3.35.0(QgsApplication::notify(QObject*, QEvent*)+0x186)[0x7f14d187b60e]
/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplication::notifyInternal2(QObject*, QEvent*)+0x118)[0x7f14d42b16f8]
/lib/x86_64-linux-gnu/libQt5Widgets.so.5(QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool)+0x1be)[0x7f14d4f6965e]
/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1bdbd8)[0x7f14d4fbdbd8]
/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1c0f60)[0x7f14d4fc0f60]
/lib/x86_64-linux-gnu/libQt5Widgets.so.5(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0x7e)[0x7f14d4f62fae]
/home/richard/bin/qgis_/master/debug/lib/libqgis_core.so.3.35.0(QgsApplication::notify(QObject*, QEvent*)+0xb3)[0x7f14d187b53b]
/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplication::notifyInternal2(QObject*, QEvent*)+0x118)[0x7f14d42b16f8]
/lib/x86_64-linux-gnu/libQt5Gui.so.5(QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)+0x80d)[0x7f14d473d3ed]
/lib/x86_64-linux-gnu/libQt5Gui.so.5(QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0xac)[0x7f14d4711cac]
/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5(+0x6deca)[0x7f143c2fbeca]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x299)[0x7f14c7b1e7a9]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x54a38)[0x7f14c7b1ea38]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7f14c7b1eacc]
/lib/x86_64-linux-gnu/libQt5Core.so.5(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x66)[0x7f14d4309836]
XXX lineno: 66, opcode: 151
XXX lineno: 185, opcode: 116
QGIS died on signal 11[New LWP 54830]
[New LWP 54831]
[New LWP 54832]
[New LWP 54833]
[New LWP 54851]
[New LWP 54852]
[New LWP 54853]
[New LWP 54854]
[New LWP 54855]
[New LWP 54856]
[New LWP 54860]
[New LWP 54862]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f14d04f2a57 in __GI___wait4 (pid=54990, stat_loc=0x560aa6706c54, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
30  ../sysdeps/unix/sysv/linux/wait4.c: No such file or directory.
[Current thread is 1 (Thread 0x7f14bc0cc100 (LWP 54814))]
#0  0x00007f14d04f2a57 in __GI___wait4 (pid=54990, stat_loc=0x560aa6706c54, options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
        sc_ret = -512
        sc_cancel_oldtype = 0
#1  0x0000560aa2da15f4 in qgisCrash(int) (signal=11) at /home/richard/git/qgis/src/app/main.cpp:350
        status = 0
        pidstr = "--pid=54814\000\023\177\000\000\001", '\000' <repeats 14 times>
        gdbpid = 54990
        exename = "/home/richard/bin/qgis_/master/debug/bin/qgis\000\000\000%\000\000\0006\000\000\000%\000\000\000C\000\000\000\025\000\000\000\000\000\000\0000jp\246\nV\000\000p\277 \300\023\177\000\000\001\000\000\000\023\177\000\000%\000\000\0001\000\000\000%\000\000\000C\000\000\000b\004", '\000' <repeats 14 times>, "\005", '\000' <repeats 15 times>, "c\004", '\000' <repeats 14 times>, "\005\000\000\000\000\000\000\000\300jp\246\nV\000\000d\004", '\000' <repeats 14 times>, "\005\000\000\000\000\000\000\000"...
        len = 45
#2  0x00007f14d045afd0 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007f13a62cc7a4 in  () at /lib/x86_64-linux-gnu/libpython3.11.so.1.0
#4  0x00007f13a62cca43 in _Py_DumpTracebackThreads () at /lib/x86_64-linux-gnu/libpython3.11.so.1.0
#5  0x00007f13a634675d in  () at /lib/x86_64-linux-gnu/libpython3.11.so.1.0
#6  0x00007f14d045afd0 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#7  0x00007f13a6289c23 in  () at /lib/x86_64-linux-gnu/libpython3.11.so.1.0
#8  0x00007f13a626aac6 in  () at /lib/x86_64-linux-gnu/libpython3.11.so.1.0
#9  0x00007f13a617d6a5 in _PyObject_FastCall () at /lib/x86_64-linux-gnu/libpython3.11.so.1.0
#10 0x00007f13a62b6eb3 in  () at /lib/x86_64-linux-gnu/libpython3.11.so.1.0
#11 0x00007f13a5e1c303 in  () at /usr/lib/python3/dist-packages/PyQt5/QtCore.abi3.so
#12 0x00007f13a5e223a5 in  () at /usr/lib/python3/dist-packages/PyQt5/QtCore.abi3.so
#13 0x00007f13a5e22faf in  () at /usr/lib/python3/dist-packages/PyQt5/QtCore.abi3.so
#14 0x00007f14d42e8cba in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007f14d0ef87e5 in QgsProject::cleared() (this=0x560aa452f2f0) at /home/richard/git/qgis/build/src/core/qgis_core_autogen/QV7S676PVK/moc_qgsproject.cpp:1075
#16 0x00007f14d1f0bb9b in QgsProject::clear() (this=0x560aa452f2f0) at /home/richard/git/qgis/src/core/project/qgsproject.cpp:1132
        __PRETTY_FUNCTION__ = "void QgsProject::clear()"
        __FUNCTION__ = "clear"
        snapSingleBlocker = {mVariable = 0x0}
        context = {d = {d = 0x560aa9f45190}}
        ok = false
        distanceUnit = Qgis::DistanceUnit::Unknown
        areaUnits = Qgis::AreaUnit::Unknown
        defaultRelativePaths = true
        red = 255
        green = 255
        blue = 0
        alpha = 255
#17 0x00007f14d7c7e634 in QgisApp::closeProject() (this=0x560aa42e2f40) at /home/richard/git/qgis/src/app/qgisapp.cpp:13801
        refreshBlocker = {mReleased = false}
        elevationProfileWidgets = {<QListSpecialMethods<QgsElevationProfileWidget*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = std::atomic<int> = { -1 }}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7f14d4398630 <QListData::shared_null>}, d = 0x7f14d4398630 <QListData::shared_null>}}
#18 0x00007f14d7c3ea73 in QgisApp::fileExit() (this=0x560aa42e2f40) at /home/richard/git/qgis/src/app/qgisapp.cpp:5787
        refreshBlocker = {mReleased = false}
#19 0x00007f14d7c7e770 in QgisApp::closeEvent(QCloseEvent*) (this=0x560aa42e2f40, event=0x7fffe64e0fa0) at /home/richard/git/qgis/src/app/qgisapp.cpp:13841
#20 0x00007f14d4fa4db8 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f14d7c1144b in QgisApp::event(QEvent*) (this=0x560aa42e2f40, event=0x7fffe64e0fa0) at /home/richard/git/qgis/src/app/qgisapp.cpp:2638
        done = false
#22 0x00007f14d4f62fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f14d187b53b in QgsApplication::notify(QObject*, QEvent*) (this=0x7fffe64e1f10, receiver=0x560aa42e2f40, event=0x7fffe64e0fa0) at /home/richard/git/qgis/src/core/qgsapplication.cpp:601
        done = true
        __PRETTY_FUNCTION__ = "virtual bool QgsApplication::notify(QObject*, QEvent*)"
#24 0x00007f14d42b16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007f14d4fa0425 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007f14d4fc11f5 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007f14d4f62fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007f14d187b53b in QgsApplication::notify(QObject*, QEvent*) (this=0x7fffe64e1f10, receiver=0x560aa9ccffd0, event=0x7fffe64e1230) at /home/richard/git/qgis/src/core/qgsapplication.cpp:601
        done = true
        __PRETTY_FUNCTION__ = "virtual bool QgsApplication::notify(QObject*, QEvent*)"
#29 0x00007f14d42b16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007f14d4739d5d in QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#31 0x00007f14d4711cac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#32 0x00007f143c2fbeca in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#33 0x00007f14c7b1e7a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007f14c7b1ea38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007f14c7b1eacc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007f14d4309836 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x00007f14d42b017b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007f14d42b82d6 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x0000560aa2daa070 in main(int, char**) (argc=3, argv=0x7fffe64e33d8) at /home/richard/git/qgis/src/app/main.cpp:1822
        preApplicationLogMessages = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = std::atomic<int> = { -1 }}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x560aa3e6ea00}, d = 0x560aa3e6ea00}}, <No data fields>}
        preApplicationWarningMessages = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = std::atomic<int> = { -1 }}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7f14d4398630 <QListData::shared_null>}, d = 0x7f14d4398630 <QListData::shared_null>}}, <No data fields>}
        rescLimit = {rlim_cur = 4096, rlim_max = 1048576}
        __FUNCTION__ = "main"
        mySnapshotFileName = {d = 0x7f14d4397b20 <QArrayData::shared_null>}
        configLocalStorageLocation = {d = 0x560aa3e72ca0}
        profileName = {d = 0x560aa402c730}
        mySnapshotWidth = 800
        mySnapshotHeight = 600
        myHideSplash = false
        settingsMigrationForce = false
        mySkipVersionCheck = false
        hideBrowser = false
        myRestoreDefaultWindowState = false
        myRestorePlugins = true
        mySkipBadLayers = false
        myCustomization = true
        dxfOutputFile = {d = 0x7f14d4397b20 <QArrayData::shared_null>}
        dxfSymbologyMode = Qgis::FeatureSymbologyExport::PerSymbolLayer
        dxfScale = 50000
        dxfEncoding = {d = 0x560aa2db6060 <main::{lambda()#4}::operator()() const::qstring_literal>}
        dxfMapTheme = {d = 0x7f14d4397b20 <QArrayData::shared_null>}
        dxfExtent = {mXmin = 1.7976931348623157e+308, mYmin = 1.7976931348623157e+308, mXmax = -1.7976931348623157e+308, mYmax = -1.7976931348623157e+308}
        takeScreenShots = false
        screenShotsPath = {d = 0x7f14d4397b20 <QArrayData::shared_null>}
        screenShotsCategories = 0
        myInitialExtent = {d = 0x7f14d4397b20 <QArrayData::shared_null>}
        translationCode = {d = 0x560aa3ff1470}
        authdbdirectory = {d = 0x7f14d4397b20 <QArrayData::shared_null>}
        pythonfile = {d = 0x7f14d4397b20 <QArrayData::shared_null>}
        pythonArgs = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = std::atomic<int> = { -1 }}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7f14d4398630 <QListData::shared_null>}, d = 0x7f14d4398630 <QListData::shared_null>}}, <No data fields>}
        customizationfile = {d = 0x560aa418ba20}
        globalsettingsfile = {d = 0x560aa3e6fc00}
        openClProgramFolder = {d = 0x7f14d4397b20 <QArrayData::shared_null>}
        args = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = std::atomic<int> = { -1 }}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x560aa3e710b0}, d = 0x560aa3e710b0}}, <No data fields>}
        myUseGuiFlag = true
        myApp = {<QApplication> = {<No data fields>}, static staticMetaObject = {d = {superdata = {direct = 0x7f14d5477f60 <QApplication::staticMetaObject>}, stringdata = 0x7f14d266da40 <qt_meta_stringdata_QgsApplication>, data = 0x7f14d266dc60 <qt_meta_data_QgsApplication>, static_metacall = 0x7f14d0efe936 <QgsApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, mIconCache = {d = 0x560aa4013d70}, mCursorCache = {d = 0x560aa53b0040}, mQgisTranslator = 0x560aa4011ed0, mQtTranslator = 0x560aa4011eb0, mQtBaseTranslator = 0x560aa3eaaba0, mDataItemProviderRegistry = 0x560aa464ac00, mAuthManager = 0x560aa4d70690, mApplicationMembers = 0x560aa3f73200}
        rootProfileFolder = {d = 0x560aa3fe7840}
        manager = {<QObject> = {<No data fields>}, static staticMetaObject = {d = {superdata = {direct = 0x7f14d4543140 <QObject::staticMetaObject>}, stringdata = 0x7f14d267b200 <qt_meta_stringdata_QgsUserProfileManager>, data = 0x7f14d267b280 <qt_meta_data_QgsUserProfileManager>, static_metacall = 0x7f14d0f11490 <QgsUserProfileManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, mWatchProfiles = false, mWatcher = std::unique_ptr<class QFileSystemWatcher> = {get() = 0x0}, mRootProfilePath = {d = 0x560aa3fe7840}, mUserProfile = std::unique_ptr<class QgsUserProfile> = {get() = 0x0}, mSettings = std::unique_ptr<class QSettings> = {get() = 0x560aa4011ef0}}
        missingLastProfile = {d = 0x7f14d4397b20 <QArrayData::shared_null>}
        profile = 0x560aa3fc4af0
        profileFolder = {d = 0x560aa3fea910}
        settings = {<QObject> = {<No data fields>}, static staticMetaObject = {d = {superdata = {direct = 0x7f14d4543140 <QObject::staticMetaObject>}, stringdata = 0x7f14d267d320 <qt_meta_stringdata_QgsSettings>, data = 0x7f14d267d360 <qt_meta_data_QgsSettings>, static_metacall = 0x7f14d0f1466e <QgsSettings::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, mUserSettings = 0x560aa42df4f0, mGlobalSettings = 0x560aa43a9ea0, mUsingGlobalArray = false}
        libPaths = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = std::atomic<int> = { -1 }}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x560aa42b5310}, d = 0x560aa42b5310}}, <No data fields>}
        relLibPath = {d = 0x560aa482a550}
        customizationsettings = 0x560aa41a3cd0
        systemEnvVars = {d = 0x560aa419c3d0}
        useCustomVars = false
        desiredStyle = {d = 0x560aa2db6d60 <main::{lambda()#40}::operator()() const::qstring_literal>}
        theme = {d = 0x7f14d4397b20 <QArrayData::shared_null>}
        activeStyleName = {d = 0x560aa428d7c0}
        splashPath = {d = 0x7f14d28a24a0 <QgsApplication::splashPath()::{lambda()#1}::operator()() const::qstring_literal>}
        pixmap = <incomplete type>
        w = 600
        h = 300
        mypSplash = 0x560aa403aa80
        qgis = 0x560aa42e2f40
        sigwatch = {<QObject> = {<No data fields>}, static staticMetaObject = {d = {superdata = {direct = 0x7f14d4543140 <QObject::staticMetaObject>}, stringdata = 0x560aa2df79c0 <qt_meta_stringdata_UnixSignalWatcher>, data = 0x560aa2df7a80 <qt_meta_data_UnixSignalWatcher>, static_metacall = 0x560aa2db2258 <UnixSignalWatcher::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = 0x7f142400e890}
        retval = 0
[Inferior 1 (process 54814) detached]
gdb returned 0
lorenzogrv commented 1 month ago

Hello,

Today I got an error while testing a qgis-server implementation (last LTR) which as far as I understand is the same described here.

I was able to narrow the problem to a specific layer of the project which I was working with.

The problem arises because the layer source has NULL extent even when it has correct CRS/SRC. This can be inspected through QGIS desktop's "Layer properties" dialog.

screenshot-null

In our case, the layer is a postgresql view with no features neither db-saved metadata, so there isn't an extent.

Our error trigger was the WFS3/OAPIF describeFeatures endpoint, which I suppose tries to calculate that extent and transform it to 4326, which is bassically not possible.

Accessing the OAPIF getCollectionItems does work indeed - again supposing here - because as there aren't features no transforms are needed to complete the request.

Server verbose log ```plain 16:03:41 INFO Server[25]: MAP:postgresql://?service=example&schema=public&project=example 16:03:41 INFO Server[25]: Trying URL path: '/qgis-server/wfs3/collections' for '/wfs3' 16:03:41 INFO Server[25]: API OGC WFS3 (Draft) accepts the URL path '/qgis-server/wfs3/collections' 16:03:41 INFO Server[25]: Checking API path /collections for /collections/(?[^/]+)/items(\.geojson|\.json|\.html|/)?$ 16:03:41 INFO Server[25]: Checking API path /collections for /collections/(?[^/]+)/items/(?[^/]+?)(\.json|\.geojson|\.html|/)?$ 16:03:41 INFO Server[25]: Checking API path /collections for /collections(\.json|\.html|/)?$ 16:03:41 INFO Server[25]: API OGC WFS3 (Draft): found handler describeCollections 16:03:41 CRITICAL Server[25]: forward transform of (inf, inf) Error: Fallback transform failed 16:03:41 WARNING [25]: finish() called twice 16:03:41 INFO Server[25]: Request finished in 8 ms ```
QGIS version information ```plain QGIS Version Information: QGIS 3.34.11-Prizren 'Prizren' (exported) QGIS code branchRelease 3.34 Qt version 5.15.13 Python version 3.12.6 GDAL/OGR version 3.9.2 Compiled against PROJ 9.4.1 Running against PROJ 9.5.0 EPSG Registry database version v11.016 (2024-08-31) GEOS version 3.13.0-CAPI-1.19.0 SQLite version 3.46.1 OS Debian GNU/Linux trixie/sid ```