Page MenuHomePhabricator

User hitting undefined index in changeset rendering
Closed, ResolvedPublic

Revisions and Commits

Restricted Differential Revision

Event Timeline

epriestley raised the priority of this task from to Normal.
epriestley updated the task description. (Show Details)
epriestley added a project: Differential.
epriestley added a subscriber: epriestley.

I am able to consistently reproduce this now. It is happening on a particular diff, but only with "Ignore Most" or "Ignore All" whitespace modes.

[23-Jul-2014 09:27:24 UTC] [2014-07-23 19:27:24] ERROR 8: Undefined offset: 310 at [/usr/src/phabricator/src/applications/differential/parser/DifferentialHunkParser.php:99]
[23-Jul-2014 09:27:24 UTC]   #0 DifferentialHunkParser::setOldLineTypeMap(array) called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:582]
[23-Jul-2014 09:27:24 UTC]   #1 DifferentialChangesetParser::process() called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:512]
[23-Jul-2014 09:27:24 UTC]   #2 DifferentialChangesetParser::tryCacheStuff() called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:742]
[23-Jul-2014 09:27:24 UTC]   #3 DifferentialChangesetParser::render(NULL, NULL, array) called at [<phabricator>/src/applications/differential/controller/DifferentialChangesetViewController.php:217]
[23-Jul-2014 09:27:24 UTC]   #4 DifferentialChangesetViewController::processRequest() called at [<phabricator>/webroot/index.php:95]

Also, a file in the diff has trailing whitespace... I think this might be the cause here.

Oh, and a "no newline at end of file" as well.

I was able to reproduce this behavior with the following diff:

diff --git a/test b/test
index 0519ecb..8d1c8b6 100644
--- a/test
+++ b/test
@@ -1 +1 @@
- 
\ No newline at end of file
+
joshuaspence added a revision: Restricted Differential Revision.Jan 22 2015, 7:55 PM
epriestley added a revision: Restricted Differential Revision.Mar 5 2015, 12:54 AM
epriestley changed the task status from Duplicate to Resolved by committing Restricted Diffusion Commit.Mar 5 2015, 10:00 PM
epriestley added a commit: Restricted Diffusion Commit.