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/mainPage.c src/hg/hgTables/mainPage.c index 5ff1562..47842b5 100644 --- src/hg/hgTables/mainPage.c +++ src/hg/hgTables/mainPage.c @@ -1032,24 +1032,23 @@ /* Hidden form for jumping to custom tracks CGI. */ hPrintf("
", hgCustomName()); cartSaveSession(cart); hPrintf("
\n"); /* Hidden form for jumping to track hub manager CGI. */ hPrintf("
", hgHubConnectName()); cartSaveSession(cart); hPrintf("
\n"); webNewSection("Using the Table Browser\n"); printMainHelp(); } -void doMainPage(struct sqlConnection *conn, boolean webStarted) +void doMainPage(struct sqlConnection *conn) /* Put up the first page user sees. */ { -if (!webStarted) htmlOpen("Table Browser"); mainPageAfterOpen(conn); htmlClose(); }