https://bugs.kde.org/show_bug.cgi?id=441838

            Bug ID: 441838
           Summary: Ten Brushes crashes: wrapped C/C++ object of type
                    QWidgetAction has been deleted
           Product: krita
           Version: 5.0.0-beta1
          Platform: Compiled Sources
                OS: All
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Scripting
          Assignee: krita-bugs-n...@kde.org
          Reporter: rainco...@gmail.com
  Target Milestone: ---

SUMMARY
Ten Brushes script crashes itself

STEPS TO REPRODUCE
1. Tools -> Scripts -> Ten Brushes

OBSERVED RESULT
The script (not the whole Krita) crashes with the following log:

----
RuntimeError
Python 3.8.1: C:\Program Files\Krita (x64)\bin\krita.exe
Wed Sep  1 09:06:55 2021

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 C:\Program Files\Krita (x64)\share\krita\pykrita\tenscripts\tenscripts.py in
initialize(self=<tenscripts.tenscripts.TenScriptsExtension object>)
   31     def initialize(self):
   32         self.uitenscripts = uitenscripts.UITenScripts()
   33         self.uitenscripts.initialize(self)
   34 
   35     def readSettings(self):
self = <tenscripts.tenscripts.TenScriptsExtension object>
self.uitenscripts = <tenscripts.uitenscripts.UITenScripts object>
self.uitenscripts.initialize = <bound method UITenScripts.initialize of
<tenscripts.uitenscripts.UITenScripts object>>

 C:\Program Files\Krita (x64)\share\krita\pykrita\tenscripts\uitenscripts.py in
initialize(self=<tenscripts.uitenscripts.UITenScripts object>,
tenscripts=<tenscripts.tenscripts.TenScriptsExtension object>)
   35         self.tenscripts = tenscripts
   36 
   37         self._loadGridLayout()
   38         self._fillScripts()
   39 
self = <tenscripts.uitenscripts.UITenScripts object>
self._loadGridLayout = <bound method UITenScripts._loadGridLayout of
<tenscripts.uitenscripts.UITenScripts object>>

 C:\Program Files\Krita (x64)\share\krita\pykrita\tenscripts\uitenscripts.py in
_loadGridLayout(self=<tenscripts.uitenscripts.UITenScripts object>)
   97     def _loadGridLayout(self):
   98         for item in range(0, 10):
   99             self.addNewRow(item)
  100 
  101     def _fillScripts(self):
self = <tenscripts.uitenscripts.UITenScripts object>
self.addNewRow = <bound method UITenScripts.addNewRow of
<tenscripts.uitenscripts.UITenScripts object>>
item = 0

 C:\Program Files\Krita (x64)\share\krita\pykrita\tenscripts\uitenscripts.py in
addNewRow(self=<tenscripts.uitenscripts.UITenScripts object>, key=0)
   60 
   61         directoryTextField.setReadOnly(True)
   62        
label.setText(self.tenscripts.actions[key].shortcut().toString(QKeySequence.NativeText))
   63         directoryTextField.setToolTip(i18n("Selected path"))
   64         directoryDialogButton.setToolTip(i18n("Select the script"))
label = <PyQt5.QtWidgets.QLabel object>
label.setText = <built-in method setText of QLabel object>
self = <tenscripts.uitenscripts.UITenScripts object>
self.tenscripts = <tenscripts.tenscripts.TenScriptsExtension object>
self.tenscripts.actions = [<PyQt5.QtWidgets.QWidgetAction object>,
<PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>,
<PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>,
<PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>,
<PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>,
<PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>,
<PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>,
<PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>,
<PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>,
<PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>,
<PyQt5.QtWidgets.QWidgetAction object>, ...]
key = 0
].shortcut undefined
global QKeySequence = <class 'PyQt5.QtGui.QKeySequence'>
QKeySequence.NativeText = 0
RuntimeError: wrapped C/C++ object of type QWidgetAction has been deleted
    __cause__ = None
    __class__ = <class 'RuntimeError'>
    __context__ = None
    __delattr__ = <method-wrapper '__delattr__' of RuntimeError object>
    __dict__ = {}
    __dir__ = <built-in method __dir__ of RuntimeError object>
    __doc__ = 'Unspecified run-time error.'
    __eq__ = <method-wrapper '__eq__' of RuntimeError object>
    __format__ = <built-in method __format__ of RuntimeError object>
    __ge__ = <method-wrapper '__ge__' of RuntimeError object>
    __getattribute__ = <method-wrapper '__getattribute__' of RuntimeError
object>
    __gt__ = <method-wrapper '__gt__' of RuntimeError object>
    __hash__ = <method-wrapper '__hash__' of RuntimeError object>
    __init__ = <method-wrapper '__init__' of RuntimeError object>
    __init_subclass__ = <built-in method __init_subclass__ of type object>
    __le__ = <method-wrapper '__le__' of RuntimeError object>
    __lt__ = <method-wrapper '__lt__' of RuntimeError object>
    __ne__ = <method-wrapper '__ne__' of RuntimeError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of RuntimeError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of RuntimeError object>
    __repr__ = <method-wrapper '__repr__' of RuntimeError object>
    __setattr__ = <method-wrapper '__setattr__' of RuntimeError object>
    __setstate__ = <built-in method __setstate__ of RuntimeError object>
    __sizeof__ = <built-in method __sizeof__ of RuntimeError object>
    __str__ = <method-wrapper '__str__' of RuntimeError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = False
    __traceback__ = <traceback object>
    args = ('wrapped C/C++ object of type QWidgetAction has been deleted',)
    with_traceback = <built-in method with_traceback of RuntimeError object>

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File "C:\Program Files\Krita
(x64)\share\krita\pykrita\tenscripts\tenscripts.py", line 33, in initialize
    self.uitenscripts.initialize(self)
  File "C:\Program Files\Krita
(x64)\share\krita\pykrita\tenscripts\uitenscripts.py", line 37, in initialize
    self._loadGridLayout()
  File "C:\Program Files\Krita
(x64)\share\krita\pykrita\tenscripts\uitenscripts.py", line 99, in
_loadGridLayout
    self.addNewRow(item)
  File "C:\Program Files\Krita
(x64)\share\krita\pykrita\tenscripts\uitenscripts.py", line 62, in addNewRow
   
label.setText(self.tenscripts.actions[key].shortcut().toString(QKeySequence.NativeText))
RuntimeError: wrapped C/C++ object of type QWidgetAction has been deleted
---

EXPECTED RESULT
Shows Ten Brushes' panel

SOFTWARE/OS VERSIONS
Krita

 Version: 5.0.0-beta1
 Languages: en_US, en
 Hidpi: true

Qt

  Version (compiled): 5.12.11
  Version (loaded): 5.12.11

OS Information

  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.22000
  Pretty Productname: Windows 10 (10.0)
  Product Type: windows
  Product Version: 10


ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to