What version are you running?
2.0.8
What's the URL of the page containing the problem?
http://<host behind firewall>.cisco.com/r/10256/diff/#
What steps will reproduce the problem?
1. Haven't figured out the exact parameters in which certain file diffs aren't displayed. It is happening fairly often though.
2. In one case, there was a large diff that had a piece:
+ goto error;
+ }
/*
which would work fine, but when changed, removing a trailing space, to:
+ goto error;
+ }
+ /*
it would blow up.
What is the expected output? What do you see instead?
Expect to see the diff of a file.
Instead, see
There was an error displaying this diff.
string index out of range
Traceback (most recent call last):
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/views.py", line 236, in get
renderer = self.create_renderer(context, *args, **kwargs)
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/reviews/views.py", line 1088, in create_renderer
*args, **kwargs)
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/views.py", line 328, in create_renderer
self.diff_file = self._get_requested_diff_file()
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/views.py", line 369, in _get_requested_diff_file
request=self.request)
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 383, in populate_diff_chunks
chunks = generator.get_chunks()
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 153, in get_chunks
large_data=True)
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/Djblets-0.8.11-py2.7.egg/djblets/cache/backend.py", line 111, in cache_memoize
data = lookup_callable()
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 152, in <lambda>
lambda: list(self._get_chunks_uncached()),
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 266, in _get_chunks_uncached
a[i1:i2], b[j1:j2], old_lines, new_lines)
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 377, in _diff_line
old_markup, new_markup, *indentation_change)
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 425, in _highlight_indentation
self._serialize_unindentation)
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 441, in _wrap_indentation_chars
while markup[start_pos] == '<':
IndexError: string index out of range
What operating system are you using? What browser?
Windows 7, Firefox 32.0.3, IE 10
Please provide any additional information below.
Maybe 1 in a couple hundred files are getting tracebacks instead of displaying their diffs after upgrading from 1.7.26 to 2.0.6 (and later to 2.0.8). Tracebacks would indicate an issue in the chunk_generator code. Diffs seem to be fine internally, just bombing when trying to display, as per logs.
There is supposedly one user on another team who is using IE (version ???) and can see the diff just fine. Not working on my IE, Firefox, or anyone else I can find's system. Strange to me that the browser would have anything to do with it.
Speculation:
I'm guessing the [new|old]_markup in _diff_line is being set to '', which when passed to _wrap_indentation_chars is blowing up, as ''[] will give an IndexError.