Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI/launcher crashes if there are a lot of ROMs #14

Closed
tmihai20 opened this issue Jul 24, 2019 · 6 comments
Closed

UI/launcher crashes if there are a lot of ROMs #14

tmihai20 opened this issue Jul 24, 2019 · 6 comments
Assignees
Labels
Bug Something isn't working Good First Issue Good for newcomers

Comments

@tmihai20
Copy link

I have hundreds of ROM files on my microSD card and when I navigate to GameBoy Color ROMS launcher is restarted and it goes back to the first list of available ROMS. I have a lot of ROMs because I want to have versions from all regions. This is happening if I am going to the SegaMasterSystem folder (navigating to the left).

Steps to reproduce the behavior:

  1. Copy a lot of ROMs in all ROM folders (I have hundreds of them).
  2. Navigate right to see all available ROMs.
  3. In my case, when going to GameBoyColor ROMs, UI/launcher crashes and goes back to main screen. This is happening even I navigate left to SegaMasterSystem ROMs.
    I am using the release tagged with a3c6d90.
@tmihai20 tmihai20 changed the title UI crashes if there are a lot of ROMs UI/launcher crashes if there are a lot of ROMs Jul 24, 2019
@32teeth 32teeth self-assigned this Jul 24, 2019
@32teeth 32teeth added Bug Something isn't working Good First Issue Good for newcomers labels Jul 24, 2019
@32teeth
Copy link
Member

32teeth commented Jul 24, 2019

@tmihai20

Approximate count of files?

  • 50
  • 100
  • 200
  • 500

@32teeth

This may be related to:

  • sort_files
  • quick_sort

Not being able to handle extreme amount of file names or too much for memory to handle

const int MAX_FILES = 1024;
char** result = (char**)malloc(MAX_FILES * sizeof(void*));

@tmihai20
Copy link
Author

I have 303 col, 117 gb, 1213 gbc, 76 in gg, 846 in nes, and 1483 in sms. Some files have characters like these ones 76-in-1 (U) [p1][!]. The exclamation mark is present quite a lot as well. I did not rename them, I just copied them as I found them. I guess the main issue is with the GBC and SMS folders, there are more than 1000 files in them.

@32teeth
Copy link
Member

32teeth commented Jul 25, 2019

thanks for the response @tmihai20

ill test to see what happens when we increase the MAX_FILES limit.

const int MAX_FILES = 1024;
char** result = (char**)malloc(MAX_FILES * sizeof(void*));

@tmihai20
Copy link
Author

tmihai20 commented Jul 29, 2019

It looks like this issue is not yet fixed with 1.0.1 release 2ab3506. UI still crashes when I go to the emulator that has more than 1024 ROMs in it. Perhaps the issue was not only related to MAX_FILES.

@tmihai20
Copy link
Author

Maybe changing the sort algorithm would help (like using Cycle Sort or Selection Sort).

@esmith13
Copy link

I have this issue as a first time user on Odroid Go. I am using the current release, v1.6 and have under 1024 roms in each system (my largest is under 800 and the rest are all under 600). I have removed the following characters from all file names already:
& , ' !
None of my roms are compressed. PCE and GG lists never show and cause an immediate crash. Aside from those two, moving from list to list a few times in a row always causes a crash as well, even on a list that works fine normally. Can't get to any other systems than NES, GB, GBC & SMS since it crashes when I get to GG going right as well as PCE when going left.

Attached is a full file & folder listing of my SD Card 'roms' folder.
SD Card.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Good First Issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants