After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 575142 - clutter-gtkmm: Unable to make the stage window 0x240001f the current GLX drawable
clutter-gtkmm: Unable to make the stage window 0x240001f the current GLX draw...
Status: RESOLVED OBSOLETE
Product: cluttermm
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: cluttermm-maint
cluttermm-maint
Depends on:
Blocks:
 
 
Reported: 2009-03-12 20:44 UTC by Maurice van der Pot
Modified: 2021-07-05 12:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main.cc (1.11 KB, text/x-c++src)
2009-03-19 11:10 UTC, Murray Cumming
Details

Description Maurice van der Pot 2009-03-12 20:44:28 UTC
The example code for embedding the stage in the cluttermm tutorial (1) is failing for me while the corresponding code in the clutter tutorial (2) succeeds.

1) http://www.openismus.com/documents/cluttermm_tutorial/0.9/docs/tutorial/html/sec-stage-widget.html
2) http://www.openismus.com/documents/clutter_tutorial/0.9/docs/tutorial/html/sec-stage-widget.html

Here's what happens when it fails:
ClutterX11-Message: [BACKEND] clutter-backend-x11.c:141: XOpenDisplay on `:0.0'
ClutterX11-Message: [BACKEND] clutter-backend-x11.c:168: Getting the X screen
ClutterX11-Message: [BACKEND] clutter-backend-x11.c:664: Not enabling XInput
ClutterX11-Message: [BACKEND] clutter-backend-x11.c:219: X Display `:0.0'[0x71fd50] opened (screen:0, root:163, dpi:101.346633)
Clutter-Message: [BACKEND] clutter-stage.c:803: Creating stage from the default backend
ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:474: Creating stage of type `ClutterStageGLX'
ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:489: GLX stage created (display:0x71fd50, screen:0, root:163)
ClutterGLX-Message: [MISC] clutter-stage-glx.c:118: Realizing main stage
ClutterGLX-Message: [MISC] clutter-stage-glx.c:160: Creating stage X window
ClutterGLX-Message: [GL] clutter-stage-glx.c:216: Creating GL Context
ClutterGLX-Message: [BACKEND] clutter-stage-glx.c:229: Marking stage as realized
ClutterX11-Message: [BACKEND] clutter-stage-x11.c:338: setting cursor state ('visible') over stage window (35651586)
Clutter-Message: [MULTISTAGE] clutter-backend.c:301: Setting the new stage [0x736000]
ClutterGLX-Message: [MULTISTAGE] clutter-backend-glx.c:382: Setting context for stage of type ClutterStageGLX [0x738030]
ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:414: MakeCurrent dpy: 0x71fd50, window: 0x2200002 (native), context: 0x737530
ClutterX11-Message: [EVENT] clutter-backend-x11.c:228: initialising the event loop
ClutterX11-Message: [EVENT] clutter-event-x11.c:172: Connection number: 3
Clutter-Message: [MISC] clutter-feature.c:84: checking features
Clutter-Message: [MISC] clutter-feature.c:88: allocating features data
ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:252: Checking features
GL_VENDOR: Mesa Project
GL_RENDERER: Software Rasterizer
GL_VERSION: 2.1 Mesa 7.2
GL_EXTENSIONS: GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_imaging 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_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression 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_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_logic_op GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_convolution GL_EXT_copy_texture GL_EXT_depth_bounds_test GL_EXT_draw_range_elements GL_EXT_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_fog_coord GL_EXT_gpu_program_parameters GL_EXT_histogram GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_pixels GL_EXT_paletted_texture GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_polygon_offset GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_shared_texture_palette GL_EXT_stencil_wrap GL_EXT_subtexture GL_EXT_texture GL_EXT_texture3D GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_vertex_array GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ATI_blend_equation_separate GL_ATI_texture_env_combine3 GL_ATI_texture_mirror_once GL_ATI_fragment_shader GL_ATI_separate_stencil GL_IBM_multimode_draw_arrays GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_INGR_blend_func_separate GL_MESA_pack_invert GL_MESA_program_debug GL_MESA_resize_buffers GL_MESA_texture_array GL_MESA_ycbcr_texture GL_MESA_window_pos GL_NV_blend_square GL_NV_fragment_program GL_NV_light_max_exponent GL_NV_point_sprite GL_NV_texture_rectangle GL_NV_texgen_reflection GL_NV_vertex_program GL_NV_vertex_program1_1 GL_OES_read_format GL_SGI_color_matrix GL_SGI_color_table GL_SGI_texture_color_table GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SGIX_shadow_ambient GL_SUN_multi_draw_arrays

ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:258: GLX Extensions: GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context GLX_EXT_visual_info GLX_EXT_visual_rating GLX_OML_swap_method GLX_SGIS_multisample GLX_SGIX_fbconfig 
ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:332: attempting DRI vblank setup
ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:336: DRI vblank setup success
ClutterGLX-Message: [MISC] clutter-backend-glx.c:352: backend features checked
Clutter-Message: [MISC] clutter-feature.c:103: features checked
Clutter-Message: [BACKEND] clutter-stage.c:803: Creating stage from the default backend
ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:474: Creating stage of type `ClutterStageGLX'
ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:489: GLX stage created (display:0x71fd50, screen:0, root:163)
ClutterGLX-Message: [MISC] clutter-stage-glx.c:118: Realizing main stage
ClutterGLX-Message: [MISC] clutter-stage-glx.c:160: Creating stage X window
ClutterGLX-Message: [BACKEND] clutter-stage-glx.c:229: Marking stage as realized
ClutterX11-Message: [BACKEND] clutter-stage-x11.c:338: setting cursor state ('visible') over stage window (35651591)
Clutter-Message: [MULTISTAGE] clutter-backend.c:301: Setting the new stage [0x7361c0]
ClutterGLX-Message: [MULTISTAGE] clutter-backend-glx.c:382: Setting context for stage of type ClutterStageGLX [0x738220]
ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:414: MakeCurrent dpy: 0x71fd50, window: 0x2200007 (native), context: 0x737530
ClutterGLX-Message: [BACKEND] clutter-stage-glx.c:66: Unrealizing stage
ClutterGLX-Message: [MISC] clutter-stage-glx.c:106: == mark ==
Clutter-Message: [MULTISTAGE] clutter-backend.c:297: Stage is not realized, unsetting
ClutterGLX-Message: [MULTISTAGE] clutter-backend-glx.c:366: Clearing all context
ClutterX11-Message: [BACKEND] clutter-stage-x11.c:721: Setting foreign window (0x240001f)
ClutterGLX-Message: [MISC] clutter-stage-glx.c:118: Realizing main stage
ClutterGLX-Message: [BACKEND] clutter-stage-glx.c:229: Marking stage as realized
ClutterX11-Message: [BACKEND] clutter-stage-x11.c:338: setting cursor state ('visible') over stage window (37748767)
Clutter-Message: [MULTISTAGE] clutter-backend.c:301: Setting the new stage [0x7361c0]
ClutterGLX-Message: [MULTISTAGE] clutter-backend-glx.c:382: Setting context for stage of type ClutterStageGLX [0x738220]
ClutterGLX-Message: [BACKEND] clutter-backend-glx.c:414: MakeCurrent dpy: 0x71fd50, window: 0x240001f (foreign), context: 0x737530

(./main2:28114): ClutterGLX-CRITICAL **: Unable to make the stage window 0x240001f the current GLX drawable
Clutter-Message: [SCHEDULER] 37843:clutter-main.c:188: Redraw start for stage:0x7361c0
Clutter-Message: [PAINT] clutter-main.c:189:  Redraw enter for stage:0x7361c0
<rest of the output cut off>

I'm using clutter, clutter-gtk, cluttermm and clutter-gtkmm from a relatively recent git and svn (right now HEAD is not building for me).
Comment 1 Maurice van der Pot 2009-03-14 19:09:58 UTC
I've asked two other people to try out the same application and it reported the same failure for them.

glXMakeCurrent seems to fail with error 10 (BadAccess). The docs say:

  BadAccess is generated if ctx was current to another thread at the time glXMakeCurrent was called.

I have no clue why this is happening.
Comment 2 Murray Cumming 2009-03-18 21:52:50 UTC
Is this with clutter(mm) 0.8 or 0.9?
Comment 3 Maurice van der Pot 2009-03-19 08:20:05 UTC
With both.
Comment 4 Murray Cumming 2009-03-19 10:46:55 UTC
Confirmed.

With clutter-gtkmm-0.8, I get just the one warning, though the example seems to work otherwise:
(./a.out:10272): ClutterGLX-CRITICAL **: Unable to make the stage window 0x4c00021 the current GLX drawable

I don't get the warning with the C example.

I have not tried it with 0.9 yet.
Comment 5 Murray Cumming 2009-03-19 10:48:56 UTC
This seems to be a problem only with clutter-gtkmm, not with clutterm in general.
Comment 6 Murray Cumming 2009-03-19 11:02:51 UTC
I see valgrind warnings, but I see the same warnings with the C example.

Note that the stage->reference() hack is unrelated. I have fixed and removed that in svn in clutter-gtkmm and cluttermm-tutorial for both 0.8 and 0.9. 
Comment 7 Murray Cumming 2009-03-19 11:10:10 UTC
Created attachment 130954 [details]
main.cc

Simplified test case.
Comment 8 Maurice van der Pot 2009-03-19 21:26:14 UTC
Could you check if clutter_x11_untrap_x_errors() returns 10 (BadAccess) on your system as well? I think it would make a lot more sense if it returned something else, like BadDrawable.
Comment 9 GNOME Infrastructure Team 2021-07-05 12:20:31 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/cluttermm/-/issues/

Thank you for your understanding and your help.