way-cooler / rust-wlc

[DEPRECATED] Rust bindings for wlc, the Wayland compositor library
54 stars 12 forks source link

Seg fault when running sample project #42

Closed munyari closed 8 years ago

munyari commented 8 years ago

When I run the sample project and open a new terminal window, the terminal window "melts away" and there is a segmentation fault.

wlc [Info] Activating tty
wlc [Info] WLC-1 Chose mode (0) 1920x1080
wlc [Info] EGL context is double buffered
wlc [Info] EGL version: 1.4 (DRI2)
wlc [Info] EGL vendor: Mesa Project
wlc [Info] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 OpenGL_ES3
wlc [Info] EGL context (RGB888)
wlc [Info] EGL_CHROMIUM_sync_control EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_KHR_create_context EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_NOK_swap_region EGL_NOK_texture_from_pixmap EGL_NV_post_sub_buffer EGL_WL_bind_wayland_display
wlc [Info] GL version: OpenGL ES 3.1 Mesa 11.2.2
wlc [Info] GL vendor: Intel Open Source Technology Center
wlc [Info] GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_OES_depth_texture_cube_map GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_separate_shader_objects GL_EXT_shader_integer_mix GL_EXT_draw_elements_base_vertex GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex GL_OES_texture_storage_multisample_2d_array GL_EXT_blend_func_extended GL_EXT_buffer_storage GL_EXT_shader_samples_identical
wlc [Info] GLES2 renderer initialized
wlc [Info] Set new bsurface to output (1)
wlc [Info] Added output (1)
wlc [Info] become active
wlc [Info] Xwayland started (DISPLAY :1)
wlc [Info] xfixes (5.0)
Unknown parameter: ?2004
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
wlc [Error] gles2: function shm_attach at line 541: glTexImage2D(0x0DE1, 0, gl_format, pitch, buffer->size.h, 0, gl_format, gl_pixel_type, data) == GL_INVALID_VALUE
sh: line 1:  3770 Segmentation fault      (core dumped) /usr/bin/weston-terminal
a
wlc [Info] Terminating wlc...
wlc [Info] Terminating compositor...
wlc [Info] Output (1) terminated...
wlc [Info] Removed bsurface from output (1)
wlc [Info] Removed output (1)
wlc [Info] Compositor terminated...
wlc [Info] Cleanup wlc
wlc [Info] Closing Xwayland
wlc [Info] Parent exit (3760)

Sys info: Linux 4.6.3-1 ARCH

See also https://github.com/Immington-Industries/way-cooler/issues/37

Timidger commented 8 years ago

Hmm, looks like gles2 is giving wlc a weird value. What version of gles2 do you have installed? Did you compile wlc yourself or did you use a package manager to install it? Does this happen with other terminal emulators or just weston-terminal? Try editing the "simple" example to use other terminals and see if they have the same issue.

munyari commented 8 years ago

Turns out it was a weston issue. Works fine with urxvt, and I can even launch chromium :smile: