Retroarch crashing on Nvidia Shield with NAS-mounted folders with more than 1000 files

Open
#15,814 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, c
Domain
mobile-dev

Research direction

Reproduce on an Nvidia Shield Pro 2019 running Android 11 by scanning the NAS-mounted folders listed in the report, starting with a folder above 1,000 files and comparing it with the smaller folders. Trace the Scan Directory or Manual Scan path and determine why large NAS folders crash while playlist rescans work. Done means all listed large folders scan successfully and add their files to playlists without crashing.

Written by the indexing model from the issue text.

Description

Description

When scanning system-native NAS shared folders with lots of files (manually or automatically), Retroarch crashes when selecting the folder:

Crashes on these folders:
Super Nintendo - 3931 files
Genesis - 2689 files
NES - 4076 files

Does not crash on these folders:
32x - 213 files
Sega Master System - 675 files
SegaCD Folder - 33 Files
Sega Saturn folder - 75 files

Expected behavior

The folder should be scanned and files should be added to a playlist.

Actual behavior

Environment: NVidia Shield Pro 2019 (Android 11) with mounted network storage at system level, so all applications can access NAS-located files.

When asking Retroarch to scan a folder, either manually or automatically, it works on low file count folders (under a thousand files) but will crash on folders with thousands of files (complete SNES, NES, Genesis romsets). Manually editing a playlist pointing to all the files will work and a playlist "rescan" will also work. This only happens when asking for a folder scan.

Steps to reproduce the bug
  1. Import Content
  2. select "Scan Directory" or "Manual Scan"
  3. select a NAS Mounted folder on the file list (interface will lock up and crash)

I made a video to better illustrate the issue, in which I import files from a 32x folder with 213 files (I made a mistake and forget to select which types of files will be scanned, so I repeat the first step), which then the folder is scanned and the files are added to a playlist. I immediately after try to do the same on the Genesis full folder (2689 files) and the application crashes.

https://www.youtube.com/watch?v=nsXtzFVW7JE

Version/Commit
  • RetroArch Version: 1.16.0
    Git version: f69a292
    Build Date: Oct 16 2023
    Manual Nightly (RetroArch.apk) download from Buildbot (since the same issue happened on Stable).
Environment information
  • Device: Nvidia Shield Pro 2019
  • OS: Android 11
  • Compiler: Clang/LLVM 11.0.5 (downloaded from buildbot)
Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libretro/RetroArch

All issues in libretro/RetroArch

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.