joaomoreno / gifcap

Capture your screen to a GIF in your browser

Home Page:https://gifcap.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

wdspider opened this issue · comments

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

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:
    const result = new ArrayBuffer(4 * box.width * box.height);

Can you reliably reproduce this?

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.

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