Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3609 by Error displaying diff, wrapping index char traceback

*** You must complete this form in its entirety, or your bug report will be
*** rejected.
*** If you have a security issue to report, please send it confidentially
*** Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
*** For customer support, please post to
*** If you have a patch, please submit it to
*** This bug tracker is public. Please check that any logs or other
*** that you include has been stripped of confidential information.

What version are you running?

What's the URL of the page containing the problem?
http://<host behind firewall>

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/", 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/", 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/", 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/", line 369, in _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/", 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/", line 153, in get_chunks
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/Djblets-0.8.11-py2.7.egg/djblets/cache/", 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/", 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/", 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/", 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/", line 425, in _highlight_indentation
File "/local/ichnaea_conf/site/python_ve/reviewboard_v2.0/lib/python2.7/site-packages/ReviewBoard-2.0.8-py2.7.egg/reviewboard/diffviewer/", 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.

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.

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to