Page MenuHomePhabricator

Exception: Argument 1 passed to DifferentialChangesetHTMLRenderer::renderImageStage()
Closed, ResolvedPublic

Description

I suddenly get an alert popup when creating a diff revision:

Unhandled Exception ("InvalidArgumentException")

Argument 1 passed to DifferentialChangesetHTMLRenderer::renderImageStage() must be an instance of PhabricatorFile, null given, called in /path/to/phabricator src/applications|differential/render/DifferentialChangesetOneUpRenderer.php on line 188 and defined.

and it won't be closed. what should I do then ?

Event Timeline

egig raised the priority of this task from to Needs Triage.
egig updated the task description. (Show Details)
egig added a subscriber: egig.

Is your install at HEAD?

Just updated, still same..

Phabricator Version

c5a734073d24db84f9d8009ae7b776a71d7aca41

Arcanist Version

2b6568a4b983fb81e388a1611acf959839a087cd

libphutil Version

21268aff1d8a06997ce2c17e112b5e0945482062

Due to I am urgently working on something, to manage the alert that can't be closed, I remove the revision thru terminal use bin/remove destroy Dxx, now when I create new revision, I get:

Usage Exception: There is no revision D24.

D24 is removed revision.

HI @chad, my company just started using phabricator, I have some question, when exactly phabricator community is on the IRC ? thanks.

IRC is most active 8am - 8pm PST, though some people are there at other times of the day.

For this bug, can you list the steps that we can reproduce it? Perhaps provide a diff that breaks it?

chad renamed this task from Suddenly Alert Argument 1 passed to DifferentialChangesetHTMLRenderer::renderImageStage() to Exception: Argument 1 passed to DifferentialChangesetHTMLRenderer::renderImageStage().May 5 2015, 2:20 PM
chad added a project: Differential.
chad added a subscriber: epriestley.

The step is pretty usual,

  1. Make changes
  2. run arc diff (which is results the revision url)
  3. visit the url
  4. I see the error.

Sorry I can't show the entire diff because it's relatively large and contains restricted content. But I hope this description helps:

  • 99 file changed,
    • 1 .sh file
    • 8 .png file
    • 5 .jpg file
    • 6 .css file
    • 4 .js file
    • the rest is .php file

I wish I can help.

We don't need the entire diff, just something that reproduces the error. I am not able to reproduce any issues based on the steps you've listed. We have no other reports of this bug, either.

I would start by checking your php error logs for additional clues. You can also do arc diff --trace to enable additional debugging information.

Again, I get the error: this is the diff:

That diff presents no errors on this server. You're also welcome to use this server to upload sample diffs to show your bug, but my guess at this point is it's something unique to your environment. Please check your servers logs for errors. Beyond that, this is currently unreproducible for us.

https://secure.phabricator.com/book/phabcontrib/article/bug_reports/#unreproducible-problems

D12735 was your diff I uploaded here for testing. You can also test using rGITTEST if you want to rule out your local environment.

Maybe @epriestley has thoughts on what else to look at as well.

We don't currently decode base85 in diff form, so pasting a git diff --binary diff into Phabricator doesn't produce the exact same diff as running arc diff. Particularly, in base85 we just note "this binary file was added"; via arc diff we would show the actual file.

Running arc diff --only --conduit-uri=https://secure.phabricator.com/ to upload it directly to this server may let you reproduce it.

Otherwise, I can probably figure out the repro steps and fix this by just digging around in the code, it's just somewhat involved and the steps may involve "use bin/remove destroy to destroy a file" or "swap file storage engines" or "delete S3 config" or something.

It just happened to me as well, here's the stack-trace:

[Fri May 08 19:00:52.654930 2015] [:error] [pid 24023] [client 10.21.1.104:59165] [2015-05-08 12:00:52] EXCEPTION: (InvalidArgumentException) Argument 1 passed to DifferentialChangesetHTMLRenderer::renderImageStage() must be an instance of PhabricatorFile, null given, called in /opt/phabricator/src/applications/differential/render/DifferentialChangesetOneUpRenderer.php on line 188 and defined at [<phutil>/src/error/PhutilErrorHandler.php:200]
[Fri May 08 19:00:52.655420 2015] [:error] [pid 24023] [client 10.21.1.104:59165] arcanist(), phabricator(), phutil()
[Fri May 08 19:00:52.655437 2015] [:error] [pid 24023] [client 10.21.1.104:59165]   #0 PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<phabricator>/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php:603]
[Fri May 08 19:00:52.655448 2015] [:error] [pid 24023] [client 10.21.1.104:59165]   #1 DifferentialChangesetHTMLRenderer::renderImageStage(NULL) called at [<phabricator>/src/applications/differential/render/DifferentialChangesetOneUpRenderer.php:188]
[Fri May 08 19:00:52.655475 2015] [:error] [pid 24023] [client 10.21.1.104:59165]   #2 DifferentialChangesetOneUpRenderer::renderFileChange(NULL, PhabricatorFile, integer, integer) called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:1087]
[Fri May 08 19:00:52.655499 2015] [:error] [pid 24023] [client 10.21.1.104:59165]   #3 DifferentialChangesetParser::render(NULL, NULL, array) called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:70]
[Fri May 08 19:00:52.655510 2015] [:error] [pid 24023] [client 10.21.1.104:59165]   #4 DifferentialChangesetParser::renderChangeset() called at [<phabricator>/src/applications/differential/controller/DifferentialChangesetViewController.php:253]
[Fri May 08 19:00:52.655519 2015] [:error] [pid 24023] [client 10.21.1.104:59165]   #5 DifferentialChangesetViewController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:196]
[Fri May 08 19:00:52.655528 2015] [:error] [pid 24023] [client 10.21.1.104:59165]   #6 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:121]
[Fri May 08 19:00:52.655537 2015] [:error] [pid 24023] [client 10.21.1.104:59165]   #7 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:19]

Unfortunately, this is also private diff so I can't submit it here. What I can tell you, is that my diff also includes binary file (one PNG file) and the diff has two revisions.

Installed versions:

PHABRICATOR_COMMIT=d347c06883f4f69f92f880a8d05b6fa8c9de28dc
ARCANIST_COMMIT=46ce8a5a35f9057b30151b5cb99a80642d913d22
LIBPHUTIL_COMMIT=fccf03d48e08bbf218a1b44a954ea174b5f4cadc

I see this error about once a week. Repeatedly clicking the "Close" button in the error pop up will eventually dismiss it. I don't know what the number of required clicks correlates to, but it's consistent per problematic diff.

This only happens when I'm using the unified diff renderer (set to Always in my settings). If I switch back to the side-by-side diff view, I don't see these errors.

One other note: this error is now associated with line 288 of DifferentialChangesetOneUpRenderer.php.

Well, I think I figured this one out. No one look at the diff, it's real embarrassing.