Bug report #18807

Enabling/disabling algorithm providers as well as creating/removing preconfigured algorithms causes an infinite loop (regression after c83261395476b62f6)

Added by Borys Jurgiel almost 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:High
Assignee:René-Luc ReLuc
Category:Processing/Core
Affected QGIS version:2.18.19 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:26693

Description

Since c83261395476b62f6, adding or removing preconfigured algorithms leads to a loop that causes an exception:

Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\gui\ProcessingToolbox.py", line 163, in updateProvider
    item.refresh()
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\gui\ProcessingToolbox.py", line 377, in refresh
    Processing.updateAlgsList()
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\core\Processing.py", line 184, in updateAlgsList
    Processing.reloadProvider(p.getName())
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\core\Processing.py", line 189, in reloadProvider
    algList.reloadProvider(providerName)
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\core\alglist.py", line 55, in reloadProvider
    p.loadAlgorithms()
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\core\AlgorithmProvider.py", line 56, in loadAlgorithms
    self._loadAlgorithms()
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\modeler\ModelerOnlyAlgorithmProvider.py", line 53, in _loadAlgorithms
    self.algs = [CalculatorModelerAlgorithm(),
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\core\GeoAlgorithm.py", line 88, in __init__
    self.defineCharacteristics()
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing\modeler\CalculatorModelerAlgorithm.py", line 54, in defineCharacteristics
    self.tr('Formula', 'CalculatorModelerAlgorithm'), ''))
RuntimeError: maximum recursion depth exceeded

What worse, this exception is recurrent, making QGIS unusable until it's killed.

Associated revisions

Revision d8e39fa9
Added by Jürgen Fischer almost 6 years ago

remove algorithm refresh after processing configuration changes (was a NOOP before c83261395 and now causes an endless recursion; fixes #18807)

History

#1 Updated by Borys Jurgiel almost 6 years ago

  • Description updated (diff)

#2 Updated by Borys Jurgiel almost 6 years ago

It happens when the algorithm list is refreshed after adding or removing a preconfigred algorithm (and probably any other item).

#3 Updated by Borys Jurgiel almost 6 years ago

The same after enabling or disabling algorithm providers in the Processing options dialog.

#4 Updated by Borys Jurgiel almost 6 years ago

  • Subject changed from Creating/removing preconfigured algorithms causes an infinite loop (regression after c83261395476b62f6) to Enabling/disabling algorithm providers as well as creating/removing preconfigured algorithms causes an infinite loop (regression after c83261395476b62f6)

#5 Updated by Jürgen Fischer almost 6 years ago

  • Description updated (diff)

#6 Updated by Jürgen Fischer almost 6 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

#7 Updated by Giovanni Manghi almost 6 years ago

  • Resolution set to fixed/implemented

#8 Updated by Nino Formica almost 6 years ago

I checked on QGIS. 2.18.19 (revision 3a17f72ba5): problem is still there.
Maybe it will be solved in the next 2.18.20 ?

#9 Updated by Borys Jurgiel almost 6 years ago

Exactly. The only affected version is 2.18.19, and it's fixed in 2.18.20 (to be released tomorrow)

Also available in: Atom PDF