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

Resizing is wonky. (On macOS, missing frames cause scaling. On GNU/Linux, a blackout effect occurs.) #322

Open
eliheuer opened this issue Aug 21, 2022 · 21 comments
Assignees
Labels
bug Something isn't working code-quality Doesn't improve user experience, only makes the code better. dependencies Pull requests that update a dependency file help wanted Extra attention is needed low-priority macOS

Comments

@eliheuer
Copy link
Contributor

See the screenshot below, this seems distracting and hopefully unnecessary. MacOS 11
stretch

@ctrlcctrlv ctrlcctrlv added bug Something isn't working macOS urgent Urgent bug causing significant breakage. labels Aug 21, 2022
@ctrlcctrlv
Copy link
Collaborator

Uh oh. How do we think this happened @Subject38? Might you have time to test with me via TeamViewer again some time soon?

@ctrlcctrlv
Copy link
Collaborator

Did I split the scale into (x,y) components and forget a min()? That's my first thought but I think we would have caught it so it might be more Apple fuckery, they cannot seem to keep their API's straight.

@ctrlcctrlv
Copy link
Collaborator

Also if Seth has no time @eliheuer can test with me just as well. I could not find an affordable macOS virtualization service with GPU support so have not been able to determine another way to test, and the Foundation is (I am) naturally quite against the idea of purchasing an Apple computer to do local testing.

@ctrlcctrlv ctrlcctrlv self-assigned this Aug 21, 2022
@eliheuer
Copy link
Contributor Author

@ctrlcctrlv It is a bit hard to see what is going on in just a screenshot, so I made a YouTube video showing the bug here: https://www.youtube.com/watch?v=VzSWypCgkdQ

This is on a 2020 Apple M1 Mac Mini, macOS 11.6.5.

@eliheuer
Copy link
Contributor Author

I just tested on Arch Linux and was able to resize the window without any stretching of the UI, video example here: https://www.youtube.com/watch?v=ZmyjAzNq7hs

So this is a MacOS bug, happy to help look into this, I'll see if I get the same thing on a older Intel non-M1 mac next.

@ctrlcctrlv
Copy link
Collaborator

I have determined the fastest way to fixing Mac issues is for me to just use someone else's Mac PC and try a bunch of things until I fix it.

Thanks for showing me the issue, it's just as weird as I thought. For sure @Subject38 and I would have noticed this. So, I can't really fix it until someone has time to dedicate to a remote session.

Because I also tried with @Subject38 to just send patches I thought might work in the past and it was a ton of useless work for both of us, in terms of patch management, copying, pasting, it not working, me getting back a video, etc.

@ctrlcctrlv ctrlcctrlv added the fred-needs-remote-participant For @ctrlcctrlv to fix this personally a remote participant with a MacBook is needed. label Aug 22, 2022
@ctrlcctrlv
Copy link
Collaborator

Humorous new tag:

image

@eliheuer
Copy link
Contributor Author

eliheuer commented Aug 22, 2022

I updated to macOS 12.5.1 tonight and I still get the same stretching when resizing the window. So macOS 11 was not the problem.

@Subject38
Copy link
Contributor

Subject38 commented Aug 22, 2022

Just tested on my local machine and I can confirm this issue exists. I feel like I might have noticed it before but didn't realise it was a big issue since after resizing all the UI elements go back to normal. I'm honestly not entirely sure what might be causing this behavior in the first place...
Currently running 12.5 btw

@ctrlcctrlv
Copy link
Collaborator

after resizing all the UI elements go back to normal

Oh so this isn't even that big a deal but @Subject38 there's a bigger problem

I'm glad I tried to do a full build again on @t0lva's PC because I literally was on the phone w/her for an hour trying to build and it kept erroring out and it turns out we're blocked on aclysma/skulpin#108 (comment) for new VulkanSDK versions

What VulkanSDK do you have?

@ctrlcctrlv
Copy link
Collaborator

(That's @t01va not @t0lva.)

@ctrlcctrlv
Copy link
Collaborator

(Housekeeping: I'm downgrading this bug to minor and making a new one for the VulkanSDK update issue.)

@ctrlcctrlv ctrlcctrlv added low-priority and removed urgent Urgent bug causing significant breakage. fred-needs-remote-participant For @ctrlcctrlv to fix this personally a remote participant with a MacBook is needed. labels Aug 22, 2022
@Subject38
Copy link
Contributor

Subject38 commented Aug 22, 2022

sub38@fear ~ % vulkaninfo | grep Version
WARNING: [MoltenVK] Code 0 : Unrecognized CreateInstance->pCreateInfo->pApplicationInfo->apiVersion number (0x004020c6). Assuming MoltenVK 1.1 version.
Vulkan Instance Version: 1.2.198

Looks like version 1.2.198.
I never updated after initially installing so that's likely why...

@ctrlcctrlv
Copy link
Collaborator

Thank you that jives perfectly w/@eliheuer's experience. I opened #323 for the SDK issue.

For the resizing...it's basically #295. Sorry I just don't think it's a big deal but of course it's still a bug so I'm leaving it open.

@eliheuer
Copy link
Contributor Author

I just tested this on an Intel mac on macOS 11 and still get the same stretching.

I think from a UI/UX perspective it is a major issue, but I'm a UI snob I guess.

@ctrlcctrlv
Copy link
Collaborator

@eliheuer I agree it looks really wonky and ugly (same with the blackout effect that happens on Linux). I'll be really honest, I just don't know how to fix it. Like there are callbacks and Vulkan something or other going on here, it's all wrapped up with Skulpin's Vulkan renderer in general and I am just as likely to make it worse as make it better.

@MatthewBlanchard is usually our 3D expert but he's been a bit MIA of late so if he doesn't fix it I don't know when/if it will be, and personally I don't see it as a major problem compared to all the other ones, so that's why I've tagged it low-priority. That doesn't mean it needs to be low priority for you or anyone else including Matt, the tags just reflect my thinking as this project's maintainer. Anyone else is free to pitch in. :-)

@ctrlcctrlv ctrlcctrlv added help wanted Extra attention is needed dependencies Pull requests that update a dependency file code-quality Doesn't improve user experience, only makes the code better. labels Aug 22, 2022
@ctrlcctrlv ctrlcctrlv changed the title MacOS: Window resizing causes the whole UI to stretch Resizing is wonky. (On macOS, missing frames cause scaling. On GNU/Linux, a blackout effect occurs.) Aug 22, 2022
@ctrlcctrlv
Copy link
Collaborator

This issue has been merged with, and supersedes, #295.

@jakeisnt
Copy link

jakeisnt commented Dec 24, 2022

By the blackout effect, are y'all referring to the flickering/resetting effect that I receive? Screen recording to demonstrate the behavior on my system (Linux/NixOS/Wayland, using native Wayland, not XWayland). I don't see any scaling here.

Wondering if this is somewhere upstream rather than an issue here - cross-platform WM abstractions are tricky to get right. I'll keep playing around.

@ctrlcctrlv
Copy link
Collaborator

Yes, the issues are one and the same and have the same root upstream cause.

@ctrlcctrlv
Copy link
Collaborator

ctrlcctrlv commented Dec 24, 2022

It's worth noting what I wrote at imgui-rs/imgui-rs#582 (comment). To fix #323 we will be switching in the new year to @lucasmerlin's egui_skia, OpenGL by default, with Vulkan optionally, across all GUI MFEK modules like this one.

That might fix this; in my tests so far it does. It also might not. But @jakeisnt the core GUI rendering has such large planned changes I don't think it's worth fixing this issue unless it's through the planned upgrade path. :-)

@eliheuer
Copy link
Contributor Author

I'm very happy to hear about egui_skia and the big changes to the GUI rendering. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code-quality Doesn't improve user experience, only makes the code better. dependencies Pull requests that update a dependency file help wanted Extra attention is needed low-priority macOS
Projects
None yet
Development

No branches or pull requests

4 participants