Closed ups-ups closed 2 years ago
After some time digging into that (and asking for help on discord) I was finally going to create an issue, good to see I'm not the only one having this problem!
EDIT : I'm personally using a generic x86_64 build, not a RPI
Some complementary details:
Segmentation Fault
#0 0x0000000000000000 in ?? ()
No symbol table info available.
#1 0x0000000000424fab in record_driver_init_first (backend=0xc61540 <recording_state>, data=0xc61548 <recording_state+8>, params=0x7ffe976de3c0) at record/record_driver.c:153
handle = <optimized out>
i = 1
#2 recording_init () at record/record_driver.c:410
output = "/storage/.config/retroarch/records/10-Yard Fight (USA)-211203-193421.mkv\000G\325 \366\177\000\000\020\347m\227\376\177\000\000z\330.!\366\177\000\000\375\377\377\377\000\000\000\000v", '\000' <repeats 24 times>, "z\353\001\000\000\000\000\300Y\330 \366\177\000\000S", '\000' <repeats 39 times>, "\240\037\000\000\377\377", '\000' <repeats 18 times>...
buf = "10-Yard Fight (USA)-211203-193421.mkv", '\000' <repeats 11 times>, "@\256\025\002", '\000' <repeats 28 times>, "\340\372m\227", '\000' <repeats 12 times>, "\330\b\000\000\000\000\001\000\000\000\000\000\001", '\000' <repeats 19 times>, "/tmp/cores/bnes_libretro.so", '\000' <repeats 45 times>...
params = {fps = 60.099826520671044, samplerate = 32000, filename = 0x7ffe976de420 "/storage/.config/retroarch/records/10-Yard Fight (USA)-211203-193421.mkv",
config = 0x7ff61e8090b2 "/storage/roms/downloads/twitch.cfg", audio_resampler = 0x7ff61e7f5e59 "sinc", out_width = 256, out_height = 240, fb_width = 256, fb_height = 240, channels = 2,
video_record_scale_factor = 1, video_stream_scale_factor = 1, video_record_threads = 2, streaming_mode = 0, aspect_ratio = 1.06666672, preset = RECORD_CONFIG_TYPE_RECORDING_MED_QUALITY,
pix_fmt = FFEMU_PIX_RGB565, video_gpu_record = false}
settings = <optimized out>
video_st = <optimized out>
av_info = <optimized out>
runloop_st = <optimized out>
video_gpu_record = <optimized out>
video_force_aspect = true
current_core_type = <optimized out>
video_driver_pix_fmt = <optimized out>
recording_st = 0xc61540 <recording_state>
recording_enable = true
#3 0x000000000041977e in command_event (cmd=<optimized out>, data=<optimized out>) at retroarch.c:4744
boolean = false
p_rarch = 0xc57f80 <rarch_st>
runloop_st = 0xc39d80 <runloop_state>
access_st = 0xc39d60 <access_state_st>
menu_st = 0xcf87a0 <menu_driver_state>
video_st = 0xc9ed00 <video_driver_st>
settings = 0x7ff61e7f4010
recording_st = 0xc61540 <recording_state>
x264
to my Lakka build (shouldn't this be included by default?). I've enabled it in the ffmpeg
package and added the library x264
build itself (and did the same for libmp3lame
just in case), but I still had segfaultsmrboom
package because of some "incompatible build options") so I finally gave up. The (older) debug build I used here has been provided by @GavinDarkglider, and doesn't include my modifications with ffmpeg
/x264
, thus I can't know what's causing the segfault with my build.non-x264
debug build, and identified the error occured in record/drivers/record_ffmpeg.c
, specifically L888
, because ctx->oformat
is 0x0
. Taking a look at what's returned by avformat_alloc_context()
it seems to confirm ffmpeg
wasn't initialized properly because of codecs missing, which fits the original assumption:
(gdb) p *ctx
$6 = {av_class = 0x7f6020273d80 <av_format_context_class>, iformat = 0x0, oformat = 0x0, priv_data = 0x0, pb = 0x0, ctx_flags = 0, nb_streams = 0, streams = 0x0,
filename = "/storage/.config/retroarch/records/10-Yard Fight (USA)-211210-143558.mkv", '\000' <repeats 951 times>, url = 0x0, start_time = 0, duration = 0, bit_rate = 0, packet_size = 0, max_delay = -1,
flags = 2097152, probesize = 5000000, max_analyze_duration = 0, key = 0x0, keylen = 0, nb_programs = 0, programs = 0x0, video_codec_id = AV_CODEC_ID_NONE, audio_codec_id = AV_CODEC_ID_NONE,
subtitle_codec_id = AV_CODEC_ID_NONE, max_index_size = 1048576, max_picture_buffer = 3041280, nb_chapters = 0, chapters = 0x0, metadata = 0x0, start_time_realtime = -9223372036854775808, fps_probe_size = -1,
error_recognition = 1, interrupt_callback = {callback = 0x0, opaque = 0x0}, debug = 0, max_interleave_delta = 10000000, strict_std_compliance = 0, event_flags = 0, max_ts_probe = 50, avoid_negative_ts = -1,
ts_id = 0, audio_preload = 0, max_chunk_duration = 0, max_chunk_size = 0, use_wallclock_as_timestamps = 0, avio_flags = 0, duration_estimation_method = AVFMT_DURATION_FROM_PTS, skip_initial_bytes = 0,
correct_ts_overflow = 1, seek2any = 0, flush_packets = -1, probe_score = 0, format_probesize = 1048576, codec_whitelist = 0x0, format_whitelist = 0x0, internal = 0x2a49e40, io_repositioned = 0,
video_codec = 0x0, audio_codec = 0x0, subtitle_codec = 0x0, data_codec = 0x0, metadata_header_padding = -1, opaque = 0x0, control_message_cb = 0x0, output_ts_offset = 0, dump_separator = 0x2a08530 ", ",
data_codec_id = AV_CODEC_ID_NONE, open_cb = 0x0, protocol_whitelist = 0x0, io_open = 0x7f60201b53e0 <io_open_default>, io_close = 0x7f60201b53d0 <io_close_default>, protocol_blacklist = 0x0,
max_streams = 1000, skip_estimate_duration_from_pts = 0, max_probe_packets = 2500}
x264
isn't included/enabled in Lakka I'd guess it's more likely a Lakka problemThis is fixed with this PR https://github.com/libretro/Lakka-LibreELEC/pull/1617 That being said, I didnt port it to 3.x tree yet, but it should be easy enough to do..... Give me an hour, and I will submit a patch there as well for that. Lakka 3.x PR https://github.com/libretro/Lakka-LibreELEC/pull/1618
@ups-ups @bonswouar PR has been merged please report if it is working with nightly builds so that we can close this issue.
Thank you.
Kind regards,
Amazing, thanks for this fix @GavinDarkglider and the rest of the team!
@gouchi I confirm it works on 4.x
branch (that I built myself earlier), although not on 3.x
using Online Updater, but I believe the nightly build happened before the merge (I'm seeing Feb 26 2022 as the Build Date for version b71be7efd2
)?
EDIT: Alright it works with the new new nightly ;) Confirmed for 3.x and 4.x on generic x64!
I have a GPI case + Pi Zero 2 W. I updated to the latest nightly build. When I tried to record a GB game using the gambatte core, the game ran fine except for some very loud background white noise, but no files were written to the recordings directory.
EDIT: The recording was done fine. I found the recorded videos in .config/retroarch/records, not the recordings directory. The recorded videos don't have that loud white noise that was present at recording time.
@bonswouar @smilerliu Thank you for the tests. I am glad it is working.
@GavinDarkglider Thank you for the fix.
Thank you for the fix. I checked x86-64 and rpi3 latest nightly build. It completely worked. Streaming to twitch is also worked.
I set my twitch streaming url in 'Recording' config. After loading contents, I started streaming via quick menu.
logs: [INFO] [CORE]: No content, starting dummy core. [INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds. [INFO] [Core]: Unloading core.. [INFO] [Core]: Unloading core symbols.. [INFO] Threaded video stats: Frames pushed: 1374, Frames dropped: 0. [INFO] [Config]: Loading config from: "/storage/.config/retroarch/config/RetroArch-1210-014321.cfg". [INFO] [Config]: Saved new config to "/storage/.config/retroarch/config/RetroArch-1210-014321.cfg".
[INFO] [CONTENT LOAD]: Updating firmware status for: /tmp/cores/fbneo_libretro.so on /tmp/system [INFO] [CORE]: Using content: /storage/roms/downloads/alienar.zip. [INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds. [INFO] [Core]: Unloading core.. [INFO] [Core]: Unloading core symbols.. [INFO] Threaded video stats: Frames pushed: 1496, Frames dropped: 0. [INFO] RetroArch 1.9.13 (Git fca72f67d1) [INFO] === Build ======================================= [INFO] Capabilities: ASIMD [INFO] Built: Nov 13 2021 [INFO] Version: 1.9.13 [INFO] Git: fca72f67d1 [INFO] ================================================= [INFO] [Input]: Found input driver: "udev". [INFO] [Core]: Loading dynamic libretro core from: "/tmp/cores/fbneo_libretro.so" [INFO] [Overrides]: No core-specific overrides found at "/storage/.config/retroarch/config/FinalBurn Neo/FinalBurn Neo.cfg". [INFO] [Overrides]: No content-dir-specific overrides found at "/storage/.config/retroarch/config/FinalBurn Neo/downloads.cfg". [INFO] [Overrides]: No game-specific overrides found at "/storage/.config/retroarch/config/FinalBurn Neo/alienar.cfg". [INFO] [Remaps]: Remap directory: "/storage/remappings". [INFO] [Overrides]: Redirecting save file to "/storage/savefiles/alienar.srm". [INFO] [Overrides]: Redirecting save state to "/storage/savestates/alienar.state".
[INFO] [CONTENT LOAD]: Content loading skipped. Implementation will load it on its own.
[libretro INFO] Setting save dir to /storage/savefiles [INFO] [Environ]: SYSTEM_DIRECTORY: "/tmp/system". [libretro INFO] Setting system dir to /tmp/system
[libretro INFO] Initialize DIP switches.
[libretro INFO] [FBNeo] Searching all possible locations for romset alienar [libretro INFO] [FBNeo] No patched romset found at /tmp/system/fbneo/patched/alienar [libretro INFO] [FBNeo] Romset found at /storage/roms/downloads/alienar [libretro INFO] [FBNeo] No romset found at /tmp/system/fbneo/alienar [libretro INFO] [FBNeo] No romset found at /tmp/system/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0x6feb0314 and name aarom10 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0xae3a270e and name aarom11 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0x6be9f09e and name aarom12 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0xbb0c21be and name aarom01 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0x165acd37 and name aarom02 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0xe5d51d92 and name aarom03 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0x24f6feb8 and name aarom04 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0x5b1ac59b and name aarom05 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0xda7195a2 and name aarom06 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0xf9812be4 and name aarom07 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0xcd7f3a87 and name aarom08 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] Using ROM with known crc 0xe6ce77b4 and name aarom09 from archive /storage/roms/downloads/alienar [libretro INFO] [FBNeo] No missing files, proceeding [libretro INFO] [FBNeo] Samplerate set to 48000 [libretro INFO] [FBNeo] Applied dipswitches from core options [libretro INFO] [FBNeo] Initialized driver for alienar [libretro INFO] [FBNeo] Adjusted audio buffer to match driver's refresh rate (60.000000 Hz) [libretro INFO] [Cheevos] System RAM set to 0x345db450, size is 66072 [libretro WARN] [FBNeo] Game has no sound [INFO] [Environ]: SET_ROTATION: 0 [INFO] [Environ]: SET_PIXEL_FORMAT: XRGB8888. [libretro INFO] [FBNeo] Driver alienar was successfully started : game's full name is Alien Arena [INFO] [SRAM]: Skipping SRAM load. [INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Audio]: Set audio input rate to: 48000.00 Hz. [INFO] [Video]: Video @ fullscreen [INFO] [Video]: Starting threaded video driver ... [INFO] [DRM]: Found 2 connectors. [INFO] [DRM]: Connector 0 connected: yes [INFO] [DRM]: Connector 0 has 32 modes. [INFO] [DRM]: Connector 0 assigned to monitor index: #1. [INFO] [DRM]: Connector 1 connected: no [INFO] [DRM]: Connector 1 has 3 modes. [INFO] [DRM]: Mode 0: (1280x720) 1280 x 720, 60.000000 Hz [INFO] [DRM]: Mode 1: (1920x1080) 1920 x 1080, 60.000000 Hz [INFO] [DRM]: Mode 2: (1920x1080) 1920 x 1080, 59.940201 Hz [INFO] [DRM]: Mode 3: (1920x1080i) 1920 x 1080, 30.000000 Hz [INFO] [DRM]: Mode 4: (1920x1080i) 1920 x 1080, 29.970100 Hz [INFO] [DRM]: Mode 5: (1920x1080) 1920 x 1080, 50.000000 Hz [INFO] [DRM]: Mode 6: (1920x1080i) 1920 x 1080, 25.000000 Hz [INFO] [DRM]: Mode 7: (1600x1200) 1600 x 1200, 60.000000 Hz [INFO] [DRM]: Mode 8: (1680x1050) 1680 x 1050, 59.883251 Hz [INFO] [DRM]: Mode 9: (1400x1050) 1400 x 1050, 59.947769 Hz [INFO] [DRM]: Mode 10: (1280x1024) 1280 x 1024, 75.024673 Hz [INFO] [DRM]: Mode 11: (1280x1024) 1280 x 1024, 60.019741 Hz [INFO] [DRM]: Mode 12: (1440x900) 1440 x 900, 59.901459 Hz [INFO] [DRM]: Mode 13: (1280x960) 1280 x 960, 60.000000 Hz [INFO] [DRM]: Mode 14: (1366x768) 1366 x 768, 59.789539 Hz [INFO] [DRM]: Mode 15: (1360x768) 1360 x 768, 60.015163 Hz [INFO] [DRM]: Mode 16: (1280x800) 1280 x 800, 59.909546 Hz [INFO] [DRM]: Mode 17: (1280x768) 1280 x 768, 59.870228 Hz [INFO] [DRM]: Mode 18: (1280x720) 1280 x 720, 59.940201 Hz [INFO] [DRM]: Mode 19: (1280x720) 1280 x 720, 50.000000 Hz [INFO] [DRM]: Mode 20: (1024x768) 1024 x 768, 75.028580 Hz [INFO] [DRM]: Mode 21: (1024x768) 1024 x 768, 70.069359 Hz [INFO] [DRM]: Mode 22: (1024x768) 1024 x 768, 60.003841 Hz [INFO] [DRM]: Mode 23: (800x600) 800 x 600, 60.316540 Hz [INFO] [DRM]: Mode 24: (720x576) 720 x 576, 50.000000 Hz [INFO] [DRM]: Mode 25: (720x576i) 720 x 576, 25.000000 Hz [INFO] [DRM]: Mode 26: (720x480) 720 x 480, 60.000000 Hz [INFO] [DRM]: Mode 27: (720x480) 720 x 480, 59.940060 Hz [INFO] [DRM]: Mode 28: (720x480i) 720 x 480, 30.001110 Hz [INFO] [DRM]: Mode 29: (720x480i) 720 x 480, 29.970030 Hz [INFO] [DRM]: Mode 30: (640x480) 640 x 480, 60.000000 Hz [INFO] [DRM]: Mode 31: (640x480) 640 x 480, 59.940475 Hz [INFO] [GL]: Found GL context: kms [INFO] [GL]: Detecting screen resolution 1280x720. [INFO] [EGL] Found EGL_EXT_platform_base, trying eglGetPlatformDisplayEXT [INFO] [EGL]: EGL version: 1.4 [INFO] [EGL]: Current context: 0x7f9c00cb20. [INFO] [KMS]: New FB: 1280x720 (stride: 5120). [INFO] [GL]: Vendor: Broadcom, Renderer: VC4 V3D 2.1. [INFO] [GL]: Version: OpenGL ES 2.0 Mesa 21.3.0. [INFO] [GL]: Using resolution 1280x720 [INFO] [GL]: Default shader backend found: glsl. [INFO] [Shader driver]: Using GLSL shader backend. [WARN] [GL]: Stock GLSL shaders will be used. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in vertex shader
[INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in fragment shader
[INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in vertex shader
[INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in fragment shader
[INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in vertex shader
[INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in fragment shader
[INFO] [GLSL]: Linking GLSL program. [INFO] Setting up menu pipeline shaders for XMB ... [INFO] [GLSL]: Compiling ribbon shader.. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in vertex shader
[INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in fragment shader
[INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Compiling simple ribbon shader.. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in vertex shader
[INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in fragment shader
[INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Compiling snow shader.. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in vertex shader
[INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in fragment shader
[INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Compiling modern snow shader.. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in vertex shader
[INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in fragment shader
[INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Compiling bokeh shader.. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in vertex shader
[INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in fragment shader
[INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Compiling snowflake shader.. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in vertex shader
[INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: 0:3(12): warning: extension `GL_OES_standard_derivatives' unsupported in fragment shader
[INFO] [GLSL]: Linking GLSL program. [INFO] [GL]: Using 4 textures. [INFO] [GL]: Loaded 1 program(s). [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver. [WARN] [udev]: Full-screen pointer won't be available. [INFO] [udev]: Keyboard #0: "HID 0513:0318" (/dev/input/event0). [INFO] [udev]: Keyboard #1: "HID 0513:0318 Consumer Control" (/dev/input/event2). [INFO] [udev]: Keyboard #2: "HID 0513:0318 System Control" (/dev/input/event3). [INFO] [udev]: Mouse #0: "HID 0513:0318 Mouse" (REL) /dev/input/event1 [INFO] [udev]: Pad #0 (/dev/input/event4) supports 0 force feedback effects. [INFO] [Joypad]: Found joypad driver: "udev". [INFO] [Video]: Found display server: null [WARN] [udev]: Mouse grab/ungrab feature unavailable. [INFO] ALSA: Using floating point format. [INFO] ALSA: Period size: 384 frames [INFO] ALSA: Buffer size: 1536 frames [INFO] [Display]: Found display driver: "gl". [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [libretro INFO] [FBNeo] Unknown device type for port 0, forcing "Classic" instead [libretro INFO] [FBNeo] Unknown device type for port 1, forcing "Classic" instead [INFO] [Playlist]: Loading history file: [/storage/.config/retroarch/config/content_history.lpl]. [INFO] [Playlist]: Loading history file: [/storage/.config/retroarch/config/content_music_history.lpl]. [INFO] [Playlist]: Loading history file: [/storage/.config/retroarch/config/content_video_history.lpl]. [INFO] [Playlist]: Loading history file: [/storage/.config/retroarch/config/content_image_history.lpl]. [INFO] [Playlist]: Loading favorites file: [/storage/.config/retroarch/config/content_favorites.lpl].
[INFO] [KMS]: New FB: 1280x720 (stride: 5120). [INFO] [KMS]: New FB: 1280x720 (stride: 5120). [INFO] [recording] Custom timing given: FPS: 60.0000, Sample rate: 48000.0000 [INFO] [recording] Recording to rtmp://live.twitch.tv/app/live_**@ 292x240. (FB size: 292x292 pix_fmt: 2)
[end of log file] ..Streaming url is masked.