You are not logged in.

#1 2013-01-09 07:06:15

rnarch
Member
Registered: 2012-03-17
Posts: 292

"Exception EAccessViolation: Access violation"- view3dscene [solved]

I downloaded view3dscene (from http://castle-engine.sourceforge.net/view3dscene.php ) and tried to run view3dscene application (binary provided). On one system with Archlinux, it runs very well. However, on another system with Archlinux it opens for fraction of a second and then crashes with following error:

view3dscene: Exception EAccessViolation : 
Access violation

I tried to google on this topic and found that it indicates that the program is trying to access forbidden parts of memory. However, the solutions are not clear.

Although view3dscene-svn is available in AUR ( https://aur.archlinux.org/packages.php?ID=22782 ), it needs fpc to be installed. If I can have the binary working (as it is doing on the other computer) it would be good.

Please suggest. Thanks for your help.

Last edited by rnarch (2013-03-22 03:24:00)

Offline

#2 2013-01-10 00:40:42

michalis.kambi
Member
Registered: 2013-01-10
Posts: 6

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

Hi, I'm Michalis --- the author of view3dscene. I just found your post through google alerts smile

Mind you: I don't use Archlinux (I usually use Debian), but hopefully I can help anyway.

1. We're getting very close (this weekend probably) to a new release of view3dscene, that has a lot of improvements and fixes. Can you check is the error possibly fixed already? If you don't want to download code from SVN and compile yourself, you can just grab the latest binary from our snapshots: http://michalis.ii.uni.wroc.pl/castle-engine-snapshots/

2. "Access violation" is equivalent to "Segmentation fault", it can mean many things, including bad memory accesses inside libraries (outside of view3dscene code). So there is no universal solution/workaround for this type of bug.

One of the possible causes of this is buggy/badly installed OpenGL. Especially if the same view3dscene binary works on one Archlinux, and fails on another Archlinux, this may mean that your OpenGL installation on the other Archlinux is bad. To confirm, can you try running any other OpenGL program on your system, like glxgears? glxgears is probably inside a package like mesa-apps or mesa-demos (sorry for not being more specific, like I said --- I don't use Archlinux, hopefully you already know how to find glxgears yourself, or others on this forum can help). If glxgears fails too, then you should install OpenGL on your system correctly. Again, others (and google) may help you more here, all I know is how to do it on Debian and derivatives (which boils down to making sure you have correct xorg-xxx packages installed, and for proprietary drivers installing a specific package and activating it by module-assistant or dkms or other means).

If the OpenGL works correctly, but view3dscene still fails, I'll need more information:
1. I assume this happens even without supplying any 3D model filename on command-line?
2. Can you run view3dscene from command-line with --debug-log option, like "view3dscene --debug-log > log.txt", and show the resulting log?
3. Do you have any specific configuration? What are the contents of your ~/.view3dscene.conf and/or ~/.config/view3dscene/view3dscene.conf ? Does deleting these files (or renaming to temp names) help?

Offline

#3 2013-01-10 01:20:49

rnarch
Member
Registered: 2012-03-17
Posts: 292

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

Congratulations on creating a very nice application. What I like about it is that
* it is a standalone portable application
* it is small with few files
* binaries are provided which work in all linux distros with no special installation
* viewing the models are really easy with mouse, shift and control keys (for rotation, sideways and depth movements)
I have just started using it and there must be many other good features also. I hope you keep these in your new version (I look forward to trying it). If the new version is much different from this, I hope you keep this version also available.

Regarding my problem, the response to your questions are:
* glxgears works well on my system. The rate is about 1063 FPS.
* the problem occurs even without supplying any argument to ./viewerlite command
* I do not have any ~/.view3dscene.conf and/or ~/.config/view3dscene/view3dscene.conf
* the log file generated is as follows:

Log for "view3dscene", version 3.11.0. Started on 2013-01-10 at 00:51:07.
-------------------- Shapes tree begin
TShapeTreeGroup
-------------------- Shapes tree end
-------------------- OpenGL context initialization begin
OpenGL information (detected by view3dscene):

--------
Version:
  Version string: 3.0 Mesa 9.0.1
  Version parsed: major: 3, minor: 0, release exists: FALSE, release: 0, vendor-specific version: "Mesa 9.0.1"
  Vendor: nouveau
  Renderer: Gallium 0.4 on NVA8
  Vendor NVidia: FALSE
  Vendor Mesa: TRUE (Mesa parsed version major: 9, minor: 0, release: 1)
  Vendor ATI: FALSE (fglrx: FALSE)

  Buggy glPushAttrib(GL_POINT_SET): FALSE
  Buggy glDrawPixels for odd widths: FALSE
  Buggy glGenerateMipmapEXT: FALSE
  Buggy GL_LIGHT_MODEL_TWO_SIDE: FALSE
  Buggy VBO: FALSE
  Buggy shader shadow map: FALSE

------------------------
Real versions available:
(checks both version string and actual functions availability in GL library, to secure from buggy OpenGL implementations)

  1.2: TRUE
  1.3: TRUE
  1.4: TRUE
  1.5: TRUE
  2.0: TRUE
  2.1: TRUE
  3.0: TRUE
  3.1: FALSE
  3.2: FALSE
  3.3: FALSE
  4.0: FALSE

---------
Features:
  GLSL shaders support: Standard
  Assembly ARB vertex program support: Extension
  Assembly ARB fragment program support: Extension
  Multi-texturing: TRUE
  Framebuffer Object: Standard (or ARB "core extension")
  Vertex Buffer Object: TRUE
  GenerateMipmap available: TRUE
  S3TC compressed textures: FALSE
  3D textures: Standard

  All 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_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat 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_ARB_depth_texture GL_ARB_occlusion_query 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_depth_clamp GL_NV_fog_distance 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_ATI_texture_float GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 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_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_ATI_texture_compression_3dc GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_rgtc GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_ATI_texture_mirror_once GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_texture_array GL_EXT_texture_compression_latc GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_MESA_texture_array GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_separate_shader_objects GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_conservative_depth GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility GL_ARB_blend_func_extended GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_shader_texture_lod GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_NV_texture_barrier GL_ARB_robustness GL_ARB_shader_bit_encoding GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_base_instance GL_ARB_conservative_depth GL_ARB_texture_storage GL_ARB_transform_feedback_instanced GL_EXT_transform_feedback GL_ARB_invalidate_subdata 

-----------------------------
OpenGL utility (GLU) version:
  Version string: 1.3
  Version parsed: major: 1, minor: 3, release exists: FALSE, release: 0, vendor-specific version: ""
  Extensions: GLU_EXT_nurbs_tessellator GLU_EXT_object_space_tess 

---------------------------
Current buffers bit depths:
  Color (red / greeen / blue / alpha): 8 / 8 / 8 / 0
  Depth: 24
  Index: 0
  Stencil: 8
  Accumulation (red / greeen / blue / alpha): 0 / 0 / 0 / 0
  Double buffer: TRUE
  Multisampling (full-screen antialiasing):
    Sample buffers: FALSE
    Samples: 0

-------------
Stack depths:
  Attributes: 16
  Client attributes: 16
  Modelview: 32
  Projection: 32
  Texture: 10
  Name: 64

-------
Limits:
  Max clip planes: 8
  Max eval order: 30
  Max lights: 8
  Max list nesting: 64
  Max pixel map table: 256
  Max texture size: 8192
  Max viewport dims: width 8192 / height 8192
  Max texture units: 8
  Max cube map texture size: 8192
  Max 3d texture size: 2048
  Max rectangle texture size: 8192
  Max texture max anisotropy: 16
  Query counter bits (for occlusion query): 64
  Max renderbuffer size: 8192
-------------------- OpenGL context initialization end
-------------------- Shadow volumes initialization begin
GL_INCR/DECR_WRAP_EXT available: TRUE
Two-sided stencil test available: TRUE
-------------------- Shadow volumes initialization end
-------------------- Shapes tree begin
TShapeTreeGroup
-------------------- Shapes tree end
Renderer: Preparing rendering of all shapes

I downloaded and tried your new version but that is also giving the same error.

Thanks for your help.

Last edited by rnarch (2013-01-10 03:47:47)

Offline

#4 2013-01-10 07:06:28

michalis.kambi
Member
Registered: 2013-01-10
Posts: 6

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

Congratulations on creating a very nice application.

Thanks smile The new version has all the old features and more, with many new things and improvements (details are in change log on http://castle-engine.sourceforge.net/news.php ). And if you like navigating with mouse, new version includes also comfortable mouse navigation in Walk/Fly modes.

As for the Access Violation bug:

Vendor: nouveau

This is almost certainly the cause. 'nouveau' drivers are unfortunately quite unstable (for now) for 3D rendering. It's also mentioned on Archlinux wiki, https://wiki.archlinux.org/index.php/Nouveau , "The DRI driver is experimental...".

Also the fact that log stops right after "Renderer: Preparing rendering of all shapes", without any more messages, confirms that it's (most likely) a segfault in the OpenGL implementation, since "preparing shapes" means preparing the OpenGL renderer, including some initial state.

1. An easiest solution is to use proprietary NVIDIA driver ( https://wiki.archlinux.org/index.php/NVIDIA ). It pains me to suggest the proprietary driver, but the fact is that the proprietary NVIDIA drivers under Linux work quite perfectly since a long time. While open-source nouveau still has some way to go (at least for 3D hardware-accelerated rendering; for 2D it's great).

2. The problem possibly could be workarounded inside view3dscene. But this requires playing and testing various code versions. I don't have access to a system with even barely working 'nouveau' driver, so I can't do it (at least not for now).

If you or anyone else is interested, the problematic code is probably inside TCastleScene.PrepareResources method, most probably inside TGLRenderer.RenderCleanState. It needs testing to see which command causes segfault (remembering that things may be delayed within OpenGL, so the only sure way is just to comment out stuff until segfault stops happening). When the guilty command is identified, it can be workarounded to not be called (at lest for this driver version, in GLVersion variable).

A worthwhile test may be to set some environment variables to make Mesa output more debug info:

export LIBGL_DEBUG=verbose
export MESA_DEBUG=1
view3dcene ... # run view3dcene in the same shell

Possibly this will show something useful and will allow me to guess the workaround.

Anyway, the easiest solution will probably remain to use proprietary NVidia driver.

Offline

#5 2013-01-10 07:44:51

rnarch
Member
Registered: 2012-03-17
Posts: 292

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

Thanks for the explanation.  But I have nouveau installed on Debian-Testing system (dual boot on same computer) and view3dscene works very well on that.

Last edited by rnarch (2013-01-10 08:30:18)

Offline

#6 2013-01-11 03:38:22

michalis.kambi
Member
Registered: 2013-01-10
Posts: 6

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

rnarch wrote:

Thanks for the explanation.  But I have nouveau installed on Debian-Testing system (dual boot on same computer) and view3dscene works very well on that.

1. What is the OpenGL version and vendor reported under Debian? I'm particularly interested in these lines:

  Version string: xxx
  Version parsed: xxx
  Vendor: xxx
  Renderer: xxx

You can see them in the log by --debug-log, or using "Help -> OpenGL information" menu item (the menu item will both show it and print to console, to make it easy to copy the report to clipboard).

2. Ok, so let's try to make sure that it is / is not a segfault from OpenGL smile

2.1. Can you get the view3dscene binary with debug symbols from http://michalis.ii.uni.wroc.pl/~michali … 3dscene.gz and run it, preferably under gdb so that you can get backtrace, like this:

gunzip view3dscene
chmod +x ./view3dscene
gdb view3dscene
(gdb) run

... and when it fails you should see something like:
Program received signal SIGSEGV, Segmentation fault.
... 
... and you can do
(gdb) bt
....

The output of this will tell me where's the segfault.

(This debug binary is compiled for 32-bit. If you use 64-bit (x86_64) system let me know, I'll upload new version.)

2.2. Also check running with the Mesa environment variables set like I mentioned in previous post:

export LIBGL_DEBUG=verbose
export MESA_DEBUG=1
view3dcene ... # run view3dcene in the same shell

Offline

#7 2013-01-11 15:13:51

rnarch
Member
Registered: 2012-03-17
Posts: 292

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

Here is the information you wanted:
The log file while starting view3dscene on Debian-Testing:

Log for "view3dscene", version 3.11.0. Started on 2013-01-11 at 13:16:16.
-------------------- Shapes tree begin
TShapeTreeGroup
-------------------- Shapes tree end
-------------------- OpenGL context initialization begin
OpenGL information (detected by view3dscene):

--------
Version:
  Version string: 2.1 Mesa 8.0.5
  Version parsed: major: 2, minor: 1, release exists: FALSE, release: 0, vendor-specific version: "Mesa 8.0.5"
  Vendor: nouveau
  Renderer: Gallium 0.4 on NVA8
  Vendor NVidia: FALSE
  Vendor Mesa: TRUE (Mesa parsed version major: 8, minor: 0, release: 5)
  Vendor ATI: FALSE (fglrx: FALSE)

  Buggy glPushAttrib(GL_POINT_SET): FALSE
  Buggy glDrawPixels for odd widths: FALSE
  Buggy glGenerateMipmapEXT: FALSE
  Buggy GL_LIGHT_MODEL_TWO_SIDE: FALSE
  Buggy VBO: FALSE
  Buggy shader shadow map: FALSE

------------------------
Real versions available:
(checks both version string and actual functions availability in GL library, to secure from buggy OpenGL implementations)

  1.2: TRUE
  1.3: TRUE
  1.4: TRUE
  1.5: TRUE
  2.0: TRUE
  2.1: TRUE
  3.0: FALSE
  3.1: FALSE
  3.2: FALSE
  3.3: FALSE
  4.0: FALSE

---------
Features:
  GLSL shaders support: Standard
  Assembly ARB vertex program support: Extension
  Assembly ARB fragment program support: Extension
  Multi-texturing: TRUE
  Framebuffer Object: Standard (or ARB "core extension")
  Vertex Buffer Object: TRUE
  GenerateMipmap available: TRUE
  S3TC compressed textures: FALSE
  3D textures: Standard

  All 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_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat 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_ARB_depth_texture GL_ARB_occlusion_query 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_depth_clamp GL_NV_fog_distance 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_ATI_texture_float GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 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_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_ATI_texture_compression_3dc GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_rgtc GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_ATI_texture_mirror_once GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_texture_compression_latc GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_separate_shader_objects GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_shader_texture_lod GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_NV_texture_barrier GL_ARB_robustness GL_ARB_texture_storage 

-----------------------------
OpenGL utility (GLU) version:
  Version string: 1.3
  Version parsed: major: 1, minor: 3, release exists: FALSE, release: 0, vendor-specific version: ""
  Extensions: GLU_EXT_nurbs_tessellator GLU_EXT_object_space_tess 

---------------------------
Current buffers bit depths:
  Color (red / greeen / blue / alpha): 8 / 8 / 8 / 0
  Depth: 24
  Index: 0
  Stencil: 8
  Accumulation (red / greeen / blue / alpha): 0 / 0 / 0 / 0
  Double buffer: TRUE
  Multisampling (full-screen antialiasing):
    Sample buffers: FALSE
    Samples: 0

-------------
Stack depths:
  Attributes: 16
  Client attributes: 16
  Modelview: 32
  Projection: 32
  Texture: 10
  Name: 64

-------
Limits:
  Max clip planes: 6
  Max eval order: 30
  Max lights: 8
  Max list nesting: 64
  Max pixel map table: 256
  Max texture size: 8192
  Max viewport dims: width 16384 / height 16384
  Max texture units: 8
  Max cube map texture size: 8192
  Max 3d texture size: 2048
  Max rectangle texture size: 8192
  Max texture max anisotropy: 16
  Query counter bits (for occlusion query): 64
  Max renderbuffer size: 16384
-------------------- OpenGL context initialization end
-------------------- Shadow volumes initialization begin
GL_INCR/DECR_WRAP_EXT available: TRUE
Two-sided stencil test available: TRUE
-------------------- Shadow volumes initialization end
-------------------- Shapes tree begin
TShapeTreeGroup
-------------------- Shapes tree end
Renderer: Preparing rendering of all shapes

The output of view3dscene (version you supplied) on Archlinux:

$ ./view3dscene-new
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
view3dscene: Exception EAccessViolation (at address 0xAD611050) : 
Access violation
An unhandled exception occurred at $AD611050 :
EAccessViolation : Access violation
  $AD611050

Heap dump by heaptrc unit
6915 memory blocks allocated : 3256193/3277192
6913 memory blocks freed     : 3256157/3277152
2 unfreed memory blocks : 36
True heap size : 196608
True free heap : 196416
Should be : 196440
Call trace for block $B4A029E0 size 24
  $0806E1D1
  $0809D9F5
  $080713FE
Call trace for block $B4A02920 size 12
  $0809D807
  $080713FE
  $08160C35
  $08160AC7
  $0816AC7C
  $0816B335
  $0824FB30
  $0824F836

Output of the same version on Archlinux with gdb

$ gdb ./view3dscene-new 
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/abcde/view3dscene/view3dscene-new...done.
(gdb) run
Starting program: /home/abcde/view3dscene/view3dscene-new 
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.3400.3-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.

Program received signal SIGSEGV, Segmentation fault.
0xadef9050 in ?? ()
(gdb) bt
#0  0xadef9050 in ?? ()
Cannot access memory at address 0x58
(gdb) ^CQuit
(gdb) quit
A debugging session is active.

	Inferior 1 [process 1054] will be killed.

Quit anyway? (y or n) y

Output after export commands:

[abcde@localhost view3dscene]$ export LIBGL_DEBUG=verbose
[abcde@localhost view3dscene]$ export MESA_DEBUG=1
[abcde@localhost view3dscene]$ ./view3dscene-new 
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/nouveau_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/nouveau_dri.so
libGL: Can't open configuration file /home/abcde/.drirc: No such file or directory.
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
libGL: Can't open configuration file /home/abcde/.drirc: No such file or directory.
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable
view3dscene: Exception EAccessViolation (at address 0xAD66B050) : 
Access violation
An unhandled exception occurred at $AD66B050 :
EAccessViolation : Access violation
  $AD66B050

Heap dump by heaptrc unit
6915 memory blocks allocated : 3256195/3277192
6913 memory blocks freed     : 3256159/3277152
2 unfreed memory blocks : 36
True heap size : 196608
True free heap : 196416
Should be : 196440
Call trace for block $B4A5C9E0 size 24
  $0806E1D1
  $0809D9F5
  $080713FE
Call trace for block $B4A5C920 size 12
  $0809D807
  $080713FE
  $08160C35
  $08160AC7
  $0816AC7C
  $0816B335
  $0824FB30
  $0824F836

Hope this detects the fault.

Offline

#8 2013-01-11 15:46:06

michalis.kambi
Member
Registered: 2013-01-10
Posts: 6

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

2.1 Mesa 8.0.5

Ok, so the version of Mesa is different (older) on Debian (8.0.5 on Debian vs 9.0.1 on Archlinux).

Unfortunately, the backtrace produced by gdb isn't useful... The line numbers (??) are not shown, which is weird as the binary contained all debug symbols. And trying to deduce the line numbers on my system from your addresses (with addr2line and gdb "info line...") doesn't lead anywhere. It seems that something bad happens and the stack becomes corrupt.

The output with LIBGL_DEBUG and MESA_DEBUG also doesn't contain anything useful, unfortunately.

Sorry, it looks like the experiments didn't provide much useful information to see where the problems is... And I have no more ideas right now (that don't involve actually compiling and playing with source code to see where the bug is).

I will try to find a system where I can reproduce this. Until then, the only remaining thing I can recommend is to try NVidia propriatary drivers, as mentioned before. Or to downgrade your Mesa version to 8.x on Archlinux, but I have no idea is such downgrading easy on Archlinux.

Offline

#9 2013-03-02 19:09:52

michalis.kambi
Member
Registered: 2013-01-10
Posts: 6

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

Hello. I just committed a couple of changes to view3dscene (and underlying "Castle Game Engine") that possibly will fix also your problem.

The problems were observed on Mesa 9 with Radeon GPU (more precisely: renderer: "Gallium 0.4 on AMD RV710" and version "2.1 Mesa 9.0.2"). The symptoms were identical as you describe --- access violation (aka segmentation fault), and debugging was not easy as the stack was corrupted. The workaround was to replace most glRasterPos calls with glWindowPos, looks like Mesa 9 likes to crash on glRasterPos (this was also a good code cleanup for me, so it was a good thing anyway).

As the symptoms are similar to what you describe (Mesa 9, segmentation fault with corrupted stack, all was Ok with Mesa 8 on the same system) then possibly this was the same problem as you experienced. So possibly everything should be fixed now for you smile Can you try the latest view3dscene binary (the one from today, 2013-03-02, or later)  from snapshots,

  http://michalis.ii.uni.wroc.pl/castle-engine-snapshots/

and see does it fix your crashes on Archlinux?

Thanks!

Offline

#10 2013-03-21 04:21:29

rnarch
Member
Registered: 2012-03-17
Posts: 292

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

I will check this as early as possible and post back.

Offline

#11 2013-03-22 03:23:06

rnarch
Member
Registered: 2012-03-17
Posts: 292

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

@michalis.kambi:
Thanks for your interest. I had not used view3dscene for some time.  I now downloaded the latest version and it ran very well. The problem appears to have been resolved. Out of curiosity, I tried the earlier versions again and they also ran very well this time!  Probably there was some problem in nouveau or some system file which has been corrected over this period during updating of the system.

All is well that ends well. I am marking this thread as solved.

Offline

#12 2013-03-22 03:39:24

michalis.kambi
Member
Registered: 2013-01-10
Posts: 6

Re: "Exception EAccessViolation: Access violation"- view3dscene [solved]

Ah, so the problem solved itself smile Cool. Thanks for checking!

Offline

Board footer

Powered by FluxBB