On Fri, May 1, 2020 at 3:05 AM Jeffrey Walton <noloa...@gmail.com> wrote: > > On Fri, May 1, 2020 at 2:14 AM Andreas Tille <andr...@fam-tille.de> wrote: > > > > ... > > ==13209== Process terminating with default action of signal 10 (SIGBUS) > > ==13209== at 0x12D5CC: PairDistances (pair_dist.c:346) > > ==13209== by 0x119410: AlignmentOrder (clustal-omega.c:835) > > ==13209== by 0x11A6C4: Align (clustal-omega.c:1221) > > ==13209== by 0x1171C8: MyMain (mymain.c:1192) > > ==13209== by 0x113CCC: main (main.cpp:469) > > Here is line 346 in > https://salsa.debian.org/med-team/clustalo/-/blob/master/src/clustal/pair_dist.c#L346: > > NewProgress(&prProgress, LogGetFP(&rLog, LOG_INFO), > "Ktuple-distance calculation progress", bPrintCR); > > For testing, change LogGetFP(&rLog, LOG_INFO) for stdout for testing. I.e., > > NewProgress(&prProgress, stdout,, > "Ktuple-distance calculation progress", bPrintCR); > > It looks like LogGetFP retrieves an entry in an array of FILE*. From > https://salsa.debian.org/med-team/clustalo/-/blob/master/src/clustal/log.h: > > typedef struct { > /* the higher the level, the more priority it has. numbers must be > * sequential > */ > > /* array of function pointers */ > void (*prFunc[LOG_NUM_LEVELS]) (FILE *prFP, char *pcFormat, > va_list rVArgList); > FILE *prFP[LOG_NUM_LEVELS]; > char *prPrefix[LOG_NUM_LEVELS]; > > /* everything above this level will be printed */ > int iLogLevelEnabled; > } log_t; > > And > https://salsa.debian.org/med-team/clustalo/-/blob/master/src/clustal/log.c: > > FILE * > LogGetFP(log_t *prLog, int iLevel) > { > assert(iLevel>=0 && iLevel<=LOG_NUM_LEVELS); > return prLog->prFP[iLevel]; > } > > That should help determine if something is sideways in the log_t structure.
Also, I think this should be: > FILE * > LogGetFP(log_t *prLog, int iLevel) > { > assert(iLevel>=0 && iLevel<LOG_NUM_LEVELS); > return prLog->prFP[iLevel]; > } That is, 'iLevel<LOG_NUM_LEVELS' (not 'iLevel<=LOG_NUM_LEVELS'). Jeff