New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling a Processing algorithm by instance from plugin makes QGIS crash #51971
Comments
You need to set a provider for your algorithm, in this way:
However, this shouldn't crash. |
Ideally the provider shouldn't be mandatory -- I'll see if it's trivial to make it optional. |
@gacarrillor I replaced my code with yours but it still crashing, same type of crash. Were you able to make it work without crashing? |
@ghtmtt id does not crash in my Windows system, just adding
with
|
yeah, that's exactly what I did, but it is still crashing on my Linux. |
Maybe you need to remove the |
ohh correct, thanks! Now it is working. |
@nyalldawson, much better 👍 |
tested the master with the PR, works as expected. Love you guys :) |
What is the bug or the crash?
With a plugin with both standard interface and Processing Provider, if, from the interface a Processing algorithm is called with the
createAlgorithmDialog
method this happens:group:name
as first argument, it works niceBy reading the documentation of the
createAlgorithmDialog
method, it seems that we should be able to use both name or instance.I've prepared a plugin (can be installed directly with the zip) , created with the Plugin Builder, that you can use to test this behavior. crash.zip.
It does not have any real logic but the crash is happening. The Processing algorithm is the same as the
Script from template
. The crash is happening in thecrash_dialog.py
file, line 57, where the algorithm dialog is created using the instance of the algorithm. The commented lines from the 62 will do the same but with the algorithm name (working fine).Steps to reproduce the issue
Versions
From QGIS 3.22 to QGIS master
Supported QGIS version
New profile
Additional context
This is the StackTrace when clicking on OK that makes QGIS crash:
The text was updated successfully, but these errors were encountered: