Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Explorer: Causes program crash when displaying small and large numbers #5744

Closed
DavidMatthews83 opened this issue Dec 15, 2024 · 2 comments
Assignees
Labels
area: data explorer Issues related to Data Explorer category. bug Something isn't working lang: r sharp-edge

Comments

@DavidMatthews83
Copy link

System details:

Positron and OS details:

Positron Version: 2024.12.0 (system setup) build 96
Code - OSS Version: 1.93.0
Commit: c5ce275
Date: 2024-11-28T02:50:45.229Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

Interpreter details:

R 4.3.0

Describe the issue:

Positron crashes using R when trying to view data in the data explorer when there is a large variation in the numbers being displayed

Steps to reproduce the issue:

small_numbers <- data.frame(
Values = as.integer(runif(5000, min = 1, max = 200))
)
#View(small_numbers) #displays ok in Data Explorer

big_numbers <- data.frame(
Values = as.integer(runif(10, min = 1e7, max = 1e8))
)
#View(big_numbers) #displays ok in Data Explorer

big_and_small_numbers <- rbind(small_numbers,big_numbers)

View(big_and_small_numbers) #crashes positron

#having less small numbers and binding to the large works but is very slow eg.
small_numbers <- data.frame(
Values = as.integer(runif(100, min = 1, max = 200))
)

Expected or desired behavior:

big_and_small_numbers should display in the data explorer

Were there any error messages in the UI, Output panel, or Developer Tools console?

I get this from the developer tools

ERR RPC timed out after 5 seconds: {"jsonrpc":"2.0","method":"get_row_labels","params":{"selection":{"first_index":0,"last_index":84},"format_options":{"large_num_digits":2,"small_num_digits":4,"max_integral_digits":7,"max_value_length":1000,"thousands_sep":""}}}
workbench.desktop.main.js:372468 Dropping event 'GetRowLabelsReply' on comm a1bcc6d5-341c-4d88-9715-07fd161b234e: undefined (No listeners for event 'GetRowLabelsReply'

And this
Image

@wesm wesm added bug Something isn't working area: data explorer Issues related to Data Explorer category. sharp-edge lang: r labels Dec 15, 2024
@dfalbel dfalbel self-assigned this Dec 16, 2024
@dfalbel
Copy link
Contributor

dfalbel commented Dec 16, 2024

The problem is that

x <- as.integer(c(runif(10, min = 1e7, max = 1e8), runif(5000, min = 1, max = 200)))
grDevices::nclass.FD(x)
#> [1] 7244428

Causing the backend to send a huge amount of data to the front-end when computing the column profile.
We'll probably want to hard code a limit for them number of classes.

Thanks for reporting @DavidMatthews83

@juliasilge juliasilge added this to the 2025.01.0 Pre-Release milestone Dec 16, 2024
dfalbel added a commit that referenced this issue Dec 18, 2024
For:

[PR 655](posit-dev/ark#655): Limits the number
of bins for histograms to avoid crashes, addressing [issue
5744](#5744).
[PR 654](posit-dev/ark#654): Adds more logging
for Help proxy errors, addressing [issue
3543](#3543).
[PR 646](posit-dev/ark#646): Refactors
FormattedVector for faster formatting of S3 objects, improving
performance when expanding large data.frames, related to
[comment](#3628 (comment)).
@testlabauto
Copy link
Contributor

Verified Fixed

Positron Version(s) : 2025.01.0-124
OS Version          : OSX

Test scenario(s)

Verified with initial filing instructions.

Link(s) to TestRail test cases run or created:

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: data explorer Issues related to Data Explorer category. bug Something isn't working lang: r sharp-edge
Projects
None yet
Development

No branches or pull requests

5 participants