I found a small bug of HDecode. In the HDecode/HDecode.mod, a heap named 'modendHypHeap' is created by using CreateHeap if both dec->modAlign and MODALIGN are true. However, in the garbage collection of HDecode, the heap is utilized if MODALIGN is true regardless of dec->modAlign. This can cause the following segmentation error since this garbage collection is called at every 100 frames (by default GCFREQ is set to 100 in HLVRec.c). I suggest to add if(dec->modAlign) sentences as follows. static void GarbageCollectPaths (DecoderInst *dec) { int i, l, N; LexNodeInst *inst; TokenSet *ts; if (trace&T_GC) { printf ("Garbage Collecting paths.¥n"); PrintHeapStats (&dec->weHypHeap); PrintHeapStats (&dec->altweHypHeap); #ifdef MODALIGN + if (dec->modAlign) PrintHeapStats (&dec->modendHypHeap); #endif } /*# mark phase */ for (l = 0; l < dec->nLayers; ++l) { if (trace&T_GC) printf (" layer %d...¥n", l); for (inst = dec->instsLayer[l]; inst; inst = inst->next) { switch (inst->node->type) { case LN_MODEL: N = inst->node->data.hmm->numStates; break; default: /* all others are single state */ N = 1; break; } for (i = 0; i < N; ++i) { ts = &inst->ts[i]; if (ts->n > 0) MarkTokSet (ts); } } } /* sweep phase */ SweepPaths (&dec->weHypHeap); SweepAltPaths (&dec->altweHypHeap); #ifdef MODALIGN + if (dec->modAlign) SweepModPaths (&dec->modendHypHeap); #endif if (trace&T_GC) { printf ("Garbage Collection finished.¥n"); PrintHeapStats (&dec->weHypHeap); PrintHeapStats (&dec->altweHypHeap); #ifdef MODALIGN + if (dec->modAlign) PrintHeapStats (&dec->modendHypHeap); #endif } } This prevented the following segmentation fault in my data.