•  
      request #14721 Some charts cannot be built with gd 2.3.0
    Infos
    #14721
    Thomas Gerbet (tgerbet)
    2020-03-26 13:30
    2020-03-25 18:27
    15993
    Details
    Some charts cannot be built with gd 2.3.0
    Some charts like the Gantt cannot be built when using gd-last 2.3.0.

    The following stack trace might be observed when gd-last 2.3.0 is used and a Gantt needs to be rendered in a tracker report:
    2020-03-25T14:11:10+01:00 [2766] [error] Caught exception: There is either a configuration problem with TrueType or a problem reading font file "/usr/share/tuleap/src/embedded_vendor/jpgraph/fonts/DejaVuSans.ttf" Make sure file exists and is in a readable place for the HTTP process. (If 'basedir' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try upgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library.:
    #0 /usr/share/tuleap/src/embedded_vendor/jpgraph/gd_image.inc.php(741): JpGraphError::RaiseL(25092, '/usr/share/tule...')
    #1 /usr/share/tuleap/src/embedded_vendor/jpgraph/gd_image.inc.php(814): Image->imagettfbbox_fixed(9, 0, '/usr/share/tule...', '')
    #2 /usr/share/tuleap/src/embedded_vendor/jpgraph/gd_image.inc.php(317): Image->GetTTFBBox('', 0)
    #3 /usr/share/tuleap/src/embedded_vendor/jpgraph/jpgraph_text.inc.php(230): Image->GetTextHeight('', 0)
    #4 /usr/share/tuleap/src/common/chart/Chart.class.php(242): Text->GetTextHeight(Object(RotImage))
    #5 /usr/share/tuleap/plugins/graphontrackersv5/include/graphic-library/GraphOnTrackersV5_Engine_Gantt.class.php(175): Chart->getTopMargin()
    #6 /usr/share/tuleap/plugins/graphontrackersv5/include/data-access/GraphOnTrackersV5_Chart.class.php(414): GraphOnTrackersV5_Engine_Gantt->buildGraph()
    #7 /usr/share/tuleap/plugins/graphontrackersv5/include/data-access/GraphOnTrackersV5_Chart.class.php(211): GraphOnTrackersV5_Chart->buildGraph()
    #8 /usr/share/tuleap/plugins/graphontrackersv5/include/data-access/GraphOnTrackersV5_Chart.class.php(273): GraphOnTrackersV5_Chart->fetch(false)
    #9 /usr/share/tuleap/plugins/graphontrackersv5/include/GraphOnTrackersV5_Renderer.class.php(186): GraphOnTrackersV5_Chart->fetchOnReport(Object(GraphOnTrackersV5_Renderer), Object(PFUser), true, false)
    #10 /usr/share/tuleap/plugins/graphontrackersv5/include/GraphOnTrackersV5_Renderer.class.php(143): GraphOnTrackersV5_Renderer->fetchCharts(Object(PFUser), true, true, false)
    #11 /usr/share/tuleap/plugins/tracker/include/Tracker/Widget/Tracker_Widget_Renderer.class.php(48): GraphOnTrackersV5_Renderer->fetchWidget(Object(PFUser))
    #12 /usr/share/tuleap/src/common/Dashboard/Widget/DashboardWidgetPresenter.php(86): Tracker_Widget_Renderer->getContent()
    #13 /usr/share/tuleap/src/common/Dashboard/Widget/DashboardWidgetPresenterBuilder.php(110): Tuleap\Dashboard\Widget\DashboardWidgetPresenter->__construct(Object(Tuleap\Dashboard\Project\ProjectDashboard), Object(Tuleap\Dashboard\Widget\DashboardWidget), Object(Tracker_Widget_ProjectRenderer), true)
    #14 /usr/share/tuleap/src/common/Dashboard/Widget/DashboardWidgetPresenterBuilder.php(84): Tuleap\Dashboard\Widget\DashboardWidgetPresenterBuilder->getWidgetsPresenterByColumn(Object(Tuleap\Dashboard\Project\ProjectDashboard), Object(Tuleap\Dashboard\Widget\OwnerInfo), Object(Tuleap\Dashboard\Widget\DashboardWidgetColumn), true)
    #15 /usr/share/tuleap/src/common/Dashboard/Widget/DashboardWidgetPresenterBuilder.php(62): Tuleap\Dashboard\Widget\DashboardWidgetPresenterBuilder->getColumnsPresenterByLine(Object(Tuleap\Dashboard\Project\ProjectDashboard), Object(Tuleap\Dashboard\Widget\OwnerInfo), Object(Tuleap\Dashboard\Widget\DashboardWidgetLine), true)
    #16 /usr/share/tuleap/src/common/Dashboard/Project/ProjectDashboardController.php(393): Tuleap\Dashboard\Widget\DashboardWidgetPresenterBuilder->getWidgetsPresenter(Object(Tuleap\Dashboard\Project\ProjectDashboard), Object(Tuleap\Dashboard\Widget\OwnerInfo), Array, true)
    #17 /usr/share/tuleap/src/common/Dashboard/Project/ProjectDashboardController.php(157): Tuleap\Dashboard\Project\ProjectDashboardController->getProjectDashboardsPresenter(Object(PFUser), Object(Project), '16918', Array)
    #18 /usr/share/tuleap/src/common/Dashboard/Project/ProjectDashboardRouter.php(81): Tuleap\Dashboard\Project\ProjectDashboardController->display(Object(HTTPRequest))
    #19 /usr/share/tuleap/src/common/Project/Home.php(163): Tuleap\Dashboard\Project\ProjectDashboardRouter->route(Object(HTTPRequest))
    #20 /usr/share/tuleap/src/common/Request/FrontRouter.php(242): Tuleap\Project\Home->process(Object(HTTPRequest), Object(Tuleap\Theme\BurningParrot\BurningParrotTheme), Array)
    #21 /usr/share/tuleap/src/common/Request/FrontRouter.php(97): Tuleap\Request\FrontRouter->routeHandler(Object(HTTPRequest), Object(Tuleap\Project\Home), Array)
    #22 /usr/share/tuleap/src/www/index.php(49): Tuleap\Request\FrontRouter->route(Object(HTTPRequest))
    #23 {main}

    When calling "imagettfbbox()" directly with empty string for the text parameter, you can observe the following PHP warning: "Warning: imagettfbbox(): Problem doing text layout"

    The issue seems to be related to this change [0] in libgd.

    [0] https://github.com/libgd/libgd/commit/1dbccb737c5e9634085c9a3239fa1e0d0b988966

    Related upstream bugs:
    * https://github.com/libgd/libgd/issues/615
    * https://bugs.php.net/bug.php?id=79415
    Other
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2020-03-26
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    Thomas Gerbet (tgerbet)2020-03-25 18:30
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes