Skip to content

Bug: Edge case crashes #146

@dshkol

Description

@dshkol

Summary

Three low-frequency but real crash scenarios:

H8: pull(date_field) without data context when sample_date is NA

  • File: R/cansim.R:93 (approximate line)
  • Issue: Falls back to pull(date_field) without a data context
  • Impact: Can error on edge cases

H9: view_cansim_webpage NULL check after lowercase

  • File: R/cansim.R:923 (approximate line)
  • Issue: Lowercases input before checking for NULL, errors on length-0 input
  • Impact: Edge case crash

M8: Potential NULL dereference in cache check

  • File: R/cansim_parquet.R:302 (approximate line)
  • Issue: is.na(last_downloaded) doesn't handle NULL/empty vector
  • Impact: Crash on unexpected cache state

Proposed Fix

  • H8: Add proper data context
  • H9: Check NULL/length before lowercase
  • M8: Check is.null() || length() == 0 || is.na()

From code audit - low-frequency but real crash scenarios

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions