Skip to content

[syncfusion_flutter_datagrid] Null check crash in RenderVirtualizingCellsWidget._getDataCellBase when long-pressing stacked header / table summary rows (resizingLine! is null) #2539

Closed

Description

@bahadirarslan

Bug description

Long-pressing certain non-data rows in SfDataGrid (stacked header row or table summary rows) triggers a fatal crash:

TypeError: Null check operator used on a null value

The crash occurs inside Syncfusion’s internal RenderVirtualizingCellsWidget._getDataCellBase when resizingLine is null, but the stacked-header / summary-row branch still force-unwraps it with resizingLine!.

This is not an application null-dereference in our callback. The grid throws before onCellLongPress can apply any row-type guard.

Steps to reproduce

  1. Create an SfDataGrid with:
    • stackedHeaderRows (non-empty)
    • tableSummaryRows with GridTableSummaryRowPosition.bottom (we use three summary rows: page totals, previous page totals, grand total)
    • onCellLongPress callback wired (optional for repro — crash is internal)
  2. Load enough rows that summary rows render.
  3. Long-press on:
    • a stacked header cell, or
    • a table summary row cell (bottom summary area)
  4. Observe crash.

Expected behavior

  • Long-press on stacked header / summary rows should either:
    • be ignored safely, or
    • invoke onCellLongPress with a well-defined DataGridCellLongPressDetails (or not start a long-press at all)
  • No crash when resizingLine cannot be resolved for non-standard row types.

Actual behavior

Fatal exception during long-press handling inside the grid renderer.

Code sample

Code sample

Minimal configuration (representative)

SfDataGrid(
  source: myDataSource,
  stackedHeaderRows: stackedHeaderRows,
  tableSummaryRows: [
    GridTableSummaryRow(
      title: 'pageTotals',
      showSummaryInRow: false,
      columns: summaryColumns,
      position: GridTableSummaryRowPosition.bottom,
    ),
    GridTableSummaryRow(
      title: 'total',
      showSummaryInRow: false,
      columns: summaryColumns,
      position: GridTableSummaryRowPosition.bottom,
    ),
  ],
  onCellLongPress: (details) {
    // Never reached when long-pressing summary/header rows
  },
  columns: columns,
)

Screenshots or Video

no screenshots can provided now

Stack Traces

Stack Traces
LongPressGestureRecognizer._checkLongPressStart
  → RenderVirtualizingCellsWidget._onLongPressStart (rendering_widget.dart:1590)
  → RenderVirtualizingCellsWidget._getDataCellBase (rendering_widget.dart:1534)
  → RenderVirtualizingCellsWidget._getDataCellBase.<T> (rendering_widget.dart:1540)

TypeError: Null check operator used on a null value

On which target platforms have you observed this bug?

iOS

Flutter Doctor output

Doctor output
flutter doctor -v
[✓] Flutter (Channel stable, 3.41.9, on macOS 26.5.1 25F80 darwin-arm64, locale en-TR) [1,090ms]
    • Flutter version 3.41.9 on channel stable at /Users/bahadirarslan/Development/SDKS/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 00b0c91f06 (7 weeks ago), 2026-04-29 10:03:19 -0700
    • Engine revision 42d3d75a56
    • Dart version 3.11.5
    • DevTools version 2.54.2
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets,
      omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

Activity

  1. Gowtham-SF4769 commented on Jun 16, 2026

    @Gowtham-SF4769

    Hi @bahadirarslan ,

    Thank you for sharing the details. Based on the information provided, we conducted tests using a simple sample on IOS to replicate the reported issues; however, we were unable to reproduce them as described. We tested the sample using the latest Flutter SDK (3.44.0) and SfDataGrid version (33.2.13).

    We also tested this scenario using the attached sample, and it worked correctly without any issues. Could you please update your versions and check again? If you are still encountering the same problem, we kindly request that you modify the attached sample to reproduce the issue and provide any additional details. Additionally, if possible, please provide a video recording demonstrating the issue for better clarity. This will greatly assist us in investigating the issue further and providing an appropriate solution as quickly as possible.

    We have also attached a sample and a video demonstration for your reference. Kindly review them for further guidance.

    We look forward to your response.

    Code Sample: SfDataGrid.zip

    Video Demo:

    VideoDemo.mp4

    Regards,
    Gowtham R

  2. added
    data grid
    waiting for customer response
    on Jun 16, 2026
  3. Gowtham-SF4769 commented on Jul 1, 2026

    @Gowtham-SF4769

    Hi @bahadirarslan ,

    We hope the reported issue has been resolved on your end. As we have not received any further updates, we will proceed with closing this GitHub issue.

    If you have any additional questions or need further assistance, please feel free to reach out. We are always happy to help.

    Regards,
    Gowtham R

  4. added
    solved
    and removed
    waiting for customer response
    on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    data gridsolved

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions