[Bug] Upload RGBA textures instead of RGB_888 — fixes Cogl texture crash (#20) - #21
Merged
Merged
Conversation
Clutter.Image.set_data was called with Cogl.PixelFormat.RGB_888 for pixbufs without alpha. Many GPU drivers / GLES backends cannot create 24-bit textures and abort fatally with "Failed to create texture 2d due to size/format constraints" (uncatchable Cogl g_error) -> core dump. - Add Utilities.ensureRGBA(): returns a 32-bit RGBA pixbuf (add_alpha when needed). - Route all four set_data sites (Icon, wallpaper, two in AssetActor) through it and always use Cogl.PixelFormat.RGBA_8888. - Remove dead null-deref branch in AssetActor.setAsset() (!assetVisible did pixbuf = null then pixbuf.get_pixels()). Known upstream crash: christianloopp#362, christianloopp#354/christianloopp#240. Fixes #20 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20.
Problem
Clutter.Image.set_datawas called withCogl.PixelFormat.RGB_888for any pixbuf without an alpha channel (icons,wallpaper.jpg, assets). 24-bit RGB_888 textures are unsupported by many GPU drivers/GLES backends, which raises a fatal Coglg_error— uncatchable, so it aborts the process. This is a long-standing Komorebi crash (christianloopp#362, christianloopp#354, christianloopp#240; same Cogl message in Cinnamon #4867 / RH#1645866).Fix
Always upload 32-bit RGBA:
Utilities.ensureRGBA()— returns the pixbuf if it already has alpha, elseadd_alpha().set_datasites now go through it and useCogl.PixelFormat.RGBA_8888:Icon.setIconBackgroundWindowwallpaper imageAssetActor(×2)AssetActor.setAsset()(!assetVisibledidpixbuf = nullthenpixbuf.get_pixels()).Verification
Static only (no Vala toolchain here): no
RGB_888left in code (only comments), braces balanced, all set_data sites useensureRGBA+ RGBA_8888. Please rebuild — this should clear the texture trap and launch the desktop.🤖 Generated with Claude Code