7d448227a9ce33288ecae8cbf6d9a9ef0111c034
galt
  Thu Oct 14 00:33:49 2021 -0700
Needed to wait until the process had gotten further than track loading before using ss spaceSaver. fixes #28291

diff --git src/hg/hgTracks/gtexTracks.c src/hg/hgTracks/gtexTracks.c
index f0dc3a1..ddd5b7f 100644
--- src/hg/hgTracks/gtexTracks.c
+++ src/hg/hgTracks/gtexTracks.c
@@ -1116,58 +1116,61 @@
     lineHeight=heightPer+1;
     }
 else if ((vis == tvPack) || (vis == tvFull))
     {
     // layout -- initially as fixed height
     heightPer = tl.fontHeight;
     lineHeight=heightPer;
     }
 
 height = tgFixedTotalHeightOptionalOverflow(tg, vis, lineHeight, heightPer, FALSE);
 
 if ((vis == tvPack) || (vis == tvFull))
     {
     // set variable height rows
 
+    if (tg->ss)  // got past trackLoadingInProgress
+	{
 	struct spaceSaver *ss = findSpaceSaver(tg, vis); // ss is a list now
 	assert(ss); // viz matches, we have the right one
 
 	if (ss && ss->rowCount != 0)
 	    {
 	    if (!ss->rowSizes)
 		{
 		// collect the rowSizes data across all windows
 		assert(currentWindow==windows); // first window
 		assert(tg->ss->vis == vis); // viz matches, we have the right one
 		struct spaceSaver *ssHold; 
 		AllocVar(ssHold);
 		struct track *tgSave = tg;
 		for(tg=tgSave; tg; tg=tg->nextWindow)
 		    {
 		    assert(tgSave->ss->vis == tg->ss->vis); // viz matches, we have the right one
 		    spaceSaverSetRowHeights(tg->ss, ssHold, gtexGeneHeight);
 		    }
 		// share the rowSizes data across all windows
 		for(tg=tgSave; tg; tg=tg->nextWindow)
 		    {
 		    tg->ss->rowSizes = ssHold->rowSizes;
 		    }
 		tg = tgSave;
 		}
 	    height = spaceSaverGetRowHeightsTotal(ss);
 	    }
 	}
+    }
 tg->height = height;
 
 return height;
 }
 
 static void gtexGenePreDrawItems(struct track *tg, int seqStart, int seqEnd,
                                 struct hvGfx *hvg, int xOff, int yOff, int width,
                                 MgFont *font, Color color, enum trackVisibility vis)
 {
 if (vis == tvSquish || vis == tvDense)
     {
     // NonProp routines not relevant to these modes, and they interfere
     // NOTE: they must be installed by gtexGeneMethods() for pack mode
     tg->nonPropDrawItemAt = NULL;
     tg->nonPropPixelWidth = NULL;