Error with analyze ** glibc detected *** /usr/local/bin/analyzer: double free or corruption (out):

Submitted by Josu on Mon, 09/19/2016 - 11:20


I'm trying to process a Conll File with the analyze script.

The command I use:

task01.posttask.v1.0/corpora/test/es/auto/CESS-CAST-A_11476_20000614.auto_freeling | analyze -f /usr/local/share/freeling/config/es_semeval.cfg

Response of the system:

NEC activated since coreference or semantic graph was requested.
UKB sense disambiguation activated since coreference or semantic graph was requested.
Input mode switched to 'doc' since coreference or semantic graph was requested.
*** glibc detected *** /usr/local/bin/analyzer: double free or corruption (out): 0x000000000d628f80 ***
======= Backtrace: =========

I tried to attach the config files but the spam filter blocked my post

Your problem is that the options "ConllInputConfig" and "ConllOutputConfig" that you used in the config file do not exist.

The "analyze" program is just an example of how to use freeling, and it does not cover all its capabilities.

In particular, it supports a limited number of I/O formats. CoNLL input and output formats accepted by analyzer are not configurable. If you want to check which format it is, use "--output conll" option. If you use the same format for input with "--input conll", it will work. Defining unexisting options in the config file will not work.

If you want to customize your conll I/O format (e.g. to use some specific column order) you need to use your own main program (or adapt to instantiate a conll_input and conll_output classes with the required configuration file.

I had already added the options to config.h and changed the to get the expected behaviour. It seems that it takes the expected Conll configuration files but then the reported crash happens.

These are the changes in

//---- Create input handler for requested format
io::input_handler* create_input_handler(config *cfg) {

io::input_handler *inp;
if (cfg->InputFormat==INP_CONLL) inp = new io::input_conll(cfg->ConllInConfig);
else if (cfg->InputFormat==INP_FREELING) inp = new io::input_freeling();
else inp = NULL;

return inp;

/---- Create output handler for requested format
io::output_handler* create_output_handler(config *cfg) {

io::output_handler *out;
if (cfg->OutputFormat==OUT_TRAIN) {
out = new io::output_train();
else if (cfg->OutputFormat==OUT_CONLL) {
out = new io::output_conll(cfg->ConllOutConfig);

did you try with default conll formats used by freeling?

just to rule out the problem is in the parser...

Or better, can you send me the modified and config.h?

I found the problem:

CoNLL format requires that word IDs start at 1 for each sentence, and your file starts word numbering at 0.
When creating dependency trees, each word points to the ID of its head, and the sentence root has head=0. Thus, no word can have ID=0.

Documentation for all CoNLL shared tasks involving dependency parsing define the format that way.