FS#6712 - Unable to set Database as Start Screen

Attached to Project: Rockbox
Opened by Alan F (alsaf) - Friday, 02 March 2007, 15:36 GMT
Last edited by Steve Bavin (pondlife) - Friday, 02 March 2007, 16:27 GMT
Task Type Bugs
Category User Interface
Status Closed
Assigned To No-one
Operating System Iriver H100 series
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


DAP : H120
Build: 070302

With the new root menu (, there is an option to set the start screen to something other than the Main Menu.

When the Database menu is set as start menu, each time the DAP is turned on the message 'Database is not ready' appears and the main menu appears. This is wrong as the Database menu should appear.

I have set Start menu to different options ie File, settings and both have worked.

I have noticed in other builds with the old root menu (when it is set to database menu) that if you click on any of the options as soon as the menu appears after boot the 'Database is not ready' message appears. I then have to wait for about a second or two before I can access option with message appearing.

I am not sure if this is specific to the H100 series but it looks like the start menu is run before the database is 'initialised'.
This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Saturday, 03 March 2007, 13:26 GMT
Reason for closing:  Fixed
Additional comments about closing:  I was wrong about the code.. fixed in svn
Comment by Alan F (alsaf) - Friday, 02 March 2007, 15:51 GMT
I have 2797 music files on my DAP so I'm not sure if that has any bearing on this issue.
Comment by Dominik Riebeling (bluebrother) - Friday, 02 March 2007, 20:59 GMT
I can confirm this. While the database itself is initialized and works correctly setting it as root screen results in a "Database not ready" splash. H120, even more music files (according to the stats plugin).
Comment by Alan F (alsaf) - Saturday, 03 March 2007, 01:42 GMT
I've downloaded source from SVN and ran the UISimulator.

In the Simulator folder I have 68 OGG files. The database menu appears as root menu after the Database has been initialised for first time. When the simlulator is run again, the message 'Database not ready" message appears about when the following messages appears in console:

We open the real file 'archos/.rockbox/viewers.config'
We open the real file 'archos/.rockbox/nvram.bin'

I tested it with 1 OGG file in simulator folder and same thing happened.
Comment by Alan F (alsaf) - Saturday, 03 March 2007, 02:05 GMT
I commented out lines 97 to 101 of root_menu.c

I then compiled source code and ran simulator. The database menu appears as start menu.
Comment by Linus Nielsen Feltzing (linusnielsen) - Saturday, 03 March 2007, 09:09 GMT
Isn't it as simple as the database not being ready when you enter the screen? It surely takes a little while to load the database. Perhaps it should wait a while and try again?
Comment by Alan F (alsaf) - Saturday, 03 March 2007, 09:56 GMT
The bug is to do with the database menu not appearing as default start screen after being set in the settings menu. The File and Settings menus can be set as default start screen but database can not.

Lines 97 to 101 in root_menu.c checks to see if database is ready, if not then throw up message and use previous menu else use database menu. I don't know if this works on other builds but on the H120, there must be performance issues that prevents the database from being ready before the start screen is initialised. I can confirm that in previous builds on my H120, the database is never ready for about a second or two after the old main menu appeared.

Comment by Linus Nielsen Feltzing (linusnielsen) - Saturday, 03 March 2007, 10:06 GMT
Yes, I know that the bug is about the database not appering as the start screen. I also explained a theory about the database not being ready when the startscreen is about to be displayed, because it takes a while to load.

You now replied with the exact same theory.

If the database is not ready, then it isn't. Removing the check is not the solution.
Comment by Alan F (alsaf) - Saturday, 03 March 2007, 10:25 GMT
Apologies Linus, I've just started to look 'behind the scenes' of Rockbox and my enthusiasm is getting the better of me!! I did not read your reply properly.

I tried to identify the cause of bug. Unfortunately I don't have experience and knowledge to fix it.
Comment by Jonathan Gordon (jdgordon) - Saturday, 03 March 2007, 11:39 GMT
Linus is correct, if the DB init's fast enough the setting will work.. but it doesnt.

We dont really have much choice here without complicating the code... either we show the "Not ready" splash every time we try to go into the DB (and its not ready), or go back to how it worked before (You get the splash when you try entering a filter).

I dont care either way, so ill leave it up to whoever speaks loudest :p
Comment by Linus Nielsen Feltzing (linusnielsen) - Saturday, 03 March 2007, 13:11 GMT
The second option sounds like the best solution to me, to only show the splash when you enter a filter. BUT - would it be possible to only bypass the initial check if the screen is entered via the start screen setting?