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

Segmentation Fault: Failed to compile shader with type 35632 #927

Closed
vikigenius opened this issue Nov 17, 2022 · 2 comments
Closed

Segmentation Fault: Failed to compile shader with type 35632 #927

vikigenius opened this issue Nov 17, 2022 · 2 comments

Comments

@vikigenius
Copy link

Platform

Void Linux (6.0.8_1)

GPU, drivers, and screen setup

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) UHD Graphics 620 (KBL GT2) (0x5917)
    Version: 22.1.7
    Accelerated: yes
    Video memory: 7716MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.1.7
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.1.7
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.1.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

picom version

v10

Diagnostics **Version:** v10

Extensions:

  • Shape: Yes
  • XRandR: Yes
  • Present: Present

Misc:

  • Use Overlay: Yes
  • Config file used: None

Drivers (inaccurate):

Intel

Backend: glx

  • Driver vendors:
  • GLX: Mesa Project and SGI
  • GL: Intel
  • GL renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
  • Accelerated: 1

Backend: egl

  • Driver vendors:
  • EGL: Mesa Project
  • EGL driver: iris
  • GL: Intel
  • GL renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)

Configuration:

Configuration file
# Thank you code_nomad: http://9m.no/ꪯ鵞

#################################
#
# Backend
#
#################################

# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";

#################################
#
# GLX backend
#
#################################

glx-no-stencil = true;
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;

# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
glx-no-rebind-pixmap = true;


# GLX backend: GLX buffer swap method we assume.
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
# undefined is the slowest and the safest, and the default value.
# copy is fastest, but may fail on some drivers,
# 2-6 are gradually slower but safer (6 is still faster than 0).
# Usually, double buffer means 2, triple buffer means 3.
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
# Useless with --glx-use-copysubbuffermesa.
# Partially breaks --resize-damage.
# Defaults to undefined.
use-damage = true;

#################################
#
# Shadows
#
#################################
# menu        = { shadow = false; };
popup_menu    = { shadow = false; opacity = 1 };
dropdown_menu = { shadow = false; opacity = 1 };
utility       = { shadow = false; };
dnd           = { shadow = false; };
dock          = { shadow = false; };
# Enabled client-side shadows on windows.
shadow = false;
# The blur radius for shadows. (default 12)
shadow-radius = 0;
# The left offset for shadows. (default -15)
shadow-offset-x = 2;
# The top offset for shadows. (default -15)
shadow-offset-y = 2;
# The translucency for shadows. (default .75)
shadow-opacity = 0.15;

# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;

# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
    "! name~=''",
    "name = 'Notification'",
    "name = 'Plank'",
    "name = 'Docky'",
    "name = 'Kupfer'",
    "name = 'xfce4-notifyd'",
    "name = 'rofi'",
    "name *= 'VLC'",
    "name *= 'compton'",
    "name *= 'Chromium'",
    "name *= 'Chrome'",
    "class_g = 'Conky'",
    "class_g = 'Kupfer'",
    "class_g = 'Synapse'",
    "class_g ?= 'Notify-osd'",
    "class_g ?= 'Cairo-dock'",
    "class_g ?= 'Xfce4-notifyd'",
    "class_g ?= 'Xfce4-power-manager'",
    "_GTK_FRAME_EXTENTS@:c"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = true;

#################################
#
# Opacity
#
#################################

inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;

# Dim inactive windows. (0.0 - 1.0)
# inactive-dim = 0.2;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
# blur-background = true;
# Blur background of opaque windows with transparent frames as well.
# blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = false;
blur-background-exclude = [
    "window_type = 'dock'",
    "window_type = 'desktop'"
];

#################################
#
# Fading
#
#################################

# Fade windows during opacity changes.
fading = true;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 4;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
no-fading-openclose = true;

# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];

#################################
#
# Other
#
#################################

# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;

# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;

# Specify refresh rate of the screen.
# If not specified or 0, compton will try detecting this with X RandR extension.
# refresh-rate = 75;

# Set VSync method. VSync methods currently available:
# none: No VSync
# drm: VSync with DRM_IOCTL_WAIT_VBLANK. May only work on some drivers.
# opengl: Try to VSync with SGI_video_sync OpenGL extension. Only work on some drivers.
# opengl-oml: Try to VSync with OML_sync_control OpenGL extension. Only work on some drivers.
# opengl-swc: Try to VSync with SGI_swap_control OpenGL extension. Only work on some drivers. Works only with GLX backend. Known to be most effective on many drivers. Does not actually control paint timing, only buffer swap is affected, so it doesn’t have the effect of --sw-opti unlike other methods. Experimental.
# opengl-mswc: Try to VSync with MESA_swap_control OpenGL extension. Basically the same as opengl-swc above, except the extension we use.
# (Note some VSync methods may not be enabled at compile time.)
vsync = true;

# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;

# Limit compton to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
# sw-opti = true;

# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
# paint-on-overlay may make the flickering less obvious.
unredir-if-possible = true;

# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ ];

# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;

#################################
#
# Window type settings
#
#################################

wintypes:
{
    tooltip =
    {
        # fade: Fade the particular type of windows.
        fade = true;
        # shadow: Give those windows shadow
        shadow = false;
        # opacity: Default opacity for the type of windows.
        opacity = 0.85;
        # focus: Whether to always consider windows of this type focused.
        focus = true;
    };
};

#################################
#
# Opacity settings
#
#################################

# The first rule is used to make hidden windows fully transparent
opacity-rule = [
  "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];

Steps of reproduction

  1. Start Picom
  2. Picom crashes with segfault

Expected behavior

Picom should not crash

Current Behavior

Picom crashes

Stack trace

Here is the relevant logs displaying the error

[ 11/17/2022 14:29:50.736 redirect_start DEBUG ] Redirecting the screen.
[ 11/17/2022 14:29:50.795 glx_has_extension INFO ] Found GLX extension GLX_SGI_video_sync.
[ 11/17/2022 14:29:50.795 glx_has_extension INFO ] Missing GLX extension GLX_SGI_swap_control.
[ 11/17/2022 14:29:50.795 glx_has_extension INFO ] Found GLX extension GLX_OML_sync_control.
[ 11/17/2022 14:29:50.795 glx_has_extension INFO ] Found GLX extension GLX_MESA_swap_control.
[ 11/17/2022 14:29:50.795 glx_has_extension INFO ] Found GLX extension GLX_EXT_swap_control.
[ 11/17/2022 14:29:50.795 glx_has_extension INFO ] Found GLX extension GLX_EXT_texture_from_pixmap.
[ 11/17/2022 14:29:50.795 glx_has_extension INFO ] Found GLX extension GLX_ARB_create_context.
[ 11/17/2022 14:29:50.795 glx_has_extension INFO ] Found GLX extension GLX_EXT_buffer_age.
[ 11/17/2022 14:29:50.795 glx_has_extension INFO ] Missing GLX extension GLX_ARB_create_context_robustness.
[ 11/17/2022 14:29:50.795 glx_has_extension INFO ] Found GLX extension GLX_MESA_query_renderer.
[ 11/17/2022 14:29:50.814 glGetUniformLocationChecked INFO ] Failed to get location of uniform 'time'. This is normal when using custom shaders.
[ 11/17/2022 14:29:50.816 gl_has_extension INFO ] Missing GL extension GL_GREMEDY_string_marker.
[ 11/17/2022 14:29:50.816 gl_init DEBUG ] GL_VENDOR = Intel
[ 11/17/2022 14:29:50.817 gl_create_shader ERROR ] Failed to compile shader with type 35632: 0:3(234): error: `nan' undeclared
0:3(233): error: operands to arithmetic operators must be numeric
0:3(227): error: cannot construct `float' from a non-numeric data type
0:3(287): error: `nan' undeclared
0:3(286): error: operands to arithmetic operators must be numeric
0:3(278): error: cannot construct `vec2' from a non-numeric data type
0:3(265): error: operands to arithmetic operators must be numeric
0:3(260): error: operands to arithmetic operators must be numeric
0:3(241): error: no matching function for call to `texture2D(sampler2D, error)'; candidates are:
0:3(241): error:    vec4 texture2D(sampler2D, vec2)
0:3(241): error:    vec4 texture2D(sampler2D, vec2, float)
0:3(227): error: operands to arithmetic operators must be numeric
0:3(319): error: `nan' undeclared
0:3(318): error: operands to arithmetic operators must be numeric
0:3(312): error: cannot construct `float' from a non-numeric data type
0:3(306): error: operands to arithmetic operators must be numeric
0:3(306): error: operands to arithmetic operators must be numeric
0:3(306): error: operands to arithmetic operators must be numeric
[ 11/17/2022 14:29:50.817 gl_create_kernel_blur_context ERROR ] Failed to create GLSL program.
[1]    4524 segmentation fault  picom -c --show-all-xerrors --config ~/.config/picom/config

OpenGL trace

Other details

@vikigenius
Copy link
Author

Obviously switching from glx backend to xrender works. But I want to get glx working

@yshui
Copy link
Owner

yshui commented Nov 17, 2022

The shader interface changed, see changelog: https://github.com/yshui/picom/releases/tag/v10-rc1

Disregard above comment.

The new shadow code can't handle shadow-radius = 0

@yshui yshui closed this as completed in e61b3ea Nov 17, 2022
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Nov 23, 2022
https://build.opensuse.org/request/show/1037427
by user mia + dimstar_suse
- Update to version 10.1
Fixes:
  * A GL texture leak, related to
    gh#yshui/picom#892
  * A crash when shadow radius is set to 0
    gh#yshui/picom#927
  * An undefined symbol error
    gh#yshui/picom#932
FT-Labs pushed a commit to FT-Labs/picom that referenced this issue Jan 23, 2023
Fixes yshui#927

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
FT-Labs pushed a commit to FT-Labs/picom that referenced this issue Jan 23, 2023
Fixes yshui#927

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants