Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Ubuntu] window.create crashes the application  (Read 1909 times)

0 Members and 1 Guest are viewing this topic.

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
[Ubuntu] window.create crashes the application
« on: August 28, 2015, 03:30:19 pm »
When calling window.create, I get an X11-crash on my Ubuntu
    // using this causes a crash:
    sf::VideoMode videoMode(m_config.get<unsigned int>("ResolutionX"), m_config.get<unsigned int>("ResolutionY"));
    // this works:
    // sf::VideoMode videoMode(m_config.get<unsigned int>("ResolutionX"), m_config.get<unsigned int>("ResolutionY"), 16);
    sf::ContextSettings settings = sf::ContextSettings(24, 8, 0);
    m_screen.create(videoMode, m_windowTitle, m_fullscreen ? sf::Style::Fullscreen : sf::Style::Default, settings);

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  3 (X_GetWindowAttributes)
  Resource id in failed request:  0x320002d
  Serial number of failed request:  37438
  Current serial number in output stream:  37439

By explicitely specifying 16 bits in the video-mode, all is fine. Not specifying a bit-depth causes the application to crash with the above error.
« Last Edit: August 28, 2015, 03:57:13 pm by BlueCobold »

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1404
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: [Ubuntu] window.create crashes the application
« Reply #1 on: August 28, 2015, 04:27:50 pm »
What version of SFML?

What is the output of glxinfo?
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Ubuntu] window.create crashes the application
« Reply #2 on: August 28, 2015, 05:24:18 pm »
Latest git revision.

glxinfo:
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: Parallels Inc
server glx version string: 1.4
server glx extensions:
    GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig
client glx vendor string: Parallels Inc
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig
GLX version: 1.4
GLX extensions:
    GLX_ARB_get_proc_address, GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig
OpenGL vendor string: Parallels and NVIDIA Corporation
OpenGL renderer string: Parallels using NVIDIA GeForce GT 750M OpenGL Engine
OpenGL version string: 2.1 NVIDIA-10.4.2 310.41.35f01
OpenGL shading language version string: 1.20
OpenGL extensions:
    GL_ARB_color_buffer_float, GL_ARB_depth_texture, GL_ARB_draw_buffers,
    GL_ARB_fragment_program, GL_ARB_fragment_program_shadow,
    GL_ARB_fragment_shader, GL_ARB_framebuffer_object,
    GL_ARB_half_float_pixel, GL_ARB_half_float_vertex, GL_ARB_imaging,
    GL_ARB_map_buffer_range, GL_ARB_multisample, GL_ARB_multitexture,
    GL_ARB_occlusion_query, GL_ARB_pixel_buffer_object,
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shader_objects,
    GL_ARB_shader_texture_lod, GL_ARB_shading_language_100, GL_ARB_shadow,
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression,
    GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map,
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,
    GL_ARB_texture_float, GL_ARB_texture_mirrored_repeat,
    GL_ARB_texture_non_power_of_two, GL_ARB_texture_rectangle,
    GL_ARB_texture_rg, GL_ARB_transpose_matrix, GL_ARB_vertex_blend,
    GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader,
    GL_ARB_window_pos, GL_ATI_separate_stencil, GL_ATI_texture_env_combine3,
    GL_ATI_texture_float, GL_ATI_texture_mirror_once, GL_EXT_abgr,
    GL_EXT_bgra, GL_EXT_bindable_uniform, GL_EXT_blend_color,
    GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
    GL_EXT_depth_bounds_test, GL_EXT_draw_buffers2,
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_blit,
    GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_object,
    GL_EXT_framebuffer_sRGB, GL_EXT_geometry_shader4,
    GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays,
    GL_EXT_packed_depth_stencil, GL_EXT_packed_float, GL_EXT_provoking_vertex,
    GL_EXT_rescale_normal, GL_EXT_secondary_color,
    GL_EXT_separate_specular_color, GL_EXT_shadow_funcs,
    GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, GL_EXT_texture3D,
    GL_EXT_texture_array, GL_EXT_texture_compression_dxt1,
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_edge_clamp,
    GL_EXT_texture_env_add, GL_EXT_texture_env_combine,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_integer,
    GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp,
    GL_EXT_texture_rectangle, GL_EXT_texture_sRGB,
    GL_EXT_texture_shared_exponent, GL_EXT_vertex_array_bgra,
    GL_NV_blend_square, GL_NV_depth_clamp, GL_NV_fog_distance,
    GL_NV_fragment_program2, GL_NV_fragment_program_option,
    GL_NV_light_max_exponent, GL_NV_multisample_filter_hint,
    GL_NV_point_sprite, GL_NV_texgen_reflection, GL_NV_texture_rectangle,
    GL_NV_vertex_program2_option, GL_NV_vertex_program3,
    GL_SGIS_generate_mipmap, GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod

2 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x021 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x041 32 tc  1  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None

8 GLXFBConfigs:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x042 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x043 24 tc  1  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x044 32 tc  1  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x045 32 dc  1  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x046 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x047 24 tc  1  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x048 32 tc  1  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x049 32 dc  1  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1404
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: [Ubuntu] window.create crashes the application
« Reply #3 on: August 28, 2015, 06:06:41 pm »
This doesn't even make sense. According to your glxinfo, 16-bit depth isn't even available. Not specifying any bit depth defaults to 32-bit which is available on your system according to glxinfo. Something else must be completely broken, and judging from the number of valid configurations, I have a feeling that the Parallels people didn't give much effort with their GPU emulation.

I don't know what else we can do. SFML doesn't support virtualization environments that are so limited. You should try to develop and test in another more feature complete environment.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Ubuntu] window.create crashes the application
« Reply #4 on: August 28, 2015, 06:28:32 pm »
I see, but as other applications don't crash with it, it sounds quite odd. I'd understand if creation simply failed, but it crashes, which really shouldn't happen.

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Ubuntu] window.create crashes the application
« Reply #5 on: September 02, 2015, 02:27:58 pm »
Btw, it also works with 24 and that is also what "sf::VideoMode::getDesktopMode()" returns. So it looks like SFML tries to use 32 bits which is maybe available in general, but not logical or even incompatible based on what the desktop uses. As far as I can see, the same problem is being reported for the Raspberry PI. So maybe a fix should be made in general for that issue.

In the meantime I changed all my code to explicitely pass the desktop-mode-bitdepth when creating a non-fullscreen-window. Still, that imo is an issue that should be fixed by SFML.
« Last Edit: September 02, 2015, 02:55:49 pm by BlueCobold »

 

anything