On Tue, Sep 17, 2019 at 04:40:57PM +0200, Matthias Kuhn wrote:
> 
> Let's assume it would have actually been identified that it's a provider
> which caused the crash (which already is a question in itself). What would
> be the next step? Wouldn't it be easier to ask him to move the dlls one by
> one to another place to check if and which provider is responsible?
> 
> I won't block any work on a --noproviders parameter, I just wonder if it's
> really worth the effort.

Effort seems low, using existing support for env variable.
The resulting QGIS is indeed pretty broken, and full of paths to other segfaults
(may be a good journey to take, fixing those ones).

PS: _static_ plugins would still be available...


---8<------------------------------------------------------------

diff --git a/src/app/main.cpp b/src/app/main.cpp
index 8a5465e3c8..c449424016 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -144,6 +144,7 @@ void usage( const QString &appName )
       << QStringLiteral( "\t[--nologo]\thide splash screen\n" )
       << QStringLiteral( "\t[--noversioncheck]\tdon't check for new version of 
QGIS at startup\n" )
       << QStringLiteral( "\t[--noplugins]\tdon't restore plugins on startup\n" 
)
+      << QStringLiteral( "\t[--nodynamicproviders]\tdon't load dynamic 
providers on startup\n" )
       << QStringLiteral( "\t[--nocustomization]\tdon't apply GUI 
customization\n" )
       << QStringLiteral( "\t[--customizationfile path]\tuse the given ini file 
as GUI customization\n" )
       << QStringLiteral( "\t[--globalsettingsfile path]\tuse the given ini 
file as Global Settings (defaults)\n" )
@@ -649,6 +650,10 @@ int main( int argc, char *argv[] )
         {
           myRestorePlugins = false;
         }
+        else if ( arg == QLatin1String( "--nodynamicproviders" ) )
+        {
+          setenv( "QGIS_PROVIDER_FILE", "hardly-matching-any-name", 1);
+        }
         else if ( arg == QLatin1String( "--nocustomization" ) || arg == 
QLatin1String( "-C" ) )
         {
           myCustomization = false;

---8<------------------------------------------------------------
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to