Blank Display was Re: [jsword-devel] Patch for clean install

DM Smith jsword-devel@crosswire.org
Fri, 26 Mar 2004 15:13:40 -0500


Joe, you have actually identified a timing problem.
public OuterDisplayPane()
{
        *************** This is on the main thread ***************
    try
    {
        ********* Books is populated by a different thread ***************
        List booklist = 
Books.installed().getBookMetaDatas(BookFilters.getBibles());

        ********* What this returns depends upon which thread works faster. 
**********
        if (booklist.size() != 0)
        {
            Book book = ((BookMetaData) booklist.get(0)).getBook();
            txtPassg.setBook(book);
         }
        initialize();
    }
    // TODO: make this into an Exception again
    catch (Throwable ex)
    {
        log.error("Failed to set default book", ex);
    }
}

>From: Joe Walker <joe@eireneh.com>
>Reply-To: jsword-devel@crosswire.org
>To: jsword-devel@crosswire.org
>Subject: Re: Blank Display was Re: [jsword-devel] Patch for clean install
>Date: Fri, 26 Mar 2004 19:55:51 +0000
>
>DM Smith wrote:
>
>>I have attached an image of what I am seeing. Is this the same problem you 
>>see?
>>In my case it is because there are no books and the "return" is hit.
>
>Yes same problem.
>I'd just worked out that it was repeatable if I made the disk work hard (by 
>defragging) so the SwordDriver thread was slower than the GUI builder 
>thread, and then I saw the return statement and felt very very silly.
>
>It's fixed now.
>
>Joe.
>
>_______________________________________________
>jsword-devel mailing list
>jsword-devel@crosswire.org
>http://www.crosswire.org/mailman/listinfo/jsword-devel

_________________________________________________________________
Free up your inbox with MSN Hotmail Extra Storage. Multiple plans available. 
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/