evannap00 / romcollectionbrowser

Automatically exported from code.google.com/p/romcollectionbrowser
GNU General Public License v2.0
0 stars 0 forks source link

RCB Freezes On Import if folder has no games in it? #175

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using a blank MyGames.db to mimic a "first run"
2. Choosing to import games from a ROM folder that has none in them

The best thing to do is review the installation page I am doing on my project:  
https://github.com/ProfessorKaos64/RetroRig/wiki/Installation

I load a "skeleton" of MyGames.db with config.txt It works great if there is a 
ROM file in the folder, so I know this method works, and applaud you for this 
software. However, when there are no games in a folder, let's say you choose 
"All" for 5 folders when you only have ROMs in one, it just freezes XBMC it 
seems, or stalls. I think this is VERY fixable, with some kind of detection in 
the XML code or somewhere, to just kick out of the importer, or give an 
immediate error. If you point me to the relative spot where this is, maybe I 
can put on my thinking cap and look into it. The full project page is:  
https://github.com/ProfessorKaos64/RetroRig

What is the expected output? What do you see instead?
Just "importing" freezes XBMC

What version of the product are you using? On what operating system?
Latest version pulled down from XBMC Gotham 13.1 Git:f2acae7 (july 6 2014)

Please provide any additional information below.

You can contact me here or via libregeek.org

Thank you!!!!

Original issue reported on code.google.com by mdegu...@gmail.com on 13 Jun 2014 at 11:00

GoogleCodeExporter commented 8 years ago
I've attached a zip file of my prebuilt folder set for XBMC. Ignore the 
XBMC-session folder,its for another code function. 

Original comment by mdegu...@gmail.com on 13 Jun 2014 at 11:06

Attachments:

GoogleCodeExporter commented 8 years ago
Maybe you could put a timeout in, so if nothing happens for 10 seconds or 
internal error prevent some steps from occuring.

#check if background game import is running     
if self.checkUpdateInProgress():            
self.quit = True            
return

I would figure one of these functions has the answer (from gui.py)

def importGames(self, romCollections, isRescrape):      
self.saveViewState(False)       
self.clearList()        
self.clearCache()       
self.checkImport(3, romCollections, isRescrape)     
self.cacheItems()               
self.updateControls(True)       
self.loadViewState()

I wonder if I clean the database on startup in the xml start settings, if that 
will make a difference.

Original comment by mdegu...@gmail.com on 13 Jun 2014 at 12:27

GoogleCodeExporter commented 8 years ago
I'll make sure to scan the xbmc.log for information noted in 
http://code.google.com/p/romcollectionbrowser/wiki/ImportGames#Import

Original comment by mdegu...@gmail.com on 13 Jun 2014 at 12:49

GoogleCodeExporter commented 8 years ago
I don't really understand your scenario. I tested to do an import from an empty 
folder and RCB behaves as expected: it does not import anything but it also 
does not freeze.

Original comment by maloep on 22 Jun 2014 at 5:31

GoogleCodeExporter commented 8 years ago
Is it because I am using a "blank" MyGames.db with a config.xml file that is 
pre set up? I'll try to test this again tonight.

Original comment by mdegu...@gmail.com on 23 Jun 2014 at 5:21

GoogleCodeExporter commented 8 years ago
What can I show you to show you what happens when it freezes? XBMC's log?

Original comment by mdegu...@gmail.com on 26 Jun 2014 at 10:03

GoogleCodeExporter commented 8 years ago
I see what it's doing, it's trying to check every* game in the offline scraper 
for some reason:

18:05:19 T:140488880465664  NOTICE: RCB_WARNING: game Baseball was found in 
parsed results but not in your rom collection.
18:05:19 T:140488880465664  NOTICE: RCB_INFO: searching for Key: pc_bstar
18:05:19 T:140488880465664  NOTICE: RCB_WARNING: game Baseball Stars - Be a 
champ! was found in parsed results but not in your rom collection.
18:05:19 T:140488880465664  NOTICE: RCB_INFO: searching for Key: bstars2
18:05:19 T:140488880465664  NOTICE: RCB_WARNING: game Baseball Stars 2 was 
found in parsed results but not in your rom collection.
18:05:19 T:140488880465664  NOTICE: RCB_INFO: searching for Key: bstars
18:05:19 T:140488880465664  NOTICE: RCB_WARNING: game Baseball Stars 
Professional was found in parsed results but not in your rom collection.
18:05:19 T:140488880465664  NOTICE: RCB_INFO: searching for Key: basebal2
18:05:19 T:140488880465664  NOTICE: RCB_WARNING: game Baseball The Season II 
was found in parsed results but not in your rom collection.
18:05:19 T:140488880465664  NOTICE: RCB_INFO: searching for Key: bassangl
18:05:19 T:140488880465664  NOTICE: RCB_WARNING: game Bass Angler was found in 
parsed results but not in your rom collection.
18:05:19 T:140488880465664  NOTICE: RCB_INFO: searching for Key: batman
18:05:19 T:140488880465664  NOTICE: RCB_WARNING: game Batman was found in 
parsed results but not in your rom collection.

Is there a reason for this?

Original comment by mdegu...@gmail.com on 26 Jun 2014 at 10:06

GoogleCodeExporter commented 8 years ago
drwxr-xr-x 3 test test  4096 Jun 26 18:05 ./
drwxr-xr-x 7 test test  4096 Jun 26 17:50 ../
-rwxr-xr-x 1 test test 29429 Jun 26 17:57 config.xml*
-rwxr-xr-x 1 test test 31744 Jun 26 18:05 MyGames.db*
-rwxr-xr-x 1 test test    55 Jun 26 18:07 scrapeResult_missingArtwork.txt*
-rwxr-xr-x 1 test test    55 Jun 26 18:07 scrapeResult_missingDesc.txt*
-rwxr-xr-x 1 test test    74 Jun 26 18:07 scrapeResult_possibleMismatches.txt*
drwxr-xr-x 2 test test  4096 Jun 26 17:40 scriptfiles/
-rwxr-xr-x 1 test test  1718 Jun 26 18:05 settings.xml*

I tried removing the scrape results before trying again, but didn't make a 
difference. At least I know now that the reason why its "waiting" is it's 
scanning every MAME game. There must be a setting or something I can clear 
before hand in my script.

Original comment by mdegu...@gmail.com on 26 Jun 2014 at 10:11

GoogleCodeExporter commented 8 years ago
So it looks like it does not really freeze but it just stupidly scans 
description files?

Maybe that is a good hint for me to investigate. I guess there is nothing you 
can do about it by configuration. I have to check the code why it starts 
scanning the description file even if there are no games to scrape.

Original comment by maloep on 27 Jun 2014 at 7:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Yep, at least I see now what happened, something triggers the offline scraper 
to just go through the whole mame.txt list and sit at the main screen. Even as 
a small fix, knowing where it was in that would be something too, but for me it 
just shows "adding roms". Sorry for the confusion, but I think we're on the 
same page now.  Thank you maleop. I'll try to test this a few more times today 
to see the conditions, but most times it was either nothing left to import/add, 
or nothing in any folder, possibly.

Original comment by mdegu...@gmail.com on 27 Jun 2014 at 10:29

GoogleCodeExporter commented 8 years ago
It is fixed in svn now: 
https://code.google.com/p/romcollectionbrowser/source/detail?r=1820

It will take some more time until I release a new version. But you could 
already get it via svn or do the change yourself if you don't want to wait.

Original comment by maloep on 28 Jun 2014 at 4:16

GoogleCodeExporter commented 8 years ago
Meh, it is too early. You also have to apply this bugfix: 
https://code.google.com/p/romcollectionbrowser/source/detail?r=1821

Original comment by maloep on 28 Jun 2014 at 4:29

GoogleCodeExporter commented 8 years ago
Both of those links are for dbupdate.py Does the second link source super-cede 
the first? Thank you for looking at this.

Original comment by mdegu...@gmail.com on 29 Jun 2014 at 3:34

GoogleCodeExporter commented 8 years ago
Tested this fix out, seems to work great, Thank you very much. It snaps right 
back to the game selection when no ROMs are present. kudos

Original comment by mdegu...@gmail.com on 29 Jun 2014 at 3:40

GoogleCodeExporter commented 8 years ago
When I do a second time import, I still get game scans in the offline scraper:

08:13:11 T:139886536480512  NOTICE: RCB_INFO: searching for Key: grudge
08:13:11 T:139886536480512  NOTICE: RCB_WARNING: game Grudge Match was found in 
parsed results but not in your rom collection.
08:13:11 T:139886536480512  NOTICE: RCB_INFO: searching for Key: grmatch
08:13:11 T:139886536480512  NOTICE: RCB_WARNING: game Grudge Match was found in 
parsed results but not in your rom collection.
08:13:11 T:139886536480512  NOTICE: RCB_INFO: searching for Key: gryzor
08:13:11 T:139886536480512  NOTICE: RCB_WARNING: game Gryzor was found in 
parsed results but not in your rom collection.
08:13:11 T:139886536480512  NOTICE: RCB_INFO: searching for Key: gticlub2
08:13:11 T:139886536480512  NOTICE: RCB_WARNING: game GTI Club - Corso Italiano 
was found in parsed results but not in your rom collection.
08:13:11 T:139886536480512  NOTICE: RCB_INFO: searching for Key: gticlub

I did change dbupdate.py to the code you mentioned above in #13

Original comment by mdegu...@gmail.com on 16 Jul 2014 at 12:25