Page MenuHomePhabricator

Check my Conpherence title/handle fix
Closed, ResolvedPublic

Description

I cowboy committed rPf311f3f9 to fix a fatal which was preventing me from filing tasks, so here's the followup. :P

Adding images to Conpherence threads could fatal their handles after you added an image to a thread. Here's the trace:

2015/05/04 22:45:40 [error] 22249#0: *10501 FastCGI sent in stderr: "PHP message: [2015-05-04 22:45:40] EXCEPTION: (PhabricatorDataNotAttachedException) Attempting to access attached data on ConpherenceThread (via getImages()), but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it.

Data is normally attached by calling the corresponding needX() method on the Query class when the object is loaded. You can also call the corresponding attachX() method explicitly. at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:166]
PHP message: arcanist(head=master, ref.master=2b6568a4b983), phabricator(head=master, ref.master=6bebb3c69a07), phutil(head=master, ref.master=040d1599fe01)
PHP message:   #0 PhabricatorLiskDAO::assertAttached(string) called at [<phabricator>/src/applications/conpherence/storage/ConpherenceThread.php:121]
PHP message:   #1 ConpherenceThread::getImages() called at [<phabricator>/src/applications/conpherence/storage/ConpherenceThread.php:107]
PHP message:   #2 ConpherenceThread::getImage(string) called at [<phabricator>/src/applications/conpherence/storage/ConpherenceThread.php:248]
PHP message:   #3 ConpherenceThread::getDisplayData(PhabricatorUser) called at [<phabricator>/src/applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php:35]
PHP message:   #4 PhabricatorConpherenceThreadPHIDType::loadHandles(PhabricatorHandleQuery, array, array) called at [<phabricator>/src/applications/phid/query/PhabricatorHandleQuery.php:60]
PHP message:   #5 PhabricatorHandleQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:227]
PHP message:   #6 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php:132]
PHP message:   #7 PhabricatorApplicationTransactionQuery::willFilterPage(array) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:236]

Specifically, getDisplayData() tried to access $this->getImage(), but that might not be loaded.

I just refactored things a bit to try to dodge the need to hit the image, since we only need the title. I think I got things right, but let me know if I missed something.

I also removed js_title since it looked like it was always exactly equivalent to title. I figured that must be a leftover from a while ago.

Event Timeline

epriestley assigned this task to btrahan.
epriestley raised the priority of this task from to Low.
epriestley updated the task description. (Show Details)
epriestley added a project: Conpherence.
epriestley added a subscriber: epriestley.

Just ran into this. Apache logs the following (/var/log/php5-fpm.log contains nothing about this incident…?):

Update: Logfile ugliness solved via cat /var/log/apache2/error.phab.log | sed "s/\\\\n/$(echo '\n')/g":

PHP message: [2015-05-05 19:15:12] EXCEPTION: (PhabricatorDataNotAttachedException) Attempting to access attached data on ConpherenceThread (via getImages()), but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it.

Data is normally attached by calling the corresponding needX() method on the Query class when the object is loaded. You can also call the corresponding attachX() method explicitly. at [<phabricator>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:166]
PHP message: arcanist(head=master, ref.master=8919a9c5b55e), libphremoteuser(head=master, ref.master=1def4e2d7f07), phabricator(head=master, ref.master=92d399d086c9), phutil(head=master, ref.master=cb8cdccb1a50), sprint(head=master, ref.master=53f16c2f6fa0)
PHP message:   #0 PhabricatorLiskDAO::assertAttached(string) called at [<phabricator>/src/applications/conpherence/storage/ConpherenceThread.php:121]
PHP message:   #1 ConpherenceThread::getImages() called at [<phabricator>/src/applications/conpherence/storage/ConpherenceThread.php:107]
PHP message:   #2 ConpherenceThread::getImage(string) called at [<phabricator>/src/applications/conpherence/storage/ConpherenceThread.php:290]
PHP message:   #3 ConpherenceThread::getDisplayData(PhabricatorUser) called at [<phabricator>/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php:177]
PHP message:   #4 ConpherenceThreadSearchEngine::renderResultList(array, PhabricatorSavedQuery, array) called at [<phabricator>/src/applications/search/engine/PhabricatorApplicationSearchEngine.php:805]
PHP message:   #5 PhabricatorApplicationSearchEngine::renderResults(array, PhabricatorSavedQuery) called at [<phabricator>/src/applications/search/controller/PhabricatorApplicationSearchController.php:233]
PHP message:   #6 PhabricatorApplicationSearchController::processSearchRequest() called at [<phabricator>/src/applications/search/controller/PhabricatorApplicationSearchController.php:84]
PHP message:   #7 PhabricatorApplicationSearchController::processRequest() called at [<phabricator>/src/aphront/AphrontController.php:33]
PHP message:   #8 AphrontController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/AphrontController.php:69]
PHP message:   #9 AphrontController::delegateToController(PhabricatorApplicationSearchController) called at [<phabricator>/src/applications/conpherence/controller/ConpherenceRoomListController.php:14]
PHP message:   #10 ConpherenceRoomListController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:218]
PHP message:   #11 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:132]
PHP message:   #12 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:19]

@devurandom - things should be fixed at HEAD. Thanks for the report and please let me know if this still reproduces.