libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.17k stars 1.82k forks source link

Segfault when running from playlist cause by incomplete name after using "Import Content" #5443

Closed ghost closed 7 years ago

ghost commented 7 years ago

First and foremost consider this:

Description

Segmentation fault problem when running from the playlist.

Expected behavior

click and play.

Actual behavior

When importing compressed roms for playlist creation, the playlist is limited only to 127 characters per line(including path) cutting of the name of the rom. Sample entry:

compressed name : Akumajou Densetsu (J) [T+Eng_Vice Translations].zip playlist entry(.lpl) after import:

/media/xxxxxxxxxxxxxmy-UUID-herexxxxxxxxxxxxx/1/Akumajou Densetsu (J) [T+Eng_Vice Translations].zip#Akumajou Densetsu (J) [T+Eng_  **<==== missing rest of characters here)**
Akumajou Densetsu (J) [T+Eng1 **<=== Ignore this entry as this is an rdb entry mistake.**
/home/retro/.config/retroarch/cores/fceumm_libretro.so
NES / Famicom (FCEUmm)
1965A3DC|crc
Nintendo - Nintendo Entertainment System.lpl

Steps to reproduce the bug

just scan something that can go past 127 characters including the path of the rom. This might just be for compressed rom issue though.

Bisect Results

1st bad commit : https://github.com/libretro/RetroArch/commit/c1c42cac6b58977886f41370da6f40cdc574141d tracelog : https://hastebin.com/ijegopovow.pl

Version/Commit

You can find this information under Information/System Information

Environment information

xTMODx commented 7 years ago

Have the same problem that the path cant be over 127 chars. Also with compressed roms.

/storage/4BD6-7B7E/ROMz/Nintendo - Nintendo Entertainment System/Super Mario Bros. (Europe) (Rev A).7z#Super Mario Bros. (Europ Super Mario Bros. (Europe) (Rev A) DETECT DETECT 7D5FAA58|crc Nintendo - Nintendo Entertainment System.lpl

with that shorten path it does not recognize any cores.

andres-asm commented 7 years ago

yeah... it's clearly using lots of hardcoded 128s there :p

https://github.com/libretro/RetroArch/commit/c1c42cac6b58977886f41370da6f40cdc574141d#diff-349b6a34634a6cf2ab5ab9a790d4a2adL3053

ghost commented 7 years ago

This seems to be working now as of commit 0002912.

Thanks.

Please reopen if any similar issues comes along.