Actions
Defect #19820
closedSCM diff view crashes on some commits in Redmine 3.0.3
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
I just migrated a Redmine instance from 2.5.1 to 3.0.3, and discovered a regression. We use git as SCM.
In the SCM view, the file diff page crashes (internal server error) on several commits (the same page with the same commit is correct in version 2.5.1).
I could neither find the reason of this crash nor the common point of the crashing commits (the problem concerns only a few number of commits).
Here is the error log when the crash occurs:
Processing by RepositoriesController#diff as HTML Parameters: {"id"=>"my-project", "rev"=>"6a1965444b30020730416f4aa9540874fc4e6d02", "path"=>"batchs/src/main/java/com/company/File.java"} Current user: bcourtine (id=26) Read fragment views/repositories/diff/3/c673bdad9f8b301a97c9dfcb0656c093 (19.9ms) Read fragment views/repositories/diff/3/c673bdad9f8b301a97c9dfcb0656c093/5bbdde9de6be260b043673887b4894a5 (0.2ms) Rendered common/_diff.html.erb (5.2ms) Rendered repositories/diff.html.erb within layouts/base (10.7ms) Completed 500 Internal Server Error in 57ms (ActiveRecord: 11.9ms) ActionView::Template::Error (undefined method `each' for nil:NilClass): 1: <% diff = Redmine::UnifiedDiff.new( 2: diff, :type => diff_type, 3: :max_lines => Setting.diff_max_lines_displayed.to_i, 4: :style => diff_style) -%> lib/redmine/unified_diff.rb:31:in `initialize' app/views/common/_diff.html.erb:1:in `new' app/views/common/_diff.html.erb:1:in `_app_views_common__diff_html_erb___96846821702686826_70363864763580' app/views/repositories/diff.html.erb:16:in `block in _app_views_repositories_diff_html_erb___4167826210359697366_70363864619900' app/views/repositories/diff.html.erb:15:in `_app_views_repositories_diff_html_erb___4167826210359697366_70363864619900'
Actions