rounded-window-corners icon indicating copy to clipboard operation
rounded-window-corners copied to clipboard

Gnome 46.rc1 Crashes when enabling the extension

Open p0ryae opened this issue 11 months ago • 21 comments

Title says it. Had to disable validation by settings org.gnome.shell disable-extension-version-validation true to check, but as soon as the extension is enabled the whole desktop crashes, and any sort of login will lead to a crash.

I'm using Arch Linux (gnome-unstable mirror) with kernel version 6.8.1.

p0ryae avatar Mar 16 '24 18:03 p0ryae

I guess this is because of this. In src/effect/rounded_corners_effect.ts in method vfunc_build_pipeline an extension tries to get uniforms' locations. Before mutter's patch this worked fine, since cogl_pipeline_get_unfiorm_location used default context for every cogl_pipeline. I'm not entirely sure, since I'm not that experienced with C and can't really read mutter's code, but now each pipeline uses it's own context. At this function's call effect's pipeline isn't built yet, so there is no context, which results in SEGFAULT.

I don't know how to properly fix this, but if someone really needs these rounded corners, you can move this._init_uniforms () into update_uniforms() method. This will decrease performance a bit and idk if this would work for you, but my rounded corners are back.

garaevdi avatar Mar 23 '24 21:03 garaevdi

I guess this is because of this. In src/effect/rounded_corners_effect.ts in method vfunc_build_pipeline an extension tries to get uniforms' locations. Before mutter's patch this worked fine, since cogl_pipeline_get_unfiorm_location used default context for every cogl_pipeline. I'm not entirely sure, since I'm not that experienced with C and can't really read mutter's code, but now each pipeline uses it's own context. At this function's call effect's pipeline isn't built yet, so there is no context, which results in SEGFAULT.

I don't know how to properly fix this, but if someone really needs these rounded corners, you can move this._init_uniforms () into update_uniforms() method. This will decrease performance a bit and idk if this would work for you, but my rounded corners are back.

Wow. thanks. it working on my desktop.

prastowoagungwidodo avatar Mar 24 '24 08:03 prastowoagungwidodo

I guess this is because of this. In src/effect/rounded_corners_effect.ts in method vfunc_build_pipeline an extension tries to get uniforms' locations. Before mutter's patch this worked fine, since cogl_pipeline_get_unfiorm_location used default context for every cogl_pipeline. I'm not entirely sure, since I'm not that experienced with C and can't really read mutter's code, but now each pipeline uses it's own context. At this function's call effect's pipeline isn't built yet, so there is no context, which results in SEGFAULT.

I don't know how to properly fix this, but if someone really needs these rounded corners, you can move this._init_uniforms () into update_uniforms() method. This will decrease performance a bit and idk if this would work for you, but my rounded corners are back.

would you mind sharing your extensions, all your words that have been spoken say nothing to me but i need my crounded corners back badly

EisregenHaha avatar Mar 24 '24 20:03 EisregenHaha

would you mind sharing your extensions, all your words that have been spoken say nothing to me but i need my crounded corners back badly

Sure, here is my fork. Though I want to say one more time, that this isn't proper fix, more like a bandage. I noticed some fuzzy behavior with chomium/electron based apps, and I can't tell if it's because of this patch.

garaevdi avatar Mar 24 '24 20:03 garaevdi

would you mind sharing your extensions, all your words that have been spoken say nothing to me but i need my crounded corners back badly

Sure, here is my fork. Though I want to say one more time, that this isn't proper fix, more like a bandage. I noticed some fuzzy behavior with chomium/electron based apps, and I can't tell if it's because of this patch.

just saw the commit, didnt think its that easy. huge thanks though, idc if its a bandage as long as it works

EisregenHaha avatar Mar 24 '24 21:03 EisregenHaha

would you mind sharing your extensions, all your words that have been spoken say nothing to me but i need my crounded corners back badly

Sure, here is my fork. Though I want to say one more time, that this isn't proper fix, more like a bandage. I noticed some fuzzy behavior with chomium/electron based apps, and I can't tell if it's because of this patch.

just saw the commit, didnt think its that easy. huge thanks though, idc if its a bandage as long as it works

Hi there, could you be more specific as to how to make this work? Following the link to @garaevdi 's fork, I can't compile it and I get errors (will update when on my F40 computer). Thank you.

spxak1 avatar Apr 25 '24 06:04 spxak1

After this patch the extension does not work and gives me this error: SyntaxError: import declarations may only appear at top level of a module @ resource:///org/gnome/shell/misc/extensionUtils.js:4:0

l3ifk avatar Apr 28 '24 18:04 l3ifk

would you mind sharing your extensions, all your words that have been spoken say nothing to me but i need my crounded corners back badly

Sure, here is my fork. Though I want to say one more time, that this isn't proper fix, more like a bandage. I noticed some fuzzy behavior with chomium/electron based apps, and I can't tell if it's because of this patch.

just saw the commit, didnt think its that easy. huge thanks though, idc if its a bandage as long as it works

Hi there, could you be more specific as to how to make this work? Following the link to @garaevdi 's fork, I can't compile it and I get errors (will update when on my F40 computer). Thank you.

Did you manage to get it working?

l3ifk avatar Apr 28 '24 18:04 l3ifk

https://github.com/ByloTonix/fedora-workstation-afterinstall-notes/blob/main/rounded-window-corners.zip

I just used this with F40. It works fine.

spxak1 avatar Apr 28 '24 20:04 spxak1

Yes thanks it works now. I really like the rounded corners, but the bug that after waking from suspend switching workspaces with the keyboard shortcut or the touchpad gestures is broken, is just too big of a deal for me :/ I hope there will be a new possibility to get rounded corners soon...

l3ifk avatar Apr 29 '24 17:04 l3ifk

Yes thanks it works now. I really like the rounded corners, but the bug that after waking from suspend switching workspaces with the keyboard shortcut or the touchpad gestures is broken, is just too big of a deal for me :/ I hope there will be a new possibility to get rounded corners soon...

I have tested every single one of my (many) extensions to find what is causing this issue, and I have concluded it's blur-my-shell. I just tested it again. Has your testing pointed to the rounded windows corners?

Edit: More testing, it appears the it's the combination of rounded windows corners with blur-my-shell. If either is off, things work as they should.

spxak1 avatar Apr 29 '24 19:04 spxak1

Yes thanks it works now. I really like the rounded corners, but the bug that after waking from suspend switching workspaces with the keyboard shortcut or the touchpad gestures is broken, is just too big of a deal for me :/ I hope there will be a new possibility to get rounded corners soon...

I have tested every single one of my (many) extensions to find what is causing this issue, and I have concluded it's blur-my-shell. I just tested it again. Has your testing pointed to the rounded windows corners?

Edit: More testing, it appears the it's the combination of rounded windows corners with blur-my-shell. If either is off, things work as they should.

instresting that it is the combination of both. I love both of these extensions thats a bummer...

l3ifk avatar Apr 30 '24 05:04 l3ifk

I created a proper fix that doesn't fetch the uniforms every single time

https://github.com/flexagoon/rounded-window-corners

However, this doesn't seem to fix the blur-my-shell issue, so that must be related to something else.

flexagoon avatar May 02 '24 10:05 flexagoon

I have identified the source of the blur-my-shell bug, not sure how to fix it yet though. I'm trying to come up with a fix.

flexagoon avatar May 02 '24 11:05 flexagoon

nice! Glad to hear it's getting updates. Thank you for your work!

l3ifk avatar May 02 '24 12:05 l3ifk

The two extensions aren't getting disabled and enabled in the correct order, so a gnome function that they both override gets messed up.

From what I could find, this is not supposed to happen, and I also wasn't able to reproduce this by manually toggling them, so this may very well be an upstream gnome bug. I'll investigate further and create an issue in gnome if needed

flexagoon avatar May 02 '24 15:05 flexagoon

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7629

flexagoon avatar May 02 '24 16:05 flexagoon

I managed to fully identify the cause of the problem (see https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7629#note_2101174).

This should most likely be fixed on the Blur My Shell side. I'll try to come up with a fix and submit a PR. Until then, I made a temporary solution which fixes the issue:

https://github.com/flexagoon/rounded-window-corners/commit/99f201a5e43c88650c2b417a2efb3cfd0b9cb2e6

I don't see any bugs left with my fork, so feel free to use it. I'll submit it to EGO once the blur-my-shell issue is properly resolved (and unless @yilozt comes back by then)

flexagoon avatar May 03 '24 03:05 flexagoon

https://github.com/aunetx/blur-my-shell/pull/588

flexagoon avatar May 03 '24 04:05 flexagoon

Thank you that's so great! I can confirm with your edit it works again. Thank you!

l3ifk avatar May 03 '24 06:05 l3ifk

Sorry for this bug and thanks @flexagoon! Just merged this, it will be in next blur-my-shell update

aunetx avatar May 03 '24 12:05 aunetx