Using SCN_MODIFIED with any of the following 4 flags(SC_MOD_CHANGESTYLE SC_MOD_CHANGEFOLD SC_PERFORMED_USER SC_MOD_CHANGEMARKER) generates a 'TypeError: unable to convert a QVariant back to a Python object' message in PyQt6.
see https://stackoverflow.com/questions/68564852/trying-to-use-scn-modified-with-pyqt6-generates-a-typeerror-crash/75417749#75417749
QScintilla is a product of Riverbank Computing and is not distributed or supported by scintilla.org. You can ask for help on their mailing list.
https://www.riverbankcomputing.com/mailman/listinfo/qscintilla
You should try to capture the value of the notification that causes the problem as it may be caused by unexpected values in a field, such as non-NUL terminated text field.