3440: AssertionError displaying changes from diff rev 1 to 2

bruce*****@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Aug. 2, 2014
What version are you running?
2.0.1

What's the URL of the page containing the problem?
https://reviews/r/41256/diff/1-2/

What steps will reproduce the problem?
1. Upload 2 diffs to a review request
2. Use the slider to show the difference between 1 and 2.
3. Depending on the diff content, the diff viewer reports an error.

What is the expected output? What do you see instead?
The diff should be displayed. Instead, an AssertionError is shown.

What operating system are you using? What browser?
Windows 8.1 with both Firefox and Chrome

Please provide any additional information below.

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/views.py", line 236, in get
    renderer = self.create_renderer(context, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/reviews/views.py", line 1102, in create_renderer
    *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/views.py", line 326, in create_renderer
    self.diff_file = self._get_requested_diff_file()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/views.py", line 367, in _get_requested_diff_file
    request=self.request)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 373, in populate_diff_chunks
    chunks = generator.get_chunks()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 148, in get_chunks
    large_data=True)
  File "/usr/local/lib/python2.7/dist-packages/Djblets-0.8.2-py2.7.egg/djblets/cache/backend.py", line 109, in cache_memoize
    data = lookup_callable()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 147, in <lambda>
    lambda: list(self._get_chunks_uncached()),
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 253, in _get_chunks_uncached
    for tag, i1, i2, j1, j2, meta in opcodes_generator:
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/opcode_generator.py", line 70, in __iter__
    self._group_opcodes(opcodes)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/opcode_generator.py", line 141, in _group_opcodes
    for group_index, group in enumerate(opcodes):
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/opcode_generator.py", line 137, in _apply_meta_processors
    for opcode in opcodes:
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/processors.py", line 174, in post_process_filtered_equals
    for tag, i1, i2, j1, j2, meta in opcodes:
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/opcode_generator.py", line 98, in _generate_opcode_meta
    assert (i2 - i1) == (j2 - j1)
AssertionError

Apologies if this has already been fixed - I didn't see any relevant-looking changesets on Github since 2.0.1.
chipx86
#1 chipx86
Huh, haven't seen that before.

I'll unfortunately need the diff in question in order to be able to fix this... Or a variation that reproduces the bug.
  • +NeedInfo
chipx86
#2 chipx86
Up for review at https://reviews.reviewboard.org/r/6030/
  • -NeedInfo
    +PendingReview
  • -Priority-Medium
    +Priority-Critical
    +Milestone-Release2.0.x
    +Component-DiffViewer
  • +chipx86
chipx86
#3 chipx86
  • -PendingReview
    +Fixed
#4 dry.*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Chip,

Could you please explain what you did to fix this?  There are a few diffs on our internal ReviewBoard site that are showing the same error.  I cannot share the diffs as they contain internal code.

ReviewBoard 2.0.2

Thanks
david
#5 david
It's a code change. This change shipped in 2.0.3--I recommend you upgrade.
#6 dry.*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Thanks for the info!