Git Product home page Git Product logo

Comments (7)

ids1024 avatar ids1024 commented on June 25, 2024

Hm, interesting, on Nvidia I don't see most of the applets rendering to begin with (I think everything should be up to date on this computer...), but clicking on something like the clock does bring up a popup. And I'm able to get a similar SIGSEGV.

We'll want to work on the best way to handle debugging and logging, especially when we'll be dealing with issues on end user systems, but for further detail on this sort of issue, it's possible to run cosmic-panel manually, in gdb, and get a backtrace for the segfault.

I see it segfault somewhere in the C code invoked by WlEglSurface::drop, apparently being invoked as a result of self.popups.retain_mut().

from cosmic-panel.

wash2 avatar wash2 commented on June 25, 2024

Ya, I've been trying to work on a fix for this, but I haven't got it figured out. It's the main blocker for merging the 0.30 refactor for applet host that i've been working on :(

from cosmic-panel.

n3m0-22 avatar n3m0-22 commented on June 25, 2024

I'm seeing this issue too. If I run cosmic-panel after it crashes and then click on something to crash it again it get this output.

cosmic-panel.txt

from cosmic-panel.

ids1024 avatar ids1024 commented on June 25, 2024

Okay, I think I see what's causing the segfault.

I seem to be able to fix it by calling self.egl_surface.take() in WrapperPopup::drop, ensuring the EGLSurface is freed before the WlSurface is. This isn't quite the correct solution though, since self.egl_surface contains an Rc.

EGLSurface contains a Box<dyn EGLNativeSurface + Send + 'static>. The native surface here in ClientEglSurface defined in xdg-shell-wrapper, Which contains the WlEglSurface as a member. struct wl_egl_window contains a struct wl_surface *surface member.

So it's no surprise if wl_egl_window_destroy ends up segfaulting if the wl_surface has already been destroyed and the pointer is invalid.

I'm not sure if this should be regarded as an issue in the wayland-egl crate, or in xdg-shell-wrapper, but one way or another ClientEglSurface should probably hold a reference to the WlSurface and ensure it isn't freed until after the EglSurface is destroyed.

In addition to the segfault, is everyone else seeing the issue where only the first applet in the panel is rendered, or is that somehow more specific to my system? I guess it's creating more than one EglSurface from one WlSurface, and for some reason only the first is rendering properly on Nvidia?

from cosmic-panel.

wash2 avatar wash2 commented on June 25, 2024

Ok thanks, I'll look into fixing that as you've suggested :)

In addition to the segfault, is everyone else seeing the issue where only the first applet in the panel is rendered, or is that somehow more specific to my system? I guess it's creating more than one EglSurface from one WlSurface, and for some reason only the first is rendering properly on Nvidia?

Personally, I don't have that issue, and every applet seems to be rendered, but there are issues with swapping buffers that seems specific to nvidia. If I swap with None, it renders correctly for applets and popups, otherwise it only renders correctly a few times, then appears to stop rendering.

from cosmic-panel.

ids1024 avatar ids1024 commented on June 25, 2024

Opened #13 about that issue.

from cosmic-panel.

wash2 avatar wash2 commented on June 25, 2024

I think this should be fixed now and can be closed?

from cosmic-panel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.