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

widget_gallery example crash on Windows [scroll, resize] #1144

Closed
Eteokles opened this issue Aug 20, 2020 · 4 comments · Fixed by #1191
Closed

widget_gallery example crash on Windows [scroll, resize] #1144

Eteokles opened this issue Aug 20, 2020 · 4 comments · Fixed by #1191
Labels
crash causes panic or segfault shell/win concerns the Windows backend

Comments

@Eteokles
Copy link

On Windows (works well on Linux)

error: process didn't exit successfully: '...\druid-master\target\debug\examples\widget_gallery.exe' (exit code: 0xc000041d)

To reproduce the issue, just scroll down to the end then try to resize the window. I reproduced the error on two different computer.

@raphlinus
Copy link
Contributor

Confirm. Looking at the crash, it's in the draw_bitmap method. The bitmap argument is not a null pointer, but I wasn't able to validate it beyond that. The error code maps to STATUS_FATAL_USER_CALLBACK_EXCEPTION, which is also odd, because I don't see a user callback of any kind here.

This is somewhat mysterious. I haven't dug deeper, but wanted to post my results.

It's possible this is caused by creating the image resource in a DXGI DeviceContext, but switching to a hwnd render context during resize. If so, I can think of ways to fix this, but we should confirm.

@Eteokles
Copy link
Author

Eteokles commented Aug 22, 2020

Didn't know if it's can help but in debug, i got this:

D2D DEBUG ERROR - An operation failed because a device-dependent resource is associated with the wrong ID2D1Device (resource domain).
ERROR [druid_shell::platform::windows::window] EndDraw error: hresult 88990015
D2D DEBUG WARNING - A Draw call by a render target failed [88990015]. Tags [0x0, 0x0].

last function called in druid is : paint in widget/image.rs

@derekdreery
Copy link
Collaborator

derekdreery commented Aug 22, 2020

I shall have a look at this. Edit: I'm not a super expert on D2D so it might be best looked at by someone else.

@luleyleo luleyleo added crash causes panic or segfault shell/win concerns the Windows backend labels Aug 22, 2020
@raphlinus
Copy link
Contributor

The simpler_d2d branch appears to fix this, so I think the approach is to get that landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash causes panic or segfault shell/win concerns the Windows backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants