joaomoreno / gifcap

Capture your screen to a GIF in your browser
https://gifcap.dev
GNU General Public License v3.0
1.33k stars 95 forks source link

Cannot render gif of video with a cropped screen due to RangeError #70

Closed wdspider closed 2 years ago

wdspider commented 2 years ago

Steps to repro:

  1. Open site in latest MS Edge
  2. Record a screen
  3. Once recording is stopped, choose a part of the screen to crop to
  4. Press render button

Expected: Video of cropped screen successfully rendered into gif

Actual: Progress bar indefiniately displays along with this console error: image

joaomoreno commented 2 years ago

Strange for two reasons:

  1. I can't reproduce
  2. There's no way the byte length of Uint32Array would not be a multiple of 4 given this: https://github.com/joaomoreno/gifcap/blob/b060ef9100421dd92dffb2adc3fec75ff4b8cda6/encoder/gifencoder.js#L31

Can you reliably reproduce this?

wdspider commented 2 years ago

I could reliably reproduce this the day I created the ticket. I attempted to do it around 7 times which is what led me to take the time to create the ticket. However, I just tried it again today, and it seems to be working as desired now. As such, I'm going to close this ticket since I can't pinpoint what could be different between then and now.

joaomoreno commented 2 years ago

I just reproduced it! box.width and box.height can be fractional.