c0b183c96763a6ebf2c050e82859373309a2befe angie Fri Oct 31 17:19:56 2014 -0700 When lookupPosition() returns false (multiple search results), thesubsequent call to doMainPage(conn, TRUE) was causing a popWarnHandler underflow errAbort because doMainPage ends with an htmlClose (which btw invokes popWarnHandler three times: one directly, once in cartWebEnd and once in webEnd). The symptom was that changes made to the main page form before looking up a term that returned multiple results were lost because the underflow errAbort prevented the cart from being saved. The solution is to not use doMainPage(conn, TRUE) but instead to call mainPageAfterOpen enclosed by push and pop of web warn/error handlers. Since doMainPage(conn, TRUE) caused trouble that can be avoided by calling mainPageAfterOpen, I removed the option. I also removed dead code doLookupPosition; dispatch is called only when lookupPosition() has already returned a single match, so the work is already done and it will default to the main page anyway. refs #12557 diff --git src/hg/hgTables/custom.c src/hg/hgTables/custom.c index ca094cb..9ef9425 100644 --- src/hg/hgTables/custom.c +++ src/hg/hgTables/custom.c @@ -608,18 +608,18 @@ } } slReverse(&newList); *pList = newList; } void doRemoveCustomTrack(struct sqlConnection *conn) /* Remove custom track file. */ { getCustomTracks(); if (theCtList) removeNamedCustom(&theCtList, curTable); customTracksSaveCart(database, cart, theCtList); initGroupsTracksTables(); -doMainPage(conn, FALSE); +doMainPage(conn); }