-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Another run example error: cargo run --example tour
#98
Comments
I'm currently having the same problem. I'm also on windows 10. If I try to run any example, I get the same error as above. I attached visual studio's debugger to the
It successfully creates the window, titles it, etc, but it stays empty for a few seconds, and then closes. It looks like it crashes when trying to create the vulkan environment. The actual crash looks deep within the vulkan driver -- it isn't crashing literally on this line, but the call stack gets mangled after this. The actual error I get when attached is this: So something has a null pointer to a struct or array, and it's trying to read 440 bytes into that struct/array. |
I tried fixing I tried the example revision you shared, and got the same crash as before. I tried going back to the first revision of the tour.rs example (https://github.com/hecrj/iced/tree/5286ef36b6a5eb6846b5675a7a4aced72601df3b)I could find, but I couldn't compile right away. I had to go into iced/winit/cargo.toml and change the "winit" version to I guessed that this was a problem with an older version of wgpu, so I went to the oldest version of iced that uses wgpu 0.4. I get this error when trying to compile. It looks like it's referencing a deleted branch of wgpu_glyph: So I tried to use the oldest revision that uses a valid version of wgpu_glyph, which is this: https://github.com/hecrj/iced/tree/c6edc75f588ace61fc2bb2eacf9f26b08d3bda0c This revision crashes with the original crash. Desperate to get anything working, I went back to a random even older revision of the tour: https://github.com/hecrj/iced/tree/f9de39ddaa3020a9585b1648afb0ead45dfd7aa9/examples/tour This compiles and runs without any problems. I'll keep digging to see if I can find a more recent revision that runs. In the meantime, do you have any advice for the "No adapters found." error? It might be as simple as enabling a feature or fixing a different version of a library. Also, do you have a local copy of wgpu_glyph's "scissoring" branch that i can use? |
Update: I figured out that for the adapter error, I need to modify iced/wgpu/cargo.toml so that the wgpu version looks like this: Based on that, the following revision from october 5th, crashes with the original error: https://github.com/hecrj/iced/tree/ae56edc8ccd3462766071cc00c12e92feccf1274 Since I can select my backend by editing this file, I tried setting the graphics backend to dx12 instead of vulkan. When I do this, the example compiles and runs. I'd like to try selecting the dx12 backen in the latest version of iced, but it's not clear to me how to select a backend with wgpu 0.4. |
@ejmahler |
When I change that line of code to directly specify dx12, the examples in the latest version of iced work for me. |
@ejmahler Good to know! It may be an issue with your Vulkan driver, or maybe a bug in the Vulkan backend of Just for the record, do you have a dedicated GPU besides your Intel integrated graphics? I am not sure, but it may be that forcing the DirectX 12 backend is making |
Yes, I've got a gtx 1070. I updated my drivers during the process of troubleshooting this problem, so at minimum it's not a problem of outdated drivers. |
@ejmahler Interesting. Thanks! We may be able to make this configurable for cases like these by using something like environment variables, at least while we get things sorted out... Maybe an |
I investigated your suspicion about choosing the wrong device, and you were right. In Renderer.rs, I added a dbg!() line right after the statement that specifies the backend:
When BackendBit is dx12, this is the output:
When BackendBit is all(), this is the output:
So it looks like it's choosing the wrong device. Perhaps integrated graphics chips don't support swap chains? |
Thank you so much for all the testing! It's very hard to debug bugs I cannot reproduce. I really appreciate it. I'd bet it's either an issue with the Vulkan driver of your integrated GPU, or a bug upstream. I am guessing the issue will also happen with the |
I fixed the problem by updating my intel display drivers to the latest version. When I mentioned that I updated drivers before, I only updated my nvidia drivers, because I honestly forgot I even had anything else. I think the fact that it chooses the intel adapter is troubling, but not at all an urgent priority, because at worst I can disable it. |
@ejmahler thanks for All information!I‘ll try to update my GPU driver for my old AMD graphics first |
Some experiment results: result: compiled and run, but hangs for seconds and exits, with logs: iced> cargo run --example tour
Compiling iced_wgpu v0.1.0 (C:\Users\huangjj27\Documents\codes\iced\wgpu)
Compiling iced v0.1.0-beta (C:\Users\huangjj27\Documents\codes\iced)
Finished dev [unoptimized + debuginfo] target(s) in 18.48s
Running `target\debug\examples\tour.exe`
error: process didn't exit successfully: `target\debug\examples\tour.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION) step 2. change to EnvironmentOS: Windows 10 Pro 1909 Update: After adding many |
It seens that the issue is caused by gfx-rs/wgpu#368 |
@huangjj27 Thanks for reporting back! This is related to #48 and #69. I've been meaning to help fix that. I know a bunch of |
I seem to have a similar crash with examples:
|
Hm, I am curious which GPU would be chosen if the Highpower one is the requested adapter. (Instead of changing the backend bit) My intuition says it should choose the Nvidia one then... I wonder if it would default to vulkan or dx12 though |
@Abendstolz Yes, I think this is a good default for a GUI application. However, I understand there may be cases where an application may prefer to default to a powerful device. We could maybe make this configurable in the |
@hecrj I agree that it's a good default. A game will integrate iced on its own anyway and select the correct adapter. I was merely curious because I have no system with an integrated and a standalone GPU available atm |
After some effort searching around the Internet, I found that these graphic cards don't support vulkan (the newest usable driver is in crimson 16.2.1, while the mininum vulkan supported version is 16.3). Some facts that may be help |
Wanted to try it for after I saw the release of 0.1 and I definitely get the same error. It initially crashed on all examples, so I went and tried the styling example with different backends. For
For
For
Laptop running Windows 10 with integrated Intel® HD Graphics 620 which should support DX11 and VULKAN. For example Vulkan details for it can be seen at https://vulkan.gpuinfo.org/displayreport.php?id=8035#device for driver 100.7922, I actually just updated today and have the newer 100.7985 driver version that isn't on the site yet. If I can give any info that would help let me know. |
With |
I'm trying to run the example on my Windows 10, but I come across this:
I tried to backtrace the log, But it seems to only print a line of log about DPI factor. How could I log more to locate this issue?
The text was updated successfully, but these errors were encountered: