-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Segfault and Window Not Appearing on v0.12.0 #10717
Comments
Could you run the crashing example(s) with a debugger to get a backtrace of where the segfault happen? |
@Kanabenki I'm sorry, I didn't understand what you meant by "debugger." Is there any software available that can perform further backtrace? For now, I'll attach the logs from running |
When the process crashes with a segfault, you cannot get a proper backtrace since your process is killed instantly and the code inserted by rustc to handle printing the backtrace on panic does not get a chance to run. By running the process through a debugger, you can capture that backtrace when the crash occurs and see what caused it 🙂 Here's how you can do it:
Note that gdb should work properly for just displaying a backtrace, but if you want support for printing/parsing Rust expressions you should use rust-gdb or rust-lldb instead (I think those wrappers are already provided if you installed rust through rustup?). |
Thank you very much for explaining it so kindly! I tried running rust-gdb as you instructed, and it turns out there's an error with libnvwgf2umx.so. It seems that there are others experiencing similar symptoms (microsoft/wslg#715). It might be a bug with WSLg, perhaps.
|
Indeed, it seems the problem might come from your execution environment rather than bevy itself. Could you provide the rest of the capture, just to see from where the offending lib is called from bevy? |
Actually, this is the entire log. I was expecting to see some Bevy stuff displayed at the end of the backtrace, but nothing else was shown beyond this point. Addendum: I tried updating to Windows 11, but the situation did not improve. On the contrary, now it seems that nothing is left in the backtrace. % rust-gdb ./target/debug/examples/2d_shapes [release-0.12.0]
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./target/debug/examples/2d_shapes...
(gdb) r
Starting program: /home/user/bevy/target/debug/examples/2d_shapes
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7b4b640 (LWP 166)]
[New Thread 0x7fffeffff640 (LWP 167)]
[New Thread 0x7ffff794a640 (LWP 168)]
[New Thread 0x7ffff7749640 (LWP 169)]
[New Thread 0x7ffff7545640 (LWP 170)]
[New Thread 0x7ffff7341640 (LWP 171)]
[New Thread 0x7ffff713d640 (LWP 172)]
[New Thread 0x7ffff6f39640 (LWP 173)]
[New Thread 0x7ffff6d35640 (LWP 174)]
[New Thread 0x7ffff6b31640 (LWP 175)]
[New Thread 0x7ffff692d640 (LWP 176)]
[New Thread 0x7ffff6729640 (LWP 177)]
[New Thread 0x7ffff6525640 (LWP 178)]
[New Thread 0x7ffff6321640 (LWP 179)]
[New Thread 0x7ffff611d640 (LWP 180)]
[New Thread 0x7ffff5f19640 (LWP 181)]
2023-11-28T02:37:36.539039Z INFO bevy_winit::system: Creating new window "App" (0v0)
[Detaching after vfork from child process 182]
[Detaching after vfork from child process 227]
[Detaching after vfork from child process 230]
[Detaching after vfork from child process 231]
[New Thread 0x7fffa21e0640 (LWP 233)]
[New Thread 0x7fffa19df640 (LWP 234)]
[New Thread 0x7fffa11de640 (LWP 235)]
[New Thread 0x7fffa09dd640 (LWP 236)]
[New Thread 0x7fff9f17c640 (LWP 237)]
[New Thread 0x7fff9e321640 (LWP 238)]
[New Thread 0x7fff9db20640 (LWP 239)]
[New Thread 0x7fff9d31f640 (LWP 240)]
[New Thread 0x7fff9cb1e640 (LWP 241)]
[New Thread 0x7fff970bf640 (LWP 242)]
[Thread 0x7fff9f17c640 (LWP 237) exited]
[Thread 0x7fffa09dd640 (LWP 236) exited]
[Thread 0x7fffa11de640 (LWP 235) exited]
[Thread 0x7fffa19df640 (LWP 234) exited]
[Thread 0x7fffa21e0640 (LWP 233) exited]
2023-11-28T02:37:37.200599Z INFO bevy_render::renderer: AdapterInfo { name: "D3D12 (NVIDIA GeForce GTX 1650)", vendor: 0, device: 0, device_type: Other, driver: "", driver_info: "", backend: Gl }
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
2023-11-28T02:37:37.437372Z WARN bevy_audio::audio_output: No audio device found.
[New Thread 0x7fffa09dd640 (LWP 243)]
[New Thread 0x7fffa11de640 (LWP 244)]
2023-11-28T02:37:37.550437Z WARN bevy_pbr::ssao: ScreenSpaceAmbientOcclusionPlugin not loaded. GPU lacks support: TextureFormat::R16Float does not support TextureUsages::STORAGE_BINDING.
[New Thread 0x7fffa19df640 (LWP 245)]
2023-11-28T02:37:37.552017Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux 22.04 Ubuntu", kernel: "5.15.133.1-microsoft-standard-WSL2", cpu: "AMD Ryzen 7 5700X 8-Core Processor", core_count: "8", memory: "7.7 GiB" }
[Thread 0x7fff970bf640 (LWP 242) exited]
[Thread 0x7fffa19df640 (LWP 245) exited]
[Thread 0x7fffa11de640 (LWP 244) exited]
[Thread 0x7fffa09dd640 (LWP 243) exited]
[Thread 0x7fff9cb1e640 (LWP 241) exited]
[Thread 0x7fff9d31f640 (LWP 240) exited]
[Thread 0x7fff9db20640 (LWP 239) exited]
[Thread 0x7fff9e321640 (LWP 238) exited]
[Thread 0x7ffff611d640 (LWP 180) exited]
[Thread 0x7ffff6321640 (LWP 179) exited]
[Thread 0x7ffff6525640 (LWP 178) exited]
[Thread 0x7ffff6729640 (LWP 177) exited]
[Thread 0x7ffff692d640 (LWP 176) exited]
[Thread 0x7ffff6b31640 (LWP 175) exited]
[Thread 0x7ffff6d35640 (LWP 174) exited]
[Thread 0x7ffff6f39640 (LWP 173) exited]
[Thread 0x7ffff713d640 (LWP 172) exited]
[Thread 0x7ffff7341640 (LWP 171) exited]
[Thread 0x7ffff7545640 (LWP 170) exited]
[Thread 0x7ffff7749640 (LWP 169) exited]
[Thread 0x7ffff794a640 (LWP 168) exited]
[Thread 0x7fffeffff640 (LWP 167) exited]
[Thread 0x7ffff7b4b640 (LWP 166) exited]
[Thread 0x7ffff7b4ca40 (LWP 163) exited]
[Thread 0x7ffff5f19640 (LWP 181) exited]
[New process 163]
[Inferior 1 (process 163) exited with code 0150]
(gdb) bt
No stack.
(gdb) |
I'm afraid I can't help much more. By any chance have you tried updating your WSL install to pre-release ( |
Before trying all of these, I had already updated to the pre-release version (I'll attach the logs, though it's in Japanese). I'll wait until there's progress on the issue which I mentioned above, or until someone with the same case finds this issue. Thank you very much for patiently providing me with various instructions! PS C:\home> wsl --update --pre-release
更新プログラムを確認しています。
Linux 用 Windows サブシステムの最新バージョンは既にインストールされています。
PS C:\home> wsl --version
WSL バージョン: 2.0.11.0
カーネル バージョン: 5.15.133.1-1
WSLg バージョン: 1.0.59
MSRDC バージョン: 1.2.4677
Direct3D バージョン: 1.611.1-81528511
DXCore バージョン: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows バージョン: 10.0.22631.2715 |
I tried running version 0.12.1 and the window showed up but ...... what the heck!? IMG_3480.MOV |
Bevy version
0.12.0
[Optional] Relevant system information
What you did
I ran example codes on the
release-0.12.0
branch:What went wrong
The window didn't appear, and the script suddenly encountered a segmentation fault:
Additional information
apt update && apt upgrade
didn't resolve the problem.release-0.11.3
branch worked well for me (it produced the same errors and warnings, but the window is displayed correctly.):The text was updated successfully, but these errors were encountered: