Closed muhammadismailkhan0009 closed 3 months ago
Having the same issue.
Having the same issue in Ubuntu 23.10
@Romstar @AndrewSpano till they fix it, i'll recommend you use vs code release version. it is working.
Same issue
same issue with 23.10
same issue with 23.10
I have installed the latest build from https://code.visualstudio.com/insiders/ and now code-insiders run without crashes...
not resolved yet. tried again on latest ubuntu distro.
I also have the same issue, For some reason it does open when I am connect to my laptop hub.
same issue with 23.10
I have installed the latest build from https://code.visualstudio.com/insiders/ and now code-insiders run without crashes...
Hi there, it should only be mentioned again as a temporary solution that you can install the deb package (as described above) in parallel to the snap package, which at least works for me. If I start the snap version, it still does not work after the last update....
same problem here, but as soon as i plug in an external monitor via HDMI, it works
... and with unplugin the external monitor, code-insiders crashs
not in my case
this worked from https://code.visualstudio.com/docs/setup/linux the repository and key can also be installed manually with the following script:
sudo apt-get install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" |sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null
rm -f packages.microsoft.gpg
Then update the package cache and install the package using:
sudo apt install apt-transport-https
sudo apt update
sudo apt install code # or code-insiders
still occurring on the snap. please fix this - a crash loop on any other platform wouldn't be left unacknowledged for 11 days :frowning_face:
Hi there, what is the status of the matter? It's quite difficult to work sensibly at the moment. What is the reason for the fact that the error correction remains unanswered or continues for so long? If the bug is not fixed in the version of "code-insiders", it will surely be included in the next version of "code", right?
After reviewing some of the comments above I did some testing with revision 1644 of the snap.
Using a laptop running Ubuntu 22.04 and an external monitor I found that I can only use Code-Insiders in 'Join Displays' mode. Any attempt to run Code-Insiders in a single display mode (using either the built-in or external monitor) results in two applications windows opening and immediately closing. The external monitor was connected via HDMI. Code is usable on this laptop.
On another laptop running Kubuntu 24.04 Code-Insiders opened and closed immediately. It wasn't possible to connect an external monitor at the time. Code is usable on this laptop.
On a desktop computer running Kubuntu 24.04 I have no problems running Code-Insiders and have done so reliably since I installed Kubuntu on it around a month ago.
I've just downgraded to 1.89.1, to deal with this issue. Very very annoying behaviour
I tried to repro on Ubuntu 22.04 with both wayland and x11 sessions but unable to trigger the crash unless I force the native wayland backend in the application which is a known different issue (--ozone-platform=wayland). But based on the reports there are users on 22.04 who are also able to repro the issue and the crash dumps so far indicate a crash in the gpu process. So very likely a new gpu driver dependency that we are not shipping with the snap package.
Can users try the following steps and provide the outcome, it will help narrow down the issue.
code --disable-gpu
code --use-gl=swiftshader
snap run --strace="-o code_strace.log -DD -qq -e trace=file" code
and attach the output to this issuecode --user-data-dir /tmp/code-1-90
Hi, yeah, i can start code-insiders 1.91.0 successful with "--disable-gpu" or with "--use-gl=swiftshader".
1.91.0-insider 7cd1f1ce4e8ba91863fc9840530073813a0fd4df x64
- code --user-data-dir /tmp/code-1-90
Crashes under all exemples at 1.9.0.
Here's the output of snap run --strace="-o code_strace.log -DD -qq -e trace=file" code ~/example
: code_strace.log
$ code -v
1.90.0
89de5a8d4d6205e5b11647eb6a74844ca23d2573
x64
Does it crash when starting with code --disable-gpu
Yes, it crashes.
Does it crash when starting with code --use-gl=swiftshader
Yes, it crashes.
Can you start with snap run --strace="-o code_strace.log -DD -qq -e trace=file" code and attach the output to this issue
Does the crash happen with code --user-data-dir /tmp/code-1-90
Yes, it crashes.
Crashes under all examples at 1.9.0.
Same.
Also, I don't think merging the other issues into this one was appropriate. Didn't have this problem until the today update ( certainly not a month ago ).
Same issue with:
➜ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
➜ code --version
1.90.0
89de5a8d4d6205e5b11647eb6a74844ca23d2573
x64
➜ snap --version
snap 2.63
snapd 2.63
series 16
ubuntu 22.04
kernel 6.5.0-35-generic
same issue
The SIGTRAP in gpu process comes from requesting access to a resource file which is not available, particularly this check https://source.chromium.org/chromium/chromium/src/+/main:ui/base/resource/resource_bundle.cc;l=359;. The resource file initialization happens in https://github.com/electron/electron/blob/791907f0f3559ed5e6c829a0387b12c9437a3ba7/shell/app/electron_main_delegate.cc#L96-L100 but that has not changed for a long time so doesn't answer why it triggered with Electron 29 update, also deb package working fine is interesting for the same version.
Crash reason: SIGTRAP
Crash address: 0x0
Process uptime: 0 seconds
Thread 24 (crashed)
0 code!ui::ResourceBundle::GetSharedInstance() [immediate_crash.h : 176 + 0x1]
rax = 0x0000000000000000 rdx = 0x0000000000000000
rcx = 0x0000000000000000 rbx = 0x00007e1b19fba410
rsi = 0x000000000000bf26 rdi = 0x00007e1b19fba410
rbp = 0x00007e1b19fba240 rsp = 0x00007e1b19fba240
r8 = 0x0000000000000000 r9 = 0x00002e7c0041b900
r10 = 0x0000000000000000 r11 = 0x0000000000000246
r12 = 0x0000000000000005 r13 = 0x0000000000000000
r14 = 0x000000000000bf26 r15 = 0x0000000000000060
rip = 0x0000618743a9b113
Found by: given as instruction pointer in context
1 code!l10n_util::GetStringUTF8(int) [l10n_util.cc : 809 + 0x5]
rbx = 0x00007e1b19fba410 rbp = 0x00007e1b19fba280
rsp = 0x00007e1b19fba250 r12 = 0x0000000000000005
r13 = 0x0000000000000000 r14 = 0x000000000000bf26
r15 = 0x0000000000000060 rip = 0x0000618743a95de6
Found by: call frame info
2 code!ui::BuildDisplaysFromXRandRInfo(ui::DisplayConfig const&, unsigned long*) [x11_display_util.cc : 448 + 0xd]
rbx = 0x00007e1b19fba410 rbp = 0x00007e1b19fba850
rsp = 0x00007e1b19fba290 r12 = 0x0000000000000005
r13 = 0x0000000000000000 r14 = 0x00000000000001e3
r15 = 0x0000000000000060 rip = 0x0000618743b3b1d9
Found by: call frame info
3 code!ui::GetPrimaryDisplayRefreshIntervalFromXrandr() [x11_display_util.cc : 517 + 0xb]
rbx = 0x00007e1b19fba8a0 rbp = 0x00007e1b19fba8c0
rsp = 0x00007e1b19fba860 r12 = 0x00007e1b19fba940
r13 = 0x00002e7c0045c680 r14 = 0x00007e1b19fba880
r15 = 0x00007e1b19fba8e0 rip = 0x0000618743b3ba03
Found by: call frame info
4 code!ui::(anonymous namespace)::XRandrHelper::GetInterval() [x11_xrandr_interval_only_vsync_provider.cc : 60 + 0x5]
rbx = 0x00006187474cd258 rbp = 0x00007e1b19fba900
rsp = 0x00007e1b19fba8d0 r12 = 0x00007e1b19fba940
r13 = 0x00002e7c0045c680 r14 = 0x00002e7c0047cc00
r15 = 0x00007e1b19fba8e0 rip = 0x0000618743b45035
Found by: call frame info
5 code!ui::XrandrIntervalOnlyVSyncProvider::GetVSyncParameters(base::OnceCallback<void (base::TimeTicks, base::TimeDelta)>) [x11_xrandr_interval_only_vsync_provider.cc : 77 + 0x5]
rbx = 0x00007e1b19fba938 rbp = 0x00007e1b19fba970
rsp = 0x00007e1b19fba910 r12 = 0x00007e1b19fba940
r13 = 0x00002e7c0045c680 r14 = 0x00002e7c0053c540
r15 = 0x00007e1b19fba918 rip = 0x0000618743b44f8e
Found by: call frame info
6 code!viz::SoftwareOutputSurface::SwapBuffers(viz::OutputSurfaceFrame) [software_output_surface.cc : 89 + 0xc]
rbx = 0x00007e1b19fbaa40 rbp = 0x00007e1b19fbaab0
rsp = 0x00007e1b19fba980 r12 = 0x00002e7c0105f070
r13 = 0x00002e7c0045c680 r14 = 0x00002e7c00419c80
r15 = 0x00002e7c01099780 rip = 0x000061874496c706
Found by: call frame info
7 code!viz::SoftwareRenderer::SwapBuffers(viz::DirectRenderer::SwapFrameData) [software_renderer.cc : 127 + 0xc]
rbx = 0x00002e7c004bce00 rbp = 0x00007e1b19fbac00
rsp = 0x00007e1b19fbaac0 r12 = 0x00007e1b19fbaac0
r13 = 0xaaaaaaaaaaaaaaaa r14 = 0x00007e1b19fbab40
r15 = 0x00002e7c0045c680 rip = 0x00006187449cff84
Found by: call frame info
8 code!viz::Display::DrawAndSwap(viz::DrawAndSwapParams const&) [display.cc : 1049 + 0xc]
rbx = 0x00002e7c004bce00 rbp = 0x00007e1b19fbb010
rsp = 0x00007e1b19fbac10 r12 = 0x00002e7c0106ca01
r13 = 0xaaaaaaaaaaaaaaaa r14 = 0x00007e1b19fbac10
r15 = 0x00002e7c0106ca00 rip = 0x000061874498b4e0
Found by: call frame info
9 code!viz::DisplayScheduler::DrawAndSwap() [display_scheduler.cc : 223 + 0x5]
rbx = 0x0000000000000000 rbp = 0x00007e1b19fbb090
rsp = 0x00007e1b19fbb020 r12 = 0xaaaaaaaaaaaaaaaa
r13 = 0x0000000000000000 r14 = 0x00002e7c00478d00
r15 = 0xaaaaaaaaaaaaaaaa rip = 0x00006187449d5d60
Found by: call frame info
10 code!viz::DisplayScheduler::OnBeginFrameDeadline() [display_scheduler.cc : 526 + 0x8]
rbx = 0x00002e7c00478d00 rbp = 0x00007e1b19fbb0f0
rsp = 0x00007e1b19fbb0a0 r12 = 0xaaaaaaaaaaaaaaaa
r13 = 0x0000000000000000 r14 = 0x0000000000000000
r15 = 0x00007e1b19fbb100 rip = 0x00006187449d4fb5
Found by: call frame info
Thanks for the strace log, I would like to confirm the gpu feature set as next step. Can users try the following and provide the output
code --disable-gpu-compositing --disable-gpu --use-gl=swiftshader
code --enable-tracing="ozone" --trace-startup-file=/tmp/code-snap-trace.log --trace-startup-format=json
@Timbuktu1982 just to confirm, insiders snap based on 1.91.0 works fine with --disable-gpu
or even without the flags ?
@DanAlexson90 the issue you are seeing in 1.90.0 was observed first in insiders, the root cause is from runtime update hence I have merged the issues to the first report that was made.
Does it crash starting with code --disable-gpu-compositing --disable-gpu --use-gl=swiftshader
No! :slightly_smiling_face: It launches successfully and I see the release notes "May 2024 (version 1.90)"
code --enable-tracing="ozone" --trace-startup-file=/tmp/code-snap-trace.log --trace-startup-format=json
Edit: Disregard - I was launching the .deb version.
@bjmc thats great to know, look like gpu compositor is the component triggering the crash.
As for the trace, seems like you had captured it from the deb package. Can you get the trace from the snap package. Thanks!
I have same issue today. Vscode crashes on startup. code --version 1.90.0 89de5a8d4d6205e5b11647eb6a74844ca23d2573 x64
The above options running with the GPU disabled didn't help either
Its working for me I tried command code --in-process-gpu .
code --in-process-gpu helps me too! Thanks
@aoh-mahesh does it work when running with code --disable-gpu-compositing
?
workaround, it works for me:
code --in-process-gpu
@aoh-mahesh does it work when running with
code --disable-gpu-compositing
?
No
Oh interesting, what about forcing the software renderer code --disable-gpu-compositing --disable-gpu --use-gl=swiftshader
?
Can you share the trace from code --enable-tracing="ozone" --trace-startup-file=/tmp/code-snap-trace.log --trace-startup-format=json
workaround, it works for me:
code --in-process-gpu
This is working for me
Its working for me I tried command code --in-process-gpu .
Thank you so much, today I open my laptop, and I was chocked that code was crashing for the first time. This solution worked well for me.
@bjmc thats great to know, look like gpu compositor is the component triggering the crash.
As for the trace, seems like you had captured it from the deb package. Can you get the trace from the snap package. Thanks!
Sorry, maybe this is a red herring for you because I did install the .deb. Let me switch back to the snap package and see if I can get you a trace.
I'm using codium to survive. Not good to loose the main IDE
What worked for me was to remove it and then install it with apt (instead of snap)
Removing the snap build Installing the deb build from the site is working fine. https://code.visualstudio.com/
@deepak1556 Apologies, I think I gave you bad info in my last comment. I've apt remove
d the .deb package and now it is crashing with code --disable-gpu-compositing --disable-gpu --use-gl=swiftshader
(code --in-process-gpu
does work)
When I run code --enable-tracing="ozone" --trace-startup-file=/tmp/code-snap-trace.log --trace-startup-format=json
it crashes but no trace file is produced -- maybe it's crashing too soon before it even starts writing that file?
code --in-process-gpu
worked for me too!
Thanks for clarifying @bjmc, result now makes sense.
Given in-process-gpu works, which basically does gpu stuff in the main process which is not sandboxed, this hints to me like a sandbox issue. Can anyone try code --disable-gpu-sandbox
and confirm if the crash persists. Thanks!
code --in-process-gpu
worked for me too!
Hi, using "code --in-process-gpu" also worked for me!
@deepak1556 yes, the snap still crashes for me with code --disable-gpu-sandbox
@bjmc can you share the logs from code --disable-chromium-sandbox --verbose
and code --in-process-gpu --verbose
@Timbuktu1982 just to confirm, insiders snap based on 1.91.0 works fine with
--disable-gpu
or even without the flags ?@DanAlexson90 the issue you are seeing in 1.90.0 was observed first in insiders, the root cause is from runtime update hence I have merged the issues to the first report that was made.
No, without flags it crashes...
can you share the logs from
code --disable-chromium-sandbox --verbose
andcode --in-process-gpu --verbose
@deepak1556 Sorry for the slow reply and thanks for your work debugging this. Here's the logs...
This one I closed deliberately: in-process-gpu.log
This one crashed: disable-chromium-sandbox.log
Does this issue occur when all extensions are disabled?: Yes
VS Code Version: 1.90.0-insider 26c4a07b47a2bd34480a5e4cba2c2384c590b039 x64
OS Version: Ubuntu 24.04 LTS
Steps to Reproduce:
code-insiders
. it opens and then closes down.here is the snippet of crash logs that i feel is important:
here "mypcname" is the placeholder for actual user login name.
tried but didn't work: reference issue
Workaround: running with
--use-gl=angle --use-angle=swiftshader