You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Yicong-Huang (via GitHub)" <gi...@apache.org> on 2026/05/03 03:39:48 UTC

[I] LineChartOpDesc.generatePythonCode throws NPE when lines is null (the default) [texera]

Yicong-Huang opened a new issue, #4811:
URL: https://github.com/apache/texera/issues/4811

   ### What happened?
   
   `common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/lineChart/LineChartOpDesc.scala` declares `var lines: util.List[LineConfig] = _`, which defaults to `null`. `createPlotlyFigure` then calls `lines.asScala.map(...)` without a null check, so `generatePythonCode` on a freshly constructed `LineChartOpDesc` raises `java.lang.NullPointerException` at `LineChartOpDesc.scala:68` — quite different from the explicit `AssertionError` paths used by sibling visualizers (e.g. `HeatMapOpDesc`, `BarChartOpDesc`).
   
   The fix is either to default `lines` to an empty list, or to null-guard / assert nonEmpty before the `.asScala.map(...)` call.
   
   ### How to reproduce?
   
   ```scala
   import org.apache.texera.amber.operator.visualization.lineChart.LineChartOpDesc
   
   new LineChartOpDesc().generatePythonCode()
   // java.lang.NullPointerException
   //   at LineChartOpDesc.createPlotlyFigure(LineChartOpDesc.scala:68)
   //   at LineChartOpDesc.generatePythonCode(LineChartOpDesc.scala:122)
   ```
   
   ### Version
   
   1.1.0-incubating (Pre-release/Master)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] LineChartOpDesc.generatePythonCode throws NPE when lines is null (the default) [texera]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on issue #4811:
URL: https://github.com/apache/texera/issues/4811#issuecomment-4369223449

   /untake


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] LineChartOpDesc.generatePythonCode throws NPE when lines is null (the default) [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan closed issue #4811: LineChartOpDesc.generatePythonCode throws NPE when lines is null (the default)
URL: https://github.com/apache/texera/issues/4811


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] LineChartOpDesc.generatePythonCode throws NPE when lines is null (the default) [texera]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on issue #4811:
URL: https://github.com/apache/texera/issues/4811#issuecomment-4369222028

   /take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] LineChartOpDesc.generatePythonCode throws NPE when lines is null (the default) [texera]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on issue #4811:
URL: https://github.com/apache/texera/issues/4811#issuecomment-4368860246

   /take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org