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/compositeTrack.c src/hg/hgTables/compositeTrack.c index 2169bfe..bd6713a 100644 --- src/hg/hgTables/compositeTrack.c +++ src/hg/hgTables/compositeTrack.c @@ -276,25 +276,25 @@ void doSubtrackMergePage(struct sqlConnection *conn) /* Respond to subtrack merge create/edit button */ { if (ArraySize(curVars) != ArraySize(nextVars)) internalErr(); copyCartVars(cart, curVars, nextVars, ArraySize(curVars)); doSubtrackMergeMore(conn); } void doClearSubtrackMerge(struct sqlConnection *conn) /* Respond to click on clear subtrack merge. */ { cartRemovePrefix(cart, hgtaSubtrackMergePrefix); cartRemovePrefix(cart, hgtaNextSubtrackMergePrefix); -doMainPage(conn, FALSE); +doMainPage(conn); } void doSubtrackMergeSubmit(struct sqlConnection *conn) /* Respond to submit on subtrack merge page. */ { copyCartVars(cart, nextVars, curVars, ArraySize(curVars)); -doMainPage(conn, FALSE); +doMainPage(conn); }