Version 3.2 release imminent (TX and LifeDrive robustness)!

"Gregg Woodcock" <[email protected]> Sun, 01 Jan 2006 05:24:37 -0000
Newsgroups gmane.comp.handhelds.palm.yanoff
Message-ID <[email protected]>
Just wanted to let everyone know that there has been a VERY great 
deal of work done to identify and resolve the frequent crashes 
experienced in all version (e.g. including GPL) of Yanoff.  There was 
a very severe day-1 design flaw in Yanoff that was never a problem 
until the latest NVFS devices.  These devices cause highly frequent 
swapping of unlocked memory.  This means that if memory being 
accessed isn't locked down when it is retrieved, code a few seconds 
or lines later that accesses that memory location will probably get 
garbage due to the memory having already been recycled!

As part of my licensing agreement with Matthias, I am to provide help 
in fixing bugs in the GPL stream so I am going to describe the bug in 
detail now.  I cannot provide the code changes because they are far 
too numerous and our code paths have strayed far too much but the 
basic description should provide anyone interested in making the fix 
all they need to update GPL.

What is a problem w/ NVFS(but has ALWAYS worked fine) is code like 
this:
   h = DmQueryRecord();
   p = MemHandleLock(h);
   MemHandleUnlock(h);
   use p // only used for short period of time after unlocking

This is done in a few areas in Yanoff but the major one is when 
viewing an article.  Many things will cause an article to be redrawn 
to the screen which will cause the "p" to be reaccessed.  With NVFS, 
it is almost certain that this memory location will no longer contain 
the correct data because it will have been recycled.  The solution is 
to do something like this:
   h = DmQueryRecord();
   p = MemHandleLock(h);
   use p // do not unlock until totally done with this memory!
   MemHandleUnlock(h);

The way I implemented this was to modify ArtReadArticle() in artdb.c 
to return the handle to the locked handle on top of modifying the 
pointers in the article variable.  Of course this means that 
the "MemHandleUnlock(h)" which was inside ArtReadArticle() is deleted 
and all outside callers (*many*) must track the handle and free it at 
the proper time.  So while the solution is simple, it is very 
involved and requires quite a bit of rearranging and testing.  The 
other solution (wasteful of memory but FAR simpler) would be to make 
a *copy* of the article like this:
   h = DmQueryRecord();
   p = MemHandleLock(h);
   pCopy = copy p;
   MemHandleUnlock(h);
   use pCopy;
If pCopy were a global variable, it could be "recycled" inside 
ArtReadArticle adding a call to "ArtFreeData(pCopy)" at the very top 
of the function and then making sure to also call it from StopApp.
This is brain-dead simple and would take all of a few minutes of 
coding.

Anyway, the good news is that New Yanoff was fixed the "right" way 
and has been running GREAT on all the NVFS devices in the beta test 
group for a few weeks so I am in the process of tieing up some loose 
ends and hope to get 3.2 out in a few days.  There are several other 
important bug fixes (including the "NG Prefs" crashes) and a few 
new "goodies", too, so watch out for it!

I have requested Palm update the emulator/simulator debug ROMs in a 
very simple way to make these problems immediately evident but have 
not received a response.  In any case, they have all been rooted out 
in New Yanoff and have made the app rock-solid stable (there were 
very infrequent crashes on earlier devices because of this bug but 
because they were so rare and unreproducibale, nobody could find 
them).

I just wanted to let everyone know that we are doing our best to keep 
up with all the problems as they come up.  I should have announced 
the 3.2 efforts earlier but just didn't think to do it until we began 
to receive complaints over Christmas holiday.  So Merry Christmas and 
watch your mailbox and the list for the 3.2 release announcement and 
hopefully we will all have a crash-free new year!!!






To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/yanoff/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/