nuhrin / pandafe

"Universal" SDL frontend for Pandora
GNU General Public License v3.0
5 stars 0 forks source link

Sometimes crashes when you choose a rom folder for a first time #14

Closed sfinam closed 11 years ago

sfinam commented 11 years ago

Latest firmware, last Pandafe version from repo, Rebirth pandora (600MHz, 512MB). Pandafe crashes when opening an empty folder or a directory that have files but none of them have file extension it's waiting for. There is nothing in the log file. After restart everything works as usual and you can edit platform defenition to include extensions that are missing.

nuhrin commented 11 years ago

Thanks very much for the report, I'll get a fix out in the next couple days.

nuhrin commented 11 years ago

I am thus far unable to reproduce this, either on the Pandora or my development environment (laptop).

I even set up a new platform with its rom folder set to my home directory, resulting in lots of disparate folders scanned, using various rom file extensions settings. Couldn't get it to crash.

Can you provide more specific details? If possible, send me a backup of your appdata folder (via pm maybe), when in a state where it crashes for you.

sfinam commented 11 years ago

Sorry for misdirecting you with my first post, as I later found it's not about files with different extensions at all.

Steps to reproduce: clean install, open a platform folder for a first time - "choose default folder" screen pops out, choose an empty folder (any empty folder) - it crashes.

When I first experienced it it was just that all of the folders with rom files only worked perfectly, but some with a mix of different files didn't, so I blamed it on them. But yesterday I found that there just wasn't a ".gba" extension defined for gba games, no .gen for Genesis and no .mx1 or .mx2 for MSX and realised that Pandafe just returned zero results in this folders and then crashed.

After the initial selection even after the crash you can safely point it to any other folder and do a rescan and nothing'll be wrong.

nuhrin commented 11 years ago

Thanks sfinam for the extra information.

I did test scanning empty folders on first use of a platform also, and wasn't able to reproduce it. But the "clean install" note allowed me to reproduce it. In my tests I still had old gamelist cache files for the unconfigured platform sitting around from previous uses. After removing these (or the whole appdata folder), your steps to reproduce recreated the crash for me (segmentation fault).

That should be enough to squash this. Thanks for taking the time. :)

nuhrin commented 11 years ago

Ok. There was a race condition with an idle loop worker that could result in an invalid object state, and this triggered a crash whenever the initial rom folder had less files than the on screen list had items.

Fixed. Updated pnd is on the repo (0.2.2.2-fd0c).