Skip to content

[BUG] descr() causes hard R crash (exit code -1073741819) when passed an empty data frame #831

@hatschibratschi

Description

@hatschibratschi

Calling descr() (collapse 2.1.6) on a zero-row data frame — produced by subsetting — causes R to crash entirely with a fatal exit rather than returning an error or an empty result gracefully.

Exit code -1073741819 (0xC0000005) is STATUS_ACCESS_VIOLATION on Windows, indicating an out-of-bounds memory access (equivalent to a segfault on Linux/macOS).

library(collapse)

d = data.frame(a = 1:3)
descr(d[d$a < 1, ])

# R 4.5.3 exited unexpectedly: exit code -1073741819

descr() should either:

  • return an empty / zero-row statistics table, or
  • emit an informative R warning/error such as "No observations to describe."

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions