580d700d1a63bda4ff75f3f5297d9a92e55e69cf
galt
  Sat Apr 9 11:36:55 2016 -0700
Fixes problem where altGraphX creates special spaceSavers without setting the window and vis fields

diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c
index 76bb73d..b7ce304 100644
--- src/hg/hgTracks/simpleTracks.c
+++ src/hg/hgTracks/simpleTracks.c
@@ -408,31 +408,36 @@
 // allowOverflow is currently ONLY used by xenoMrna and est tracks.
 //  When true,  the extra rows are kept, printed at the bottom in dense and Last Row: overlow count appears at bottom of leftLabel area.
 //  When false, the extra rows are tossed, the count seems to equal overflow limit + 2, and limitVisibility lowers vis and retries.
 
 // do not calculate if still loading all windows
 if (trackLoadingInProgress) // we pack after all windows are loaded.
     {
     // do not set ss yet
     return 0;  // height of 0 triggers unsetting limitedVis since our data is not all loaded yet and it will get set later.
     }
 
 // do not re-calculate if not needed
 if (tg->ss)
     {
     if (tg->ss->window != currentWindow)
+	{
+	// altGraphX creates its own specialized spaceSavers for full vis.
+	// and the routines (hgTracks/altGraphXTrack.c and hg/lib/altGraphX.c) do not set ss->window or ss->vis.
+	if (!sameString(tg->tdb->type,"altGraphX"))
 	    errAbort("unexpected current window %lu, expected %lu", (unsigned long) currentWindow, (unsigned long) tg->ss->window);
+	}
     struct spaceSaver *ss = findSpaceSaver(tg, vis);
     if (ss)
 	return ss->rowCount;
     // Falls thru here if a new visibility is needed, such as full changing to pack after limitVisibility.
     // This will usually be when it is the first window and it is requesting a new vis.
     }
 
 if (currentWindow != windows)  // if not first window
     {
     errAbort("unexpected current window %lu, expected first window %lu", (unsigned long) currentWindow, (unsigned long) windows);
     }
 
 // If we get here, currentWindow should be first window i.e. windows var.
 
 struct slList *item;