st.slider crashes browser tab when max_value=500000000 and step=1 #5436
Labels
feature:st.slider
priority:P2
status:confirmed
Bug has been confirmed by the Streamlit team
type:bug
Something isn't working
Summary
st.slider
causes the browser tab to crash whenmax_value
is set to a very large (> 300 million) value andstep=1
.Steps to reproduce
Code snippet:
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:
slider-crash.mov
On Firefox, you see a blank tab.
Is this a regression?
no
Debug info
1.13.0
3.9.12
Additional information
Internal Slack thread
The text was updated successfully, but these errors were encountered: