3670b9f2a58342dcc0629bad9d221a9d5e4ae5ff
braney
  Thu Apr 23 14:39:37 2026 -0700
hgGene: render all sections and the Methods page for QuickLift knownGene clicks. refs #36370

- synonym.c: wrap the coord-qualified kgProteinID lookup in emptyForNull.
After quickLiftGenePred() rewrites curGeneChrom/Start/End to destination
coords, the same-transaction lookup against the source assembly's
knownGene table misses and sqlGetField returns NULL; strstr(NULL, "-")
on the next line segfaulted, truncating the page at <B>Protein: </B>
so GeneReviews, Methods, and any later sections never rendered.
- hgGene.c doKgMethod: when the track is quickLifted and the hub trackDb
has no html, refetch the trackDb from quickLiftDb using
trackHubSkipHubName(tableName). The Methods "Click here" link was
landing on a page whose entire body was printf("%s", NULL) => "(null)".

Verified on hgwdev-braney with Gerardo's repro (hg38 -> hs1 QuickLift,
chr7:156982676-156996015 window, MNX1 / ENST00000469500.5): all 13
sections now render and Methods serves the full GENCODE description.
No change on the native hg38 path.

diff --git src/hg/hgGene/synonym.c src/hg/hgGene/synonym.c
index 8e7f732c3aa..ea69102c129 100644
--- src/hg/hgGene/synonym.c
+++ src/hg/hgGene/synonym.c
@@ -371,31 +371,31 @@
     else
     /* do not show URL link if it is not found in gbCdnaInfoTable */
     	{
     	hPrintf("<B>Representative RNA: %s </B>", mrnaAcc);
     	}
     }
 if (protAcc != NULL)
     {
     kgProteinID = cloneString("");
     if (hTableExists(sqlGetDatabase(conn), "knownGene")
         && (isNotEmpty(curGeneChrom) &&
 	      differentWord(curGeneChrom,"none")))
     	{
     	sqlSafef(condStr, sizeof(condStr), "name = '%s' and chrom = '%s' and txStart=%d and txEnd=%d", 
 	        id, curGeneChrom, curGeneStart, curGeneEnd);
-    	kgProteinID = sqlGetField(sqlGetDatabase(conn), "knownGene", "proteinID", condStr);
+    	kgProteinID = emptyForNull(sqlGetField(sqlGetDatabase(conn), "knownGene", "proteinID", condStr));
     	}
 
     hPrintf("<B>Protein: ");
     if (strstr(kgProteinID, "-") != NULL)
         {
 	parAcc = cloneString(kgProteinID);
 	chp = strstr(parAcc, "-");
 	*chp = '\0';
 	
         /* show variant splice protein and the UniProt link here */
 	hPrintf("<A HREF=\"http://www.uniprot.org/uniprot/%s\" "
 	    "TARGET=_blank>%s</A></B>, splice isoform of ",
 	    kgProteinID, kgProteinID);
         hPrintf("<A HREF=\"http://www.uniprot.org/uniprot/%s\" "
 	    "TARGET=_blank>%s</A></B>\n",