Created attachment 176540 [details] This is the script SUMMARY Using a custom script to create duplicate frames for all paint layers in a complicated group layer causes krita to crash. Krita spits out 'ASSERT (krita): "row >= 0" in file /builds/graphics/krita/plugins/dockers/animation/KisAnimCurvesChannelsModel.cpp, line 181' in the terminal, and then quits. This is the script I am using, and running through the script editor: from PyQt5.QtWidgets import QDialog, QHBoxLayout, QPushButton, QLineEdit, QLabel global isTextDifferent isTextDifferent=True application = Krita.instance() currentDoc = application.activeDocument() def groupDuplicate(): global isTextDifferent global currentDoc global application if(isTextDifferent): layers = currentDoc.nodeByName(text.text()) if(text.text()==""): layers = currentDoc.activeNode() if(layers == None): print('layer does not exist!') return elif(str(type(layers)) != "<class 'PyKrita.krita.GroupLayer'>"): print('Not a group layer!') return GroupDuplicateLayer(layers.childNodes()) isTextDifferent = False return def GroupDuplicateLayer(layers): for layer in layers: print(layer) if(str(type(layer)) == "<class 'PyKrita.krita.Node'>"): layer.enableAnimation() global currentDoc currentDoc.setActiveNode(layer) Krita.instance().action('add_duplicate_frame').trigger() else: GroupDuplicateLayer(layer.childNodes()) def textChanged(x): global isTextDifferent isTextDifferent = True # add button and layout for button layout = QHBoxLayout() newButton = QPushButton("Enter") text = QLineEdit() label = QLabel("Update which group layer?") layout.addWidget(label) layout.addWidget(text) layout.addWidget(newButton) newButton.clicked.connect(groupDuplicate) text.returnPressed.connect(groupDuplicate) text.textEdited.connect(textChanged) # create dialog and show it newDialog = QDialog() newDialog.setLayout(layout) newDialog.setWindowTitle("New Dialog Title!") newDialog.exec_() # show the dialog STEPS TO REPRODUCE 1. create a new image 2. add several recursive group layers with paint layers inside them 3. run the script above. OBSERVED RESULT It crashes. EXPECTED RESULT all the child paint layers to have a duplicate frame at the current frame number. SOFTWARE/OS VERSIONS Windows: macOS: (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION I am using the appimage on Arch.
Hi, G! Could you please test the latest Krita Plus build? https://cdn.kde.org/ci-builds/graphics/krita/krita-5.2/ I guess I have fixed an issue like that quite recently during the bughunt month :)
(In reply to Dmitry Kazakov from comment #1) > Hi, G! > > Could you please test the latest Krita Plus build? > > https://cdn.kde.org/ci-builds/graphics/krita/krita-5.2/ > > I guess I have fixed an issue like that quite recently during the bughunt > month :) Unfortunately, the exact same bug occurred. It did crash a *bit* better--It actually had an error popup instead of just leaving the error in the terminal.
🐛🧹 Thanks for your comment! Automatically switching the status to REPORTED so the team can perform further triage. In the future you may also do this yourself when providing needed information.