NVIDIA / egl-wayland

The EGLStream-based Wayland external platform
MIT License
275 stars 43 forks source link

Destroy all created wayland object in terminateDisplay #74

Closed Molytho closed 1 year ago

Molytho commented 1 year ago

These object are created but never destroyed. When the library is unload this leaves dangling pointers in libwayland-client leading to things like: https://bugzilla.mozilla.org/show_bug.cgi?id=1759315

erik-kz commented 1 year ago

Thank you very much for catching this bug, and for sharing a fix. Austin's recent change 7af7082eac2170da66990edda2ca73a221e2086e should already resolve the issue with zwp_linux_dmabuf_v1, but we definitely should also be destroying the wl_eglstream_controller interface. Could you please update the patch to remove the now-duplicated part...

       if (display->wlDmaBuf) {
            zwp_linux_dmabuf_v1_destroy(display->wlDmaBuf);
            display->wlDmaBuf = NULL;
        }
erik-kz commented 1 year ago

Thanks, just need to get a +1 from another NVIDIA engineer and then I will merge.

ezkha commented 1 year ago

We would appreciate a new release of egl-wayland, because this bug, is still present in latest 1.1.11.

We still have the Bugzilla #1759315, as you already know. It's already fixed on things like Arch Linux btw, but I can't use the Arch patch because of reasons.

I think this is the place to ask. Sorry if I'm wrong. Meanwhile I'll try to build from git master if I can make that one third-party tool work with it.

TLATER commented 1 year ago

Really would appreciate a release for this. Firefox is completely unable to run webgl because of this, so lots of websites are flat out broken.

I was hoping a release would have been around by now, given your previous release schedule seemed to include May occasionally - what cadence should we expect?

erik-kz commented 1 year ago

Why does a warning break WebGL? That seems like an problem with Firefox.

Anyway, I'm planning to cut a new release to coincide with the 535 driver release at the end of the month.

TLATER commented 1 year ago

Why does a warning break WebGL? That seems like an problem with Firefox.

Aiui, the ticket linked in the original comment exists because Firefox' graphics hardware detection routine crashes, and somehow that is related to this. Since it crashes, Firefox doesn't know what graphics hardware is available, and hence it can't run webGL (or most other hardware acceleration for that matter, my poor CPU is just doing its best instead).

Downstream has decided to close that ticket because this PR apparently fixed the problem.

That said, I don't intricately know either codebase. If this is really just a warning I'd not be surprised if it's a much uglier downstream bug rearing its head. I didn't really enjoy the previous fix either. But resources are scarce for wayland+nvidia use cases, so I'll take hopefully being able to use my browser again.

Anyway, I'm planning to cut a new release to coincide with the 535 driver release at the end of the month.

Thanks! Sorry for hassling you with what appears to be downstream struggles, but Firefox has been broken for a year now, and I was considering pushing a patched version of egl-wayland to my distro if this was going to take much longer - the next release cycle is coming up. It's annoying when inexperienced users get exposed to these kinds of issues and turned away from the platform.