Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gt gff3 -addintrons: ssertion failed: (elemidx >= q->front), function gt_queue_remove, file src/core/queue.c, line 165. #935

Open
dweemx opened this issue Jan 15, 2020 · 2 comments

Comments

@dweemx
Copy link

dweemx commented Jan 15, 2020

Problem description

Exact command line call triggering the problem

$ gt gff3 -addintrons -o dmel-all-r6.31.updated.gff dmel-all-r6.31.gff
first: -1       999
second: 3409    999
first: -1       999
second: 3409    999
first: -1       999
second: 998     999
Assertion failed: (elemidx >= q->front), function gt_queue_remove, file src/core/queue.c, line 165.
This is a bug, please report it at
https://github.com/genometools/genometools/issues
Please make sure you are running the latest release which can be found at
http://genometools.org/pub/
You can check your version number with `gt -version`.
Aborted (core dumped)

$ git diff
diff --git a/src/core/queue.c b/src/core/queue.c
index daf7709f8..6af4eecee 100644
--- a/src/core/queue.c
+++ b/src/core/queue.c
@@ -154,11 +154,14 @@ void gt_queue_remove(GtQueue *q, void *elem)
       if (q->back == 0) q->back = q->size;
       return;
     }
+    printf("first: %ld\t%ld\n", elemidx, q->front);
     for (i = q->size-1; i >= q->front; i--) {
+    //printf("for: %ld\t%ld\n", i, q->front);
       if (q->contents[i] == elem)
         break;
     }
     elemidx = i;
+    printf("second: %ld\t%ld\n", elemidx, q->front);
     gt_assert(elemidx >= q->front); /* valid element found */
     for (i = elemidx+1; i < q->size; i++)
       q->contents[i-1] = q->contents[i];

Example minimal input triggering the problem

dmel-all-r6.31.gff = ftp://ftp.flybase.net/releases/FB2019_06/dmel_r6.31/gff/dmel-all-r6.31.gff.gz

What GenomeTools version are you reporting an issue for (as output by gt -version)?

(latest git version)

$ gt --version
gt (GenomeTools) 1.6.1
Copyright (c) 2003-2016 G. Gremme, S. Steinbiss, S. Kurtz, and CONTRIBUTORS
Copyright (c) 2003-2016 Center for Bioinformatics, University of Hamburg
See LICENSE file or http://genometools.org/license.html for license details.

Used compiler: cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
Compile flags:  -g -Wall -Wunused-parameter -pipe -fPIC -Wpointer-arith -Wno-unknown-pragmas -O3 -Werror

Did you compile GenomeTools from source? If so, please state the make parameters used.

make install

What operating system (e.g. Ubuntu, Mac OS X), OS version (e.g. 15.10, 10.11) and platform (e.g. x86_64) are you using?

CentOS 7 x86_64

@satta
Copy link
Member

satta commented Jan 15, 2020

Looks like something to do with pseudo node generation in nodes with Parents set but with no IDs. The GenomeTools parser is trying to be smart here but seems to be unable to make sense of the input. I am afraid this will require some deeper debugging.

@satta
Copy link
Member

satta commented Jan 15, 2020

The node to be removed in the offending call to gt_queue_remove is very weird: a feature node with no line number, no attributes and no type.

(lldb) p *(GtFeatureNode*) elem
(GtFeatureNode) $4 = {
  parent_instance = {
    c_class = 0x0000000100b0e430
    filename = 0x0000000000000000
    userdata = 0x0000000000000000
    line_number = 0
    reference_count = 7
    userdata_nof_items = 0
  }
  seqid = 0x0000000100c02d30
  source = 0x0000000100b0e4f0
  type = 0x0000000000000000 <no value available>
  range = (start = 26524, end = 58150)
  score = 3.40282347E+38
  attributes = 0x0000000000000000 <no value available>
  bit_field = 37664
  children = 0x0000000100e05680
  representative = 0x0000000000000000
  observer = 0x0000000000000000
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants