Created attachment 187086 [details] Backtrace SUMMARY Krita crashes immediately when the text field in the SeExpr Fill layer options is cleared (emptied). I believe this happens because the instant preview tries to parse an empty string, triggering a hard assertion failure in libKSeExpr on systems built with GLIBCXX assertions. STEPS TO REPRODUCE 1. Create a new document 2. Add a Fill Layer 3. Select SeExpr generator from the list 4. In the SeExpr script options tab, select all text in the script box, Ctrl+A 5. Press Backspace to clear the box OBSERVED RESULT Krita closes immediately (crashes) EXPECTED RESULT The text box should become empty, and I should be allowed to type a new script. The preview should likely just fail silently or show a blank output, not crash the application. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux 6.17.8-arch1-1 KDE Plasma Version: 6.5.3 KDE Frameworks Version: 6.20.0 Qt version: Running `from krita import * print ( QLibraryInfo.version().majorVersion() )` within Kritas python scripter returns 5 Qt Version (system): 6.10.0 Window: Wayland ADDITIONAL INFORMATION The crash is an assertion failure in KSeExpr::Expression::prep() Backtrace snippet: #10 0x00007f025369a41f in std::__glibcxx_assert_fail (file=<optimized out>, line=<optimized out>, function=<optimized out>, condition=<optimized out>) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/assert_fail.cc:41 #11 0x00007f021071e2c8 in KSeExpr::Expression::prep() const () at /usr/lib/libKSeExpr.so.4 #12 0x00007f02188f1a6f in ??? () at /usr/lib/kritaplugins/kritaseexprgenerator.so This contradicts the Krita Manual (Tutorials and How-tos > Introduction to SeExpr), which tells users: "Go to the text box, and clear it if it has any text."
I cannot reproduce this with the appimage. It looks like an asswert in kseexpr itself, though.
if (_evaluationStrategy == UseInterpreter) { if (debugging) { debugPrintParseTree(); std::cerr << "Eval strategy is interpreter" << std::endl; } assert(!_interpreter); _interpreter = new Interpreter; It's here... I don't think the assert is useful, though.