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

            Bug ID: 517045
           Summary: Kate Segmentation fault with view.executeCommand
    Classification: Applications
           Product: kate
      Version First 25.08.1
       Reported In:
          Platform: Ubuntu
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: scripting
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
Kate crashes if using view.executeCommand towards an command for a external
tool. 

For note-taking in meetings I've added a "External Tool" which executes a bash
script to run Spectacle. This bash-script takes a screenshot with Spectacle,
and outputs the path in the Markdown image syntax in stdout. 

I wanted to see if I could add this to a snippet I've added, using the
view.executeCommand API. However, this then crashes Kate with Segmentation
fault (core dumped). 

STEPS TO REPRODUCE
1. Enable plugins "External Tools" and "Scripts & Snippets"
2. Define a external tool with an editor command "screenshot"
3. Add a Snippet, set the "Snippet Mode" to "Script"
4. Add the following code: view.executeCommand("screenshot", "");
5. Press "Test this snippet"
6. Kate crashes

OBSERVED RESULT
$ kate --startanon -n /tmp/test -b
QFormLayoutPrivate::setItem: Cell (1, 1) already occupied
Segmentation fault (core dumped)

EXPECTED RESULT
The output from the command/external tool should appear in the test-output when
pressing "Test this snippet"

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 25.10
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.2
Kernel Version: 6.17.0-14-generic (64-bit)
Graphics Platform: Wayland
Processors: 14 × Intel® Core™ Ultra 7 255U
Memory: 32 GiB of RAM (30.8 GiB usable)
Graphics Processor 1: Intel® Graphics
Graphics Processor 2: llvmpipe

ADDITIONAL INFORMATION

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

Reply via email to