SpottyMatt / raspbian-stepmania-arcade

Guide & scripts to turn a Raspberry Pi into a StepMania arcade machine
83 stars 7 forks source link

segfault error #1

Closed CrisAdam closed 5 years ago

CrisAdam commented 5 years ago

Tried installing on an rPi 3b+ (raspbian stretch) & got a black window that opens & freezes on it - is there any sort of openGL prerequisite?

pi@raspberrypi:~/Desktop/raspian-3b-stepmania-arcade/stepmania $ ./stepmania -verbose StepMania5.2.0 Compiled 20181108 @ 01:11:26 (build 5d299c8a83) Log starting 2018-11-09 01:53:42 Command line args (count=1): [[-verbose]]

(stepmania:1034): GdkPixbuf-WARNING **: Bug! loader 'png' didn't set an error on failure

(stepmania:1034): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Internal error: Image loader module 'png' failed to complete an operation, but didn't give a reason for the failure Loading window: gtk OS: Linux ver 041479 Runtime library: glibc 2.24 Threads library: NPTL 2.24 libavcodec: 0x372765 (3614565) ALSA: Advanced Linux Sound Architecture Driver Version k4.14.79-v7+. ALSA Driver: 0: VX1 [VX1], device 0: USB Audio [USB Audio], 1/1 subdevices avail ALSA Driver: 2: bcm2835 ALSA [ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA], 7/7 subdevices avail ALSA Driver: 2: bcm2835 ALSA [ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI], 1/1 subdevices avail ALSA Driver: 3: vc4-hdmi [vc4hdmi], device 0: MAI PCM vc4-hdmi-hifi-0 [], 1/1 subdevices avail ALSA: Mixing at 44100hz ALSA: writeahead adjusted from 512 to 940 ALSA: chunksize adjusted from 64 to 470 Sound driver: ALSA-sw Lights driver: SystemMessage Lights driver: Export

(stepmania:1034): Gtk-CRITICAL **: IA__gtk_style_detach: assertion 'style->attach_count > 0' failed Video renderers: 'opengl' Display: :0.0 (screen 0) X server vendor: The X.Org Foundation [1.19.2.0] libGL error: MESA-LOADER: failed to retrieve device information MESA-LOADER: failed to retrieve device information MESA-LOADER: failed to retrieve device information Server GLX vendor: SGI [1.4] Client GLX vendor: Mesa Project and SGI [1.4] Paletted textures disabled: GL_EXT_paletted_texture missing. Direct rendering: yes OGL Vendor: Broadcom OGL Renderer: Gallium 0.4 on VC4 V3D 2.1 OGL Version: 2.1 Mesa 13.0.6 OGL Max texture size: 2048 OGL Texture units: 8 GLU Version: 1.3 OGL Extensions: GL_AMD_shader_trinary_minmax GL_APPLE: packed_pixels, vertex_array_object GL_ARB: ES2_compatibility, buffer_storage, clear_buffer_object, color_buffer_float, compressed_texture_pixel_storage, copy_buffer, debug_output, depth_texture, draw_buffers, draw_elements_base_vertex, explicit_attrib_location, explicit_uniform_location, fragment_coord_conventions, fragment_program, fragment_program_shadow, fragment_shader, framebuffer_object, framebuffer_sRGB, get_program_binary, get_texture_sub_image, half_float_pixel, half_float_vertex, internalformat_query, internalformat_query2, invalidate_subdata, map_buffer_alignment, map_buffer_range, multi_bind, multisample, multitexture, occlusion_query, occlusion_query2, pixel_buffer_object, point_parameters, point_sprite, program_interface_query, provoking_vertex, robustness, sampler_objects, separate_shader_objects, shader_objects, shading_language_100, shadow, sync, texture_border_clamp, texture_compression, texture_cube_map, texture_env_add, texture_env_combine, texture_env_crossbar, texture_env_dot3, texture_mirrored_repeat, texture_multisample, texture_non_power_of_two, texture_rectangle, texture_storage, texture_storage_multisample, texture_swizzle, transpose_matrix, vertex_array_object, vertex_attrib_binding, vertex_buffer_object, vertex_program, vertex_shader, window_pos GL_ATI: blend_equation_separate, draw_buffers, fragment_shader, separate_stencil, texture_env_combine3 GL_EXT: abgr, bgra, blend_color, blend_equation_separate, blend_func_separate, blend_minmax, blend_subtract, compiled_vertex_array, copy_texture, draw_range_elements, fog_coord, framebuffer_blit, framebuffer_multisample, framebuffer_multisample_blit_scaled, framebuffer_object, framebuffer_sRGB, gpu_program_parameters, multi_draw_arrays, packed_depth_stencil, packed_pixels, pixel_buffer_object, point_parameters, polygon_offset, provoking_vertex, rescale_normal, secondary_color, separate_specular_color, shader_integer_mix, shadow_funcs, stencil_two_side, stencil_wrap, subtexture, texture, texture3D, texture_cube_map, texture_edge_clamp, texture_env_add, texture_env_combine, texture_env_dot3, texture_lod_bias, texture_object, texture_rectangle, texture_sRGB, texture_sRGB_decode, texture_swizzle, vertex_array GL_IBM: multimode_draw_arrays, rasterpos_clip, texture_mirrored_repeat GL_INGR_blend_func_separate GL_KHR: context_flush_control, debug GL_MESA: pack_invert, window_pos GL_NV: blend_square, fog_distance, light_max_exponent, packed_depth_stencil, texgen_reflection, texture_env_combine4, texture_rectangle GL_OES: EGL_image, read_format GL_SGIS: generate_mipmap, texture_border_clamp, texture_edge_clamp, texture_lod GL_SUN_multi_draw_arrays OpenGL Windowed 854x480 32 color 32 texture 60Hz Vsync SmoothLines Event driver: v1.0.1 Input device: /dev/input/event3: USB device, ID 040d:3400, version 100: TOPPING VX1 Not a joystick; ignored LinuxEvent: Couldn't open /dev/input/event3: Resource temporarily unavailable. Input device: /dev/input/event1: USB device, ID 046d:c31c, version 110: Logitech USB Keyboard Not a joystick; ignored LinuxEvent: Couldn't open /dev/input/event1: Resource temporarily unavailable. Input device: /dev/input/event6: USB device, ID 1997:2433, version 101: mini keyboard Not a joystick; ignored LinuxEvent: Couldn't open /dev/input/event6: Resource temporarily unavailable. Input device: /dev/input/event4: parallel port device, ID 0001:0001, version 100: GPIO Controller 1 Event types: syn, key, abs Total keys: 8; total axes: 2 Input device: /dev/input/event2: USB device, ID 0461:4e81, version 111: HID compliant device Not a joystick; ignored LinuxEvent: Couldn't open /dev/input/event2: Resource temporarily unavailable. Input device: /dev/input/event0: USB device, ID 046d:c31c, version 110: Logitech USB Keyboard Not a joystick; ignored LinuxEvent: Couldn't open /dev/input/event0: Resource temporarily unavailable. Input device: /dev/input/event7: USB device, ID 1997:2433, version 101: mini keyboard Not a joystick; ignored LinuxEvent: Couldn't open /dev/input/event7: Resource temporarily unavailable. Input device: /dev/input/event5: parallel port device, ID 0001:0002, version 100: GPIO Controller 2 Event types: syn, key, abs Total keys: 8; total axes: 2 Segmentation fault

SpottyMatt commented 5 years ago

Not that I know of (beyond enabling the RPi's OpenGL support in the first place - but even if you don't, it'll just run at ~1FPS, not segfault).

The segfault seems to come right after it's enumerating input devices; can you disconnect everything except a single keyboard (maybe also a mouse) and try again?

CrisAdam commented 5 years ago

Well the segfault went away (seems to be one of the input devices..), but it still isn't running, it stalls at a black screen now (with a mouse / cursor) - ssh seems to work still:

Tried without anything (remoting in via VNC server):

StepMania5.2.0 Compiled 20181108 @ 01:11:26 (build 5d299c8a83) Log starting 2018-11-12 00:48:49 Command line args (count=1): [[-verbose]] Loading window: gtk OS: Linux ver 041479 Runtime library: glibc 2.24 Threads library: NPTL 2.24 libavcodec: 0x372765 (3614565) ALSA: Advanced Linux Sound Architecture Driver Version k4.14.79-v7+. ALSA Driver: 2: bcm2835 ALSA [ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA], 7/7 subdevices avail ALSA Driver: 2: bcm2835 ALSA [ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI], 1/1 subdevices avail ALSA Driver: 3: vc4-hdmi [vc4hdmi], device 0: MAI PCM vc4-hdmi-hifi-0 [], 1/1 subdevices avail ALSA: Mixing at 44100hz ALSA: chunksize adjusted from 64 to 256 Sound driver: ALSA-sw Lights driver: SystemMessage Lights driver: Export Video renderers: 'opengl' Display: :0.0 (screen 0) X server vendor: The X.Org Foundation [1.19.2.0] Server GLX vendor: SGI [1.4] Client GLX vendor: Mesa Project and SGI [1.4] Paletted textures disabled: GL_EXT_paletted_texture missing. Direct rendering: yes OGL Vendor: Broadcom OGL Renderer: Gallium 0.4 on VC4 V3D 2.1 OGL Version: 2.1 Mesa 13.0.6 OGL Max texture size: 2048 OGL Texture units: 8 GLU Version: 1.3 OGL Extensions: GL_AMD_shader_trinary_minmax GL_APPLE: packed_pixels, vertex_array_object GL_ARB: ES2_compatibility, buffer_storage, clear_buffer_object, color_buffer_float, compressed_texture_pixel_storage, copy_buffer, debug_output, depth_texture, draw_buffers, draw_elements_base_vertex, explicit_attrib_location, explicit_uniform_location, fragment_coord_conventions, fragment_program, fragment_program_shadow, fragment_shader, framebuffer_object, framebuffer_sRGB, get_program_binary, get_texture_sub_image, half_float_pixel, half_float_vertex, internalformat_query, internalformat_query2, invalidate_subdata, map_buffer_alignment, map_buffer_range, multi_bind, multisample, multitexture, occlusion_query, occlusion_query2, pixel_buffer_object, point_parameters, point_sprite, program_interface_query, provoking_vertex, robustness, sampler_objects, separate_shader_objects, shader_objects, shading_language_100, shadow, sync, texture_border_clamp, texture_compression, texture_cube_map, texture_env_add, texture_env_combine, texture_env_crossbar, texture_env_dot3, texture_mirrored_repeat, texture_multisample, texture_non_power_of_two, texture_rectangle, texture_storage, texture_storage_multisample, texture_swizzle, transpose_matrix, vertex_array_object, vertex_attrib_binding, vertex_buffer_object, vertex_program, vertex_shader, window_pos GL_ATI: blend_equation_separate, draw_buffers, fragment_shader, separate_stencil, texture_env_combine3 GL_EXT: abgr, bgra, blend_color, blend_equation_separate, blend_func_separate, blend_minmax, blend_subtract, compiled_vertex_array, copy_texture, draw_range_elements, fog_coord, framebuffer_blit, framebuffer_multisample, framebuffer_multisample_blit_scaled, framebuffer_object, framebuffer_sRGB, gpu_program_parameters, multi_draw_arrays, packed_depth_stencil, packed_pixels, pixel_buffer_object, point_parameters, polygon_offset, provoking_vertex, rescale_normal, secondary_color, separate_specular_color, shader_integer_mix, shadow_funcs, stencil_two_side, stencil_wrap, subtexture, texture, texture3D, texture_cube_map, texture_edge_clamp, texture_env_add, texture_env_combine, texture_env_dot3, texture_lod_bias, texture_object, texture_rectangle, texture_sRGB, texture_sRGB_decode, texture_swizzle, vertex_array GL_IBM: multimode_draw_arrays, rasterpos_clip, texture_mirrored_repeat GL_INGR_blend_func_separate GL_KHR: context_flush_control, debug GL_MESA: pack_invert, window_pos GL_NV: blend_square, fog_distance, light_max_exponent, packed_depth_stencil, texgen_reflection, texture_env_combine4, texture_rectangle GL_OES: EGL_image, read_format GL_SGIS: generate_mipmap, texture_border_clamp, texture_edge_clamp, texture_lod GL_SUN_multi_draw_arrays OpenGL Windowed 854x480 32 color 32 texture 60Hz Vsync SmoothLines Mixing 506.654358 ahead in 30283 Mix() calls Players joined: none Language: en Current renderer: OpenGL Theme: default Error: Fatal I/O error communicating with X server.

Can't seem to launch it via just ssh:

StepMania5.2.0 Compiled 20181108 @ 01:11:26 (build 5d299c8a83) Log starting 2018-11-12 00:56:39 Couldn't load driver gtk: Couldn't initialize gtk (cannot open display)

(stepmania:812): Gtk-CRITICAL **: IA__gtk_widget_hide: assertion 'GTK_IS_WIDGET (widget)' failed

(stepmania:812): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(stepmania:812): GLib-GObject-CRITICAL **: g_signal_emit_by_name: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed Error: Couldn't open any loading windows.

and launching via keyboard with VNC disabled seems the same:

StepMania5.2.0 Compiled 20181108 @ 01:11:26 (build 5d299c8a83) Log starting 2018-11-12 00:57:47 Command line args (count=1): [[-v]] Loading window: gtk OS: Linux ver 041479 Runtime library: glibc 2.24 Threads library: NPTL 2.24 libavcodec: 0x372765 (3614565) ALSA: Advanced Linux Sound Architecture Driver Version k4.14.79-v7+. ALSA Driver: 2: bcm2835 ALSA [ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA], 7/7 subdevices avail ALSA Driver: 2: bcm2835 ALSA [ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI], 1/1 subdevices avail ALSA Driver: 3: vc4-hdmi [vc4hdmi], device 0: MAI PCM vc4-hdmi-hifi-0 [], 1/1 subdevices avail ALSA: Mixing at 44100hz ALSA: chunksize adjusted from 64 to 256 Sound driver: ALSA-sw Lights driver: SystemMessage Lights driver: Export Video renderers: 'opengl' Display: :0.0 (screen 0) X server vendor: The X.Org Foundation [1.19.2.0] Server GLX vendor: SGI [1.4] Client GLX vendor: Mesa Project and SGI [1.4] Paletted textures disabled: GL_EXT_paletted_texture missing. Direct rendering: yes OGL Vendor: Broadcom OGL Renderer: Gallium 0.4 on VC4 V3D 2.1 OGL Version: 2.1 Mesa 13.0.6 OGL Max texture size: 2048 OGL Texture units: 8 GLU Version: 1.3 OGL Extensions: GL_AMD_shader_trinary_minmax GL_APPLE: packed_pixels, vertex_array_object GL_ARB: ES2_compatibility, buffer_storage, clear_buffer_object, color_buffer_float, compressed_texture_pixel_storage, copy_buffer, debug_output, depth_texture, draw_buffers, draw_elements_base_vertex, explicit_attrib_location, explicit_uniform_location, fragment_coord_conventions, fragment_program, fragment_program_shadow, fragment_shader, framebuffer_object, framebuffer_sRGB, get_program_binary, get_texture_sub_image, half_float_pixel, half_float_vertex, internalformat_query, internalformat_query2, invalidate_subdata, map_buffer_alignment, map_buffer_range, multi_bind, multisample, multitexture, occlusion_query, occlusion_query2, pixel_buffer_object, point_parameters, point_sprite, program_interface_query, provoking_vertex, robustness, sampler_objects, separate_shader_objects, shader_objects, shading_language_100, shadow, sync, texture_border_clamp, texture_compression, texture_cube_map, texture_env_add, texture_env_combine, texture_env_crossbar, texture_env_dot3, texture_mirrored_repeat, texture_multisample, texture_non_power_of_two, texture_rectangle, texture_storage, texture_storage_multisample, texture_swizzle, transpose_matrix, vertex_array_object, vertex_attrib_binding, vertex_buffer_object, vertex_program, vertex_shader, window_pos GL_ATI: blend_equation_separate, draw_buffers, fragment_shader, separate_stencil, texture_env_combine3 GL_EXT: abgr, bgra, blend_color, blend_equation_separate, blend_func_separate, blend_minmax, blend_subtract, compiled_vertex_array, copy_texture, draw_range_elements, fog_coord, framebuffer_blit, framebuffer_multisample, framebuffer_multisample_blit_scaled, framebuffer_object, framebuffer_sRGB, gpu_program_parameters, multi_draw_arrays, packed_depth_stencil, packed_pixels, pixel_buffer_object, point_parameters, polygon_offset, provoking_vertex, rescale_normal, secondary_color, separate_specular_color, shader_integer_mix, shadow_funcs, stencil_two_side, stencil_wrap, subtexture, texture, texture3D, texture_cube_map, texture_edge_clamp, texture_env_add, texture_env_combine, texture_env_dot3, texture_lod_bias, texture_object, texture_rectangle, texture_sRGB, texture_sRGB_decode, texture_swizzle, vertex_array GL_IBM: multimode_draw_arrays, rasterpos_clip, texture_mirrored_repeat GL_INGR_blend_func_separate GL_KHR: context_flush_control, debug GL_MESA: pack_invert, window_pos GL_NV: blend_square, fog_distance, light_max_exponent, packed_depth_stencil, texgen_reflection, texture_env_combine4, texture_rectangle GL_OES: EGL_image, read_format GL_SGIS: generate_mipmap, texture_border_clamp, texture_edge_clamp, texture_lod GL_SUN_multi_draw_arrays OpenGL Windowed 854x480 32 color 32 texture 60Hz Vsync SmoothLines Event driver: v1.0.1 Input device: /dev/input/event1: USB device, ID 046d:c31c, version 110: Logitech USB Keyboard Not a joystick; ignored LinuxEvent: Couldn't open /dev/input/event1: Resource temporarily unavailable. Input device: /dev/input/event0: USB device, ID 046d:c31c, version 110: Logitech USB Keyboard Not a joystick; ignored LinuxEvent: Couldn't open /dev/input/event0: Resource temporarily unavailable. Mixing 505.332062 ahead in 1057 Mix() calls Players joined: none Language: en Current renderer: OpenGL Theme: default Error: Fatal I/O error communicating with X server.

SpottyMatt commented 5 years ago

(remoting in via VNC server): / SSH

Ahh, that is likely why it's not working.

Try this: DISPLAY=:0 ~/.stepmania-5.0/launch.sh

StepMania uses the X window server. It reads the environment variables in whatever shell you're in to figure out which display it should use... When you've SSH'd in, there's no graphical display*.

Are you hoping to have a window pop up locally, powered by the remote Raspberry Pi? Or are you hoping to, via your remote access, cause a StepMania window to open up on a monitor somewhere else?

Be There

If you can go to the Pi and use a keyboard and monitor physically connected to it, it will probably work.

Start it Over SSH

If you want to issue a command from an SSH session that will start a StepMania window on some other monitor connected to the Raspberry Pi...

You need to know which display(s) have X servers connected to them, and which one you want to display on. 90% of folks will probably only have one monitor, so "display 0" is probably a safe thing to just blindly try.

For me, I can start a StepMania window on the Pi's main monitor, from an SSH command line, with this command:

DISPLAY=:0 ~/.stepmania-5.0/launch.sh

X Window Forwarding

If you want a window to pop up locally, driven by the remote Raspberry Pi... in theory ssh -X ... into the Pi, then just start ~/.stepmania-5.0/launch.sh (a DISPLAY will already be set when you do this).

For me, it segfaults if SM was set to be full-screen, and runs at 1 FPS in "windowed" mode. Just FYI :D

VNC

I don't know enough about your VNC setup to advise.

SpottyMatt commented 5 years ago

@CrisAdam , do you still need help with this issue?

CrisAdam commented 5 years ago

Not quite sure what it was, but after installing the 11-13-2018 version of raspbian stretch desktop as opposed to the 10-09-2018 version, it has worked - I suspect something was updated/edited in between the versions which may or may not be fixed/broken by the auto-update from the make script (which I ran with sudo, as otherwise it didn't seem to install correctly)