Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#759 closed defect (fixed)

qgis-dev 3.27.0-Master crashes during startup in some circumstances

Reported by: andreaerdna Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords:
Cc:

Description (last modified by jef)

QGIS 3.27.0-Master (qgis-dev-3.27.0-286-fc5faa84bf-1) crashes on startup (during "Setting up the GUI"), when launched from the shortcut link "QGIS Desktop 3.27.0 (Nightly)" in the start menu, if there is a file or a folder with the name containing non-ASCII characters (like e.g. è, é, æ, ø, å, ...) in the user "Documents" directory.

Note that the QGIS shortcut links in the start menu contain the user "Documents" folder path in the "Start in" property.

QGIS 3.26.1 and QGIS 3.22.9 in the same OSGeo4W installation don't suffer from such issue.

See https://github.com/qgis/QGIS/issues/49507 (and probably also https://github.com/qgis/QGIS/issues/49546).

Change History (4)

comment:1 by jef, 21 months ago

Resolution: fixed
Status: newclosed

Probably introduced by QGIS #49128. Which crashes calling pdal::PluginManager<pdal::Stage>::loadAll() with

Unhandled exception at 0x00007FFEA24A4FD9 in qgis-dev-bin.exe: Microsoft C++ exception: std::range_error at memory location 0x000000C6588F5670.

originating from PDAL's FileUtils.cpp:89 as the string is apparently in local 8-bit encoding (ie. CP1252 here) and not UTF-8.

Looks like that upstream PDAL issue was fixed in 2.4 by PDAL #3764. As updating PDAL to 2.4 would require rebuilding all QGIS versions PDAL #3764 was backported to 2.3 for the time being (ie. next QGIS point release)

Fixed in 8f79e2fdeb4

comment:2 by andreaerdna, 21 months ago

Confirmed fixed updating installed pdal* packages to version 2.3-8.

comment:3 by jef, 21 months ago

Description: modified (diff)

comment:4 by andreaerdna, 21 months ago

While this issue is fixed now, it seems to me this raises a question: is it safe that the pdal library, via qgis-bin.exe, searches for libpdal_plugin_* dlls in the user "Home" folder and in the user "Documents" folder?

It initially searches in ".", "./lib", "../lib", "./bin", "../bin", which translate (checked with Process Monitor) as "C:\Users\[username]\Documents", "C:\Users\[username]\lib", "C:\Users\[username]\Documents\lib", "C:\Users\[username]\bin", "C:\Users\[username]\Documents\bin", as the working directory is set to "C:\Users\[username]\Documents" in the "Start in" property of the QGIS Desktop shortcut link.

See: https://github.com/PDAL/PDAL/blob/8fd5de18668370b548032f907472f51974438edc/pdal/PluginDirectory.cpp#L46-L68.

Maybe setting the PDAL_DRIVER_PATH environment variable to the correct folder in the starting procedure, or setting the "Start in" property of the QGIS Desktop shortcut link to the OSGeo4W installation directory, will prevent this behaviour?

Note: See TracTickets for help on using tickets.