list index out of range when running dxr index



3 years ago
3 years ago


(Reporter: jlmarr53, Unassigned)



Firefox Tracking Flags

(Not tracked)




3 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9

Steps to reproduce:

dxr index --verbose

Actual results:

lines from csvs: digest c55ad468a423555442afed761ac74c48d7593759 .. num paths 3
condense_file: file_path drv/dinc/schema/DisplayUI_UICompDoubleStepper_Type.hxx
lines from csvs: digest 21aa7c224fc1bc1be9cad0d1da01cbe83d460b3d .. num paths 4
condense_file: file_path drv/dinc/schema/DisplayUI_UICompDynamicSection.hxx
lines from csvs: digest 782498163553b121e4fb68f54d66235f8f32faee .. num paths 14
Traceback (most recent call last):
  File "/scratch/dxr-es-based/pypyenv40/bin/dxr", line 9, in <module>
    load_entry_point('dxr==2.0', 'console_scripts', 'dxr')()
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/cli/", line 29, in main
    return dxr.invoke(ctx)
  File "/scratch/dxr-es-based/pypyenv40/site-packages/click-4.1-py2.7.egg/click/", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/scratch/dxr-es-based/pypyenv40/site-packages/click-4.1-py2.7.egg/click/", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/scratch/dxr-es-based/pypyenv40/site-packages/click-4.1-py2.7.egg/click/", line 464, in invoke
    return callback(*args, **kwargs)
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/cli/", line 26, in index
    index_and_deploy_tree(tree, verbose=verbose)
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/", line 64, in index_and_deploy_tree
    index_name = index_tree(tree, es, verbose=verbose)
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/", line 275, in index_tree
    index_files(tree, tree_indexers, index, pool, es)
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/", line 628, in index_files
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/", line 581, in index_chunk
    index_file(tree, tree_indexers, path, es, index)
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/", line 551, in index_file
    for chunk in bulk_chunks(docs(), docs_per_chunk=300, bytes_per_chunk=10000):
  File "/scratch/dxr-es-based/pypyenv40/site-packages/pyelasticsearch-1.4-py2.7.egg/pyelasticsearch/", line 31, in bulk_chunks
    for action in actions:
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/", line 528, in docs
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/", line 468, in finished_tags
    tags = list(tag_boundaries(chain(refs, regions)))
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/", line 338, in tag_boundaries
    for start, end, data in tags:
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/plugins/clang/", line 108, in refs
    yield (self.char_offset(start.row, start.col),
  File "/scratch/dxr-es-based/pypyenv40/site-packages/dxr-2.0-py2.7.egg/dxr/", line 298, in char_offset
    return self._line_offsets()[row - 1] + col
IndexError: list index out of range

Expected results:

Complete with no error

Comment 1

3 years ago
This appears to be caused when rerunning the dxr build after some source files have changed but the corresponding csv's have not been regenerated.   I believe there is an enhancement request to support incremental builds, which is what I want.   But the bottom line is this bug should be closed as user error.
Last Resolved: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.