Graph widget with many items enters infinite loading when switched to stacked mode

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 7.4.10rc1, 8.0.0alpha1, 8.0.0alpha2
    • Component/s: Frontend (F)

      When creating a graph widget and adding a large number of items, switching the widget to stacked mode causes the graph to enter a prolonged (or infinite) loading state. During this process, multiple errors are generated in the logs, and the graph fails to render correctly.

      Steps to reproduce:

      1. Create a new graph widget.
      2. Add a large number of items (>50).
      3. Enable stacked mode.
      4. Apply changes / save the widget.

      In some cases, it requires creating an additional widget with a large number of items for the issue to occur.

      Result:
      The graph enters a long or infinite loading state.

      Undefined array key 608 [zabbix.php:17 -> require_once() -> ZBase->run() -> ZBase->processRequest() -> CController->run() -> Widgets\SvgGraph\Actions\WidgetView->doAction() -> Widgets\SvgGraph\Includes\CSvgGraphHelper::get() -> CSvgGraph->draw() -> CSvgGraph->calculateStackedPoints() -> CSvgGraph::calculateStackedFragment() -> CConfigFile->{closure}() in include/classes/graph/CSvgGraph.php:601]
      TypeError: CSvgGraph::calculatePointOnLine(): Argument #2 ($end) must be of type array, null given, called in /home/zabbix/workspace/DEV-4761-7.5/ui/include/classes/graph/CSvgGraph.php on line 601 and defined in /home/zabbix/workspace/DEV-4761-7.5/ui/include/classes/graph/CSvgGraph.php:633
      Stack trace:
      #0 /home/zabbix/workspace/DEV-4761-7.5/ui/include/classes/graph/CSvgGraph.php(601): CSvgGraph::calculatePointOnLine()
      #1 /home/zabbix/workspace/DEV-4761-7.5/ui/include/classes/graph/CSvgGraph.php(550): CSvgGraph::calculateStackedFragment()
      #2 /home/zabbix/workspace/DEV-4761-7.5/ui/include/classes/graph/CSvgGraph.php(314): CSvgGraph->calculateStackedPoints()
      #3 /home/zabbix/workspace/DEV-4761-7.5/ui/widgets/svggraph/includes/CSvgGraphHelper.php(116): CSvgGraph->draw()
      #4 /home/zabbix/workspace/DEV-4761-7.5/ui/widgets/svggraph/actions/WidgetView.php(141): Widgets\SvgGraph\Includes\CSvgGraphHelper::get()
      #5 /home/zabbix/workspace/DEV-4761-7.5/ui/include/classes/mvc/CController.php(582): Widgets\SvgGraph\Actions\WidgetView->doAction()
      #6 /home/zabbix/workspace/DEV-4761-7.5/ui/include/classes/core/ZBase.php(653): CController->run()
      #7 /home/zabbix/workspace/DEV-4761-7.5/ui/include/classes/core/ZBase.php(228): ZBase->processRequest()
      #8 /home/zabbix/workspace/DEV-4761-7.5/ui/include/config.inc.php(20): ZBase->run()
      #9 /home/zabbix/workspace/DEV-4761-7.5/ui/zabbix.php(17): require_once('...')
      #10 {main} 

      Expected:
      The graph should render correctly in stacked mode regardless of the number of items.

            Assignee:
            Dmitrijs Fofanovs
            Reporter:
            Juliana Iljina
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: