skip to Main Content

From vscode on my KDE (Ubuntu 24.04) system when trying to open the "Save As" dialog to save any file, the dialog does not open and a separate process "kdialog" starts using 100% of CPU and tries to continuously allocating memory until it’s full and the system completely freezes.

Steps to reproduce (including clearing data and reinstalling vscode):

snap remove --purge code
rm -rf ~/.config/Code
rm -rf ~/.vscode
snap install code --classic

Open vscode (even with all extensions disabled and gpu acceleration turned off). Create new file. Try to save it.

When trying to save the new file, vscode starts an instance of kdialog with the following arguments:

kdialog --attach=75497476 --title="Save As" --getsavefilename /home/user/textfile "All Files (*.txt)|Plain Text (*.bat *.cmd) [...]"

This command if run separately runs properly, opens the dialog and returns in stdout the correct file path.

By trying to attach strace to the kdialog process (strace -f -p $(pgrep kdialog)) it shows an infinite call of brk kernel function, indicating its indeed continuously trying to extend the memory dedicated to the process.

Further investigation attaching gdb to the kdialog process it looks like the process is stuck in an infinite loop inside KBuildSycoca::recreate. I’m not quite sure what "ksycoca" is doing but it looks like its related to a file in ~/.cache/.ksyscoca5*, and indeed there is a .lock file referring to kdialog with the same pid. I even tried to clear those cache files but they gets recreated when kdialog is trying to start again.

Any idea on how to investigate further and how (and if) is this ksyscoca involved in all this?

(kdialog version 23.08.5, vscode version 1.94.2 x64)

2

Answers


  1. Same here (kdialog version 23.08.5, vscode version 1.94.2 x64)

    The workaround mentioned here works for me: https://github.com/microsoft/vscode/issues/231310

    File > Preferences > Settings > Text Editor > Files > Simple Dialog > Enable

    Login or Signup to reply.
  2. The same problem here.
    I don’t know whether the following observation can be of any use.
    Only the updates of the last 2 weeks after fresh Kubuntu 24.04 LTS installation.

    I encountered the problem with kdialog when I wanted to try out 2 python CAD modules.
    I installed cadquery and aspose-cad with an active virtual environment.
    Needless to say, I didn’t spend much time with the docs and just wanted to run some hello-world code.

    https://github.com/CadQuery/cadquery
    pip install cadquery

    https://pypi.org/project/aspose-cad/
    pip install aspose-cad

    I noticed during the installation outputs that a lot of Qt 5 stuff was installed, although I thought I had Qt6 on my system.
    Immediately after these unsuccessful installation attempts, I could no longer open the file/folder kdialog from within vscode. Complete vscode reinstallation did not change anything and since then I can only continue working with the ‘Simple Dialog > Enable’ method.

    system:
    Operating System: Kubuntu 24.04
    KDE Plasma Version: 5.27.11
    KDE Frameworks Version: 5.115.0
    Qt Version: 5.15.13
    Kernel Version: 6.8.0-47-generic (64-bit)
    Graphics Platform: X11
    Processors: 4 × Intel® Core™ i5-4590 CPU @ 3.30GHz
    Memory: 31,3 GiB of RAM
    Graphics Processor: Mesa Intel® HD Graphics 4600
    Manufacturer: Dell Inc.
    Product Name: OptiPlex 7020
    System Version: 00
    
    vscode:
    Version: 1.94.2
    Date: 2024-10-09T16:08:44.566Z
    Electron: 30.5.1
    ElectronBuildId: 10262041
    Chromium: 124.0.6367.243
    Node.js: 20.16.0
    V8: 12.4.254.20-electron.0
    OS: Linux x64 6.8.0-47-generic snap
    
    kdialog 23.08.5
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search