24bd74826d0748ee6a37622611ff380b4eb1e9b0 markd Fri Apr 20 18:40:01 2018 -0700 fix segv in generating label for gencode 2-way pseudo and poly-A tracks. Addresses #21266 and most likely #21298 diff --git src/hg/hgTracks/gencodeTracks.c src/hg/hgTracks/gencodeTracks.c index eb03734..406eb35 100644 --- src/hg/hgTracks/gencodeTracks.c +++ src/hg/hgTracks/gencodeTracks.c @@ -525,31 +525,34 @@ concatItemName(name, sizeof(name), attrs->geneId); if (enabledLabels & ITEM_LABEL_TRANSCRIPT_ID) concatItemName(name, sizeof(name), gp->name); return cloneString(name); } static struct linkedFeatures *loadGencodeTranscript(struct track *tg, struct gencodeQuery *gencodeQuery, char **row, unsigned enabledLabels, struct hash *highlightIds, unsigned highlightColor) /* load one genePred record into a linkedFeatures object */ { struct genePred *gp = gencodeQueryGenePred(gencodeQuery, row); struct wgEncodeGencodeAttrs *attrs = gencodeQueryAttrs(gencodeQuery, row); // maybe NULL struct linkedFeatures *lf = linkedFeaturesFromGenePred(tg, gp, TRUE); if (highlightIds != NULL) highlightByGetColor(gp, highlightIds, highlightColor, lf); +if (gencodeQuery->isGenePredX) lf->extra = getTranscriptLabel(enabledLabels, gp, attrs); +else + lf->extra = cloneString(gp->name); wgEncodeGencodeAttrsFree(&attrs); return lf; } static void loadGencodeTrack(struct track *tg) /* Load genePreds in window info linked feature, with filtering, etc. */ { struct sqlConnection *conn = hAllocConn(database); unsigned enabledLabels = getEnabledLabels(tg); boolean needAttrs = (enabledLabels & ITEM_LABEL_GENE_ID) != 0; // only for certain labels struct hash *highlightIds = NULL; if (anyFilterBy(tg, highlightBySetGet)) highlightIds = loadHighlightIds(conn, tg); struct gencodeQuery *gencodeQuery = geneQueryConstruct(tg, needAttrs); struct sqlResult *sr = executeQuery(conn, gencodeQuery);