← Back to context

Comment by LCoder

1 year ago

Jumped to the bottom and the page locked up. Console shows:

  Uncaught Error: Index out of range - must be less than 2^122

oh hm, i thought I had fixed every case where that popped up. I can't reproduce the issue on any browser on my machine - how did you jump to the bottom (hotkey, scrollbar, scrolling for a trillion years) and what platform are you on (if you don't mind sharing)?

  • Chome on Windows. Grab the right scroll bar and pull to the very bottom. Once at the bottom try to scroll down with mouse scroll wheel. Screen goes blank and the error appears in the console.

    • OH! Thanks for the precise reproduction steps, I had done my testing with a trackpad and had missed that! Writing a little fix now (I'd hate for you to not be able to see the last UUID)

      3 replies →

    • alright, a fix that I think covers this crash and a few others I found as a result is rolling out now.

      for a while I thought I had an off by one error, which was pretty funny to think about in the context of trillions of items. but in fact I was just doing some bad react state management.

      1 reply →

  • use the scroll bar to get to the "end" then use scroll wheel. that's how I managed to hit it reliably.

Every uuid dot com except if greater than 2^122 -1 doesn’t have the same ring ;)

  • There aren't more than 2^122 UUIDv4s.

    • This reminds me of some code I stumbled on recently, where someone had implemented a custom exception they could throw if their 32-bit loop counter was greater than the maximum value of a 32-bit integer.