56e0ec54f202496d46891c2760b01c556b4f75c9 chmalee Mon Nov 10 12:07:24 2025 -0800 We added super tracks to the trackDb list when hashing up all the tracks and groups, so don't call hubCollectTracks again when finding searchable tracks because the track db list got all rearranged and it now points to a stale copy, refs #36640 diff --git src/hg/lib/hgFind.c src/hg/lib/hgFind.c index 31348eca7f4..b9a39547369 100644 --- src/hg/lib/hgFind.c +++ src/hg/lib/hgFind.c @@ -44,30 +44,31 @@ #include "chromAlias.h" #include "cart.h" #include "cartTrackDb.h" #include "jsonParse.h" // Exhaustive searches can lead to timeouts on CGIs (#11626). // However, hgGetAnn requires exhaustive searches (#11665). #define NONEXHAUSTIVE_SEARCH_LIMIT 500 #define EXHAUSTIVE_SEARCH_REQUIRED -1 #define SNIPPET_LIMIT 100 char *hgAppName = ""; /* Caches used by hgFind.c */ struct hash *hgFindTrackHash = NULL; +struct trackDb *hgFindTdbList = NULL; /* alignment tables to check when looking for mrna alignments */ static char *estTables[] = { "intronEst", "all_est", "xenoEst", NULL }; static char *estLabels[] = { "Spliced ESTs", "ESTs", "Other ESTs", NULL }; static char *mrnaTables[] = { "all_mrna", "xenoMrna", NULL }; static char *mrnaLabels[] = { "mRNAs", "Other mRNAs", NULL }; static struct dyString *hgpMatchNames = NULL; void hgPosFree(struct hgPos **pEl) /* Free up hgPos. */ { struct hgPos *el; if ((el = *pEl) != NULL) { freeMem(el->name); @@ -3263,31 +3264,31 @@ } } tables = estTables; while ((table = *tables++) != NULL) { if ( (tdb = hashFindVal(hgFindTrackHash, table)) != NULL) { struct searchableTrack *tmp = makeGenbankSearchableTrack(tdb, cart); struct searchCategory *category = makeCategory(cart, tmp->track, tmp, db, groupHash); if (category) slAddHead(&ret, category); } } // add hub tracks to list -struct trackDb *hubList = hubCollectTracks(db, NULL); +struct trackDb *hubList = hgFindTdbList; hubList = getSearchableBigBeds(hubList); for (tdb = hubList; tdb != NULL; tdb = tdb->next) { int visibility = isTrackVisible(cart, tdb); struct searchCategory *tmp = searchCategoryFromTdb(tdb, NULL, visibility); if (tmp) slAddHead(&ret, tmp); } return ret; } struct searchCategory *getAllCategories(struct cart *cart, char *db, struct hash *groupHash) /* Return all searchable stuff, both current db specific tracks, and things like hubs that searchable * no matter the current database */ {