DiscussionsIssue archiveOCCT:Visualization

Archived issue #0025851

Visualization, TKOpenGl - do not use FBO cache when GLSL is unavailable

CommunityOCCT:Visualizationclosed8 public notes

Search issues

Description

since yesterday I got a little problem using the visualization in DRAWEXE
perhaps this is related to the fix to #0025091

Program received signal SIGSEGV, Segmentation fault.
0x00007fffea63d895 in OpenGl_VertexBuffer::Create (this=0xda37b0, theGlCtx=...)
    at occt/src/OpenGl/OpenGl_VertexBuffer.cxx:64
64	    theGlCtx->core15->glGenBuffers (1, &myBufferId);


version tested occt 6.8.1.dev-50b994e

Steps to reproduce

pload ALL
vinit


Requires OpenGL implementation with GL_ARB_framebuffer_object extension but with core functionality before OpenGL 2.0 (without GLSL and VBO).

Additional information

#0  0x00007fffea63d895 in OpenGl_VertexBuffer::Create (this=0xda37b0, 
    theGlCtx=...)
    at occt/src/OpenGl/OpenGl_VertexBuffer.cxx:64
#0000001  0x00007fffea63da1f in OpenGl_VertexBuffer::init (this=0xda37b0, 
    theGlCtx=..., theComponentsNb=4, theElemsNb=4, theData=0x7fffffffdad0, 
    theDataType=5126, theStride=16)
    at occt/src/OpenGl/OpenGl_VertexBuffer.cxx:121
#0000002  0x00007fffea60d0b1 in OpenGl_VertexBuffer::init (this=0xda37b0, 
    theGlCtx=..., theComponentsNb=4, theElemsNb=4, theData=0x7fffffffdad0, 
    theDataType=5126)
    at /occt/inc/OpenGl_VertexBuffer.hxx:264
#3  0x00007fffea635e0d in OpenGl_VertexBuffer::Init (this=0xda37b0, 
    theGlCtx=..., theComponentsNb=4, theElemsNb=4, theData=0x7fffffffdad0)
    at occt/inc/OpenGl_VertexBuffer.hxx:97
#4  0x00007fffea64a643 in OpenGl_Workspace::RedrawImmediate (this=0xda3540, 
    theCView=..., theCUnderLayer=..., theCOverLayer=..., theToForce=1, 
    theTargetFBO=0x0)
    at occt/src/OpenGl/OpenGl_Workspace.cxx:1037
#5  0x00007fffea649bf7 in OpenGl_Workspace::Redraw (this=0xda3540, 
    theCView=..., theCUnderLayer=..., theCOverLayer=...)
    at occt/src/OpenGl/OpenGl_Workspace.cxx:749
#6  0x00007fffea60031e in OpenGl_GraphicDriver::Redraw (this=0xa5d8b0, 
    ACView=..., ACUnderLayer=..., ACOverLayer=...)
    at occt/src/OpenGl/OpenGl_GraphicDriver_7.cxx:126
#0000007  0x00007fffed1c96b1 in Visual3d_View::Redraw (this=0xda2bf0, 
    theUnderLayer=..., theOverLayer=..., theX=0, theY=0, theWidth=0, 
    theHeight=0)
    at occt/src/Visual3d/Visual3d_View.cxx:1001
#0000008  0x00007fffed1c92f6 in Visual3d_View::Redraw (this=0xda2bf0)
    at occt/src/Visual3d/Visual3d_View.cxx:919
#0000009  0x00007fffed15dec4 in V3d_View::MustBeResized (this=0xda2880)
    at occt/src/V3d/V3d_View.cxx:492
#10 0x00007fffeabbfdc7 in VT_ProcessConfigure ()
    at occt/src/ViewerTest/ViewerTest_ViewerCommands.cxx:1560
#0000011 0x00007fffeabc0ccd in ViewerMainLoop (argc=0, argv=0x0)
    at occt/src/ViewerTest/ViewerTest_ViewerCommands.cxx:2223
#12 0x00007fffeabc178e in VProcessEvents ()
    at occt/src/ViewerTest/ViewerTest_ViewerCommands.cxx:2421

Public activity

8 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Sebastian, please give details on the graphic card and driver you are using.

Fix for #25091 is known to be not compatible with Mesa on 32-bit Windows (it just fails to compile shaders), while it works on all other configurations we have tested here (including 64-bit Mesa on Windows)
02Author
with the environment variable LIBGL_ALWAYS_INDIRECT=1 i can use DRAWEXE without the SEGFAULT.
However, unlike OpenGL problems i have seem so far, when the pointer dereferenciation happens inside the device driver or some OpenGL library, it happens right inside OCCT.
64 theGlCtx->core15->glGenBuffers (1, &myBufferId);
(gdb) p (*theGlCtx).core15
$1 = (OpenGl_GlCore15 *) 0x0
(gdb) p *theGlCtx
$2 = (OpenGl_Context &) @0xd5e650: {<Standard_Transient> = {
    _vptr.Standard_Transient = 0x7fffea8a3f30, count = 2}, core11 = 0xd22f30,
  core11fwd = 0xd22f30, core15 = 0x0, core15fwd = 0x0, core20 = 0x0,
  core20fwd = 0x0, core32 = 0x0, core32back = 0x0, core33 = 0x0,
  core33back = 0x0, core41 = 0x0, core41back = 0x0, core42 = 0x0,
  core42back = 0x0, core43 = 0x0, core43back = 0x0, core44 = 0x0,
  core44back = 0x0, caps = {<Handle_Standard_Transient> = {
      entity = 0xbef6f0}, <No data fields>}, hasHighp = 1, hasTexRGBA8 = 1,
  arbNPTW = 1, arbTexRG = 0, arbTexBindless = 0x0, arbTBO = 0x0,
  arbTboRGB32 = 0, arbIns = 0x0, arbDbg = 0x0, arbFBO = 0xd22f30,
  arbFBOBlit = 0xd22f30, extGS = 0x0, extBgra = 1, extAnis = 1, extPDS = 1,
  atiMem = 0, nvxMem = 0, myWindow = 58720258, myDisplay = 0xd0e940,
  myGContext = 0xd5f130, mySharedResources = {<Handle_Standard_Transient> = {

My graphics hardware is not really suitable. On this machine it relies on the Intel 945G chipset.

name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
    GLX_OML_swap_method, GLX_SGI_swap_control, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_create_context_es2_profile, GLX_MESA_copy_sub_buffer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control,
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read,
    GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_EXT_texture_from_pixmap, GLX_INTEL_swap_event
GLX version: 1.4
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control,
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read,
    GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_EXT_texture_from_pixmap
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) 945G
OpenGL version string: 1.4 Mesa 8.0.5
OpenGL extensions:
    GL_ARB_multisample, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_copy_texture,
    GL_EXT_polygon_offset, GL_EXT_subtexture, GL_EXT_texture_object,
    GL_EXT_vertex_array, GL_EXT_compiled_vertex_array, GL_EXT_texture,
    GL_EXT_texture3D, GL_IBM_rasterpos_clip, GL_ARB_point_parameters,
    GL_EXT_draw_range_elements, GL_EXT_packed_pixels, GL_EXT_point_parameters,
    GL_EXT_rescale_normal, GL_EXT_separate_specular_color,
    GL_EXT_texture_edge_clamp, GL_SGIS_generate_mipmap,
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
    GL_SGIS_texture_lod, GL_ARB_multitexture, GL_IBM_multimode_draw_arrays,
    GL_IBM_texture_mirrored_repeat, GL_3DFX_texture_compression_FXT1,
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add, GL_ARB_transpose_matrix,
    GL_EXT_blend_func_separate, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
    GL_EXT_secondary_color, GL_EXT_texture_env_add,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias,
    GL_INGR_blend_func_separate, GL_NV_blend_square, GL_NV_light_max_exponent,
    GL_NV_texgen_reflection, GL_NV_texture_env_combine4,
    GL_SUN_multi_draw_arrays, GL_ARB_texture_border_clamp,
    GL_ARB_texture_compression, GL_EXT_framebuffer_object,
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, GL_MESA_window_pos,
    GL_NV_packed_depth_stencil, GL_NV_texture_rectangle, GL_NV_vertex_program,
    GL_ARB_depth_texture, GL_ARB_shadow, GL_ARB_texture_env_combine,
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,
    GL_ARB_texture_mirrored_repeat, GL_ARB_window_pos,
    GL_EXT_stencil_two_side, GL_EXT_texture_cube_map, GL_NV_vertex_program1_1,
    GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object, GL_ARB_draw_buffers,
    GL_ARB_fragment_program, GL_ARB_fragment_shader, GL_ARB_shader_objects,
    GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ATI_draw_buffers,
    GL_ATI_texture_env_combine3, GL_EXT_shadow_funcs, GL_EXT_stencil_wrap,
    GL_MESA_pack_invert, GL_MESA_ycbcr_texture, GL_ARB_half_float_pixel,
    GL_ARB_point_sprite, GL_ARB_shading_language_100, GL_ARB_sync,
    GL_ARB_texture_non_power_of_two, GL_ARB_vertex_buffer_object,
    GL_ATI_blend_equation_separate, GL_EXT_blend_equation_separate,
    GL_OES_read_format, GL_ARB_pixel_buffer_object, GL_ARB_texture_rectangle,
    GL_EXT_pixel_buffer_object, GL_EXT_texture_rectangle,
    GL_ARB_framebuffer_object, GL_EXT_framebuffer_blit,
    GL_EXT_framebuffer_multisample, GL_EXT_packed_depth_stencil,
    GL_APPLE_object_purgeable, GL_ARB_vertex_array_object,
    GL_ATI_separate_stencil, GL_EXT_gpu_program_parameters, GL_OES_EGL_image,
    GL_ARB_copy_buffer, GL_ARB_map_buffer_range,
    GL_EXT_separate_shader_objects, GL_ARB_ES2_compatibility,
    GL_ARB_draw_elements_base_vertex, GL_ARB_explicit_attrib_location,
    GL_ARB_provoking_vertex, GL_ARB_sampler_objects, GL_EXT_provoking_vertex,
    GL_ARB_robustness
03Commenter 2
Branch [archived branch] has been created by Commenter 3.

[revision removed]


Detailed log of new commits:

Author: Commenter 3
Date: Fri Feb 20 20:01:46 2015 +0300

    0025851: Visualization, TKOpenGl - do not use FBO cache when GLSL is unavailable
04Commenter 3
Dear Author,

could you please check the patch in CR25851 on your system?

Notice that your GPU has quite poor capabilities nowadays and is almost useless for graphics - OCCT visualization will be able to work in very compatible mode on it.

05Author
the branch CR25851 fixes the problem
06Commenter 3
Dear Commenter 1,

please test the patch.
07Commenter 7
Dear Commenter 1,

Branch CR25851 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:
occt component:
   Linux: 18 (18 on master)
   Windows: 2 (2 on master)
products component:
   Linux: 11 (11 on master)
   Windows: 4 (4 on master)

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 91496422 / 91684820
Total CPU difference: 57629.94999999982 / 53741.12000000005

Testing on Windows:
Total MEMORY difference: 53069154 / 53074574
Total CPU difference: 34462.140625 / 34043.96875
08Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]