Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ› Memory allocation error for non root user #1712

Open
rljohnsn opened this issue May 19, 2024 · 1 comment
Open

πŸ› Memory allocation error for non root user #1712

rljohnsn opened this issue May 19, 2024 · 1 comment

Comments

@rljohnsn
Copy link

rljohnsn commented May 19, 2024

After install a non root user gets a memory error. Running as root works fine.

❯ sudo delta
[sudo] password for lance:
The main way to use delta is to configure it as the pager for git: see https://github.com/dandavison/delta#get-started. You can also use delta to diff two files: `delta file_A file_B`.
❯ ls -laF /usr/bin/delta
-rwxr-xr-x 1 root root 7059472 Mar 16 07:28 /usr/bin/delta*
❯ ldd /usr/bin/delta
        linux-vdso.so.1 (0x00007ffc8659b000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9701de0000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9701dc0000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9701cd9000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9701ab0000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f97024c2000)
❯ delta
memory allocation of 1970324836974592 bytes failed
[1]    11340 IOT instruction  delta
❯ sudo delta
The main way to use delta is to configure it as the pager for git: see https://github.com/dandavison/delta#get-started. You can also use delta to diff two files: `delta file_A file_B`.
❯ uname -a
Linux DESKTOP-UE7J8VS 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy

Windows 11, WSL2, Ubuntu 22.04

Delta version: https://github.com/dandavison/delta/releases/download/0.17.0/git-delta_0.17.0_amd64.deb

@dandavison
Copy link
Owner

dandavison commented May 20, 2024

Hi @rljohnsn, this memory allocation error has come up several times before in delta issues: https://github.com/dandavison/delta/issues?q=is%3Aissue+%22memory+allocation%22

It seems that it's always something to do with stale syntect syntax definitions. Can you try some of the remedies in those threads, such as installing bat and

bat cache --clear
bat cache --build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants