You are not logged in.

#1 2025-03-22 10:29:41

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

[SOLVED] Electron applications (discord, code) segfault on launch

I did a system upgrade yesterday and after that, VS Code (from aur/visual-studio-code-bin) has stopped working for me. It simply crashes on launch without any indication. I looked up and saw people getting it to work by changing cursors, but that did not fix it for me.

Here is the info from the coredump. (coredumpctl info <pid>)

https://pastebin.com/mLWjERRt

The same happens for Discord but that was the same even before the system upgrade. Before the upgrade, VS Code worked fine but not Discord. I am at my wit's end with this and don't know how to fix this.

Here is the dump for Discord: https://pastebin.com/z0eWAbfF

Any help in figuring this out would be greatly appreciated! Thank you for your time.

Last edited by utkarshverma (2025-04-22 09:28:27)

Offline

#2 2025-03-22 11:11:53

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

Re: [SOLVED] Electron applications (discord, code) segfault on launch

I checked various versions and noticed this issue started happening from v1.95.1. v1.94.2 works just fine. By the way, I am using X11.

https://code.visualstudio.com/updates/v1_94
https://code.visualstudio.com/updates/v1_95

Offline

#3 2025-03-22 12:42:57

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,775

Re: [SOLVED] Electron applications (discord, code) segfault on launch

Both crash in fontconfig parsing, do you have some custom fontconfig files?

Offline

#4 2025-03-22 14:30:15

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

Re: [SOLVED] Electron applications (discord, code) segfault on launch

Thanks for the quick reply. Yes, I do. Here it is:
https://github.com/UtkarshVerma/dotfile … fonts.conf

By the way, how did you deduce it?

Offline

#5 2025-03-22 14:36:02

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,775

Re: [SOLVED] Electron applications (discord, code) segfault on launch

Advanced reading skills I picked up in elementary school tongue

                Stack trace of thread 33247:
                #0  0x000057c25ccec413 n/a (/opt/visual-studio-code/code + 0x5ace413)
                #1  0x000057c25948519b n/a (/opt/visual-studio-code/code + 0x226719b)
                #2  0x000057c25ccf427d n/a (/opt/visual-studio-code/code + 0x5ad627d)
                #3  0x000057c25ccf3cf9 malloc (/opt/visual-studio-code/code + 0x5ad5cf9)
                #4  0x000072829cf052d0 __strdup (libc.so.6 + 0xad2d0)
                #5  0x000072829c9b0fdd n/a (libfontconfig.so.1 + 0x2bfdd)

Remove the file to check whether it's actually the trigger.
If it is, wild guess, try to add a trailing newline.

Offline

#6 2025-03-22 16:36:53

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

Re: [SOLVED] Electron applications (discord, code) segfault on launch

I removed the fontconfig file and restarted my PC (just to be sure). But VS Code still crashes.

Here's the coredump: https://pastebin.com/NCACTY6J

The libfontconfig is still there in the trace.

Offline

#7 2025-03-22 16:51:05

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,775

Re: [SOLVED] Electron applications (discord, code) segfault on launch

strace -o /tmp/codeisastupidname.strace -tt -f code

/tmp/codeisastupidname.strace will then hopefully show what file it stumbles over…

Offline

#8 2025-03-22 20:46:38

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

Re: [SOLVED] Electron applications (discord, code) segfault on launch

The trace was pretty big this time. Here it is: https://files.catbox.moe/7l8tz4.strace

Last edited by utkarshverma (2025-03-22 20:47:47)

Offline

#9 2025-03-22 21:05:46

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

Re: [SOLVED] Electron applications (discord, code) segfault on launch

Okay, so I found a fix for VS Code at least. My XDG_DATA_DIRS did not include ~/.local/share/ and adding it fixed the issue for me. Discord still crashes though.

https://forum.cursor.com/t/cursor-0-46- … ap/60465/7

Offline

#10 2025-03-22 21:24:50

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,775

Re: [SOLVED] Electron applications (discord, code) segfault on launch

So you've two differently caused memory corruptions in electron processes that both by random chance go through fontconfig xml parsing??
Also

grep '\.local/share' kylkpx.strace | wc -l # 159 hits

Offline

#11 2025-03-22 22:12:30

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

Re: [SOLVED] Electron applications (discord, code) segfault on launch

After a restart, Discord started working just fine. I think the issue was with XDG_DATA_DIRS and adding the fix above makes everything work. Thanks!

Offline

Board footer

Powered by FluxBB