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

st.slider crashes browser tab when max_value=500000000 and step=1 #5436

Closed
snehankekre opened this issue Sep 28, 2022 · 0 comments · Fixed by #6764
Closed

st.slider crashes browser tab when max_value=500000000 and step=1 #5436

snehankekre opened this issue Sep 28, 2022 · 0 comments · Fixed by #6764
Labels
feature:st.slider priority:P2 status:confirmed Bug has been confirmed by the Streamlit team type:bug Something isn't working

Comments

@snehankekre
Copy link
Collaborator

snehankekre commented Sep 28, 2022

Summary

st.slider causes the browser tab to crash when max_value is set to a very large (> 300 million) value and step=1.

Steps to reproduce

Open in Streamlit Cloud

Code snippet:

import streamlit as st

st.slider(label="Number of Rows", min_value=0, max_value=500000000)

It’s important to note that this operation effectively passes an array to JavaScript with five hundred million elements, since I am trying to go from 0 to 500 million in multiples of 1. It’s not surprising to me that this would make the browser have issues and crash the tab. However, @treuille says Streamlit should ideally throw an exception instead and not crash the tab.

Expected behavior:

Ideally, Streamlit should throw an exception when max_value is "too large" (however that's defined) and stop the execution, rather than causing the tab to crash.

Actual behavior:

The browser tab crashes after a few seconds. On Chrome, you see:

Aw, Snap! 

Something went wrong when displaying this web page.

Error code: 5
slider-crash.mov

On Firefox, you see a blank tab.

Is this a regression?

no

Debug info

  • Streamlit version: 1.13.0
  • Python version: 3.9.12
  • OS version: macOS Monterey 12.6 Darwin Kernel Version 21.6.0
  • Browser version: Google Chrome Version 105.0.5195.125 (Official Build) (x86_64) | Firefox Version 105.0.1 (64-bit)

Additional information

Internal Slack thread

@snehankekre snehankekre added type:bug Something isn't working status:needs-triage Has not been triaged by the Streamlit team feature:st.slider labels Sep 28, 2022
@snehankekre snehankekre changed the title st.slider crashes browser tab when max_value=500000000 and step=1 st.slider crashes browser tab when max_value=500000000 and step=1 Sep 28, 2022
@vdonato vdonato removed the status:needs-triage Has not been triaged by the Streamlit team label Sep 30, 2022
@LukasMasuch LukasMasuch added status:confirmed Bug has been confirmed by the Streamlit team priority:P3 priority:P2 and removed priority:P3 labels Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:st.slider priority:P2 status:confirmed Bug has been confirmed by the Streamlit team type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants