Open Bug 1734348 Opened 4 years ago Updated 3 years ago

Uncaught exception when calling fillRect() in Firefox Developer 94.0b2 in Linux

Categories

(Core :: Graphics: Canvas2D, defect)

Firefox 94
defect

Tracking

()

UNCONFIRMED

People

(Reporter: markuslaubscher, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

Steps to reproduce:

Calling getCroppedCanvas() on cropper.js javascript module (which in turn calls fillRect() on line 1010)

Actual results:

Uncaught DOMException: An exception was thrown (only in Firefox Dev)

Expected results:

Examining cropper.js reveals that the exception is thrown when fillRect() is called. I checked with normal Firefox and with Chrome and the exception is not thrown with them. So thats how i figured that this is a bug specific to Firefox Dev.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Can you provide a full example (e.g. URL) that reproduces this issue?

Flags: needinfo?(markuslaubscher)
Component: Widget: Gtk → Canvas: 2D

This is happening on a localhost dev setup. So all i can bring is this.

package:
https://fengyuanchen.github.io/cropperjs/

statement:
context.fillRect(0, 0, width, height); << this is line 1010

error:
Uncaught DOMException: An exception was thrown cropper.js:1010
getSourceCanvas cropper.js:1010
getCroppedCanvas cropper.js:3041
cropImage admin-series-create.js:846
jQuery 9
cropImage admin-series-create.js:839
cropImage admin-series-create.js:831
initAvatar admin-series-create.js:167
jQuery 9
initAvatar admin-series-create.js:153
init admin-series-create.js:31
series_create admin-series-create.js:25
<anonymous> admin-series-create.js:886

And this only occurs in Firefox Dev under Ubuntu.

Flags: needinfo?(markuslaubscher)

Please open about:support, click on "Copy text to clipboard" and paste it here. Thanks!

Do you get the same error with this example? https://fengyuanchen.github.io/cropperjs/examples/mask-an-image.html

Are you able to find a regression range?

$ pip3 install --user mozregression
$ mozregression --good 92 --bad 94 -a https://fengyuanchen.github.io/cropperjs/examples/mask-an-image.html

(In reply to Darkspirit from comment #4)

Please open about:support, click on "Copy text to clipboard" and paste it here. Thanks!

Do you get the same error with this example? https://fengyuanchen.github.io/cropperjs/examples/mask-an-image.html

Are you able to find a regression range?

$ pip3 install --user mozregression
$ mozregression --good 92 --bad 94 -a https://fengyuanchen.github.io/cropperjs/examples/mask-an-image.html

I have no idea what this mozregression is about. Still wet behind the ears. I tried to get it to work but some errors occurred during installation. I will have to sit and sort it out first before i can help with that. So I give to you the following as response for now

The error does not happen with https://fengyuanchen.github.io/cropperjs/examples/mask-an-image.html.

You can replicate the error this way:

  1. Get the Cropperjs repository and Edit /vendor/cropperjs/docs/examples/cropper-in-modal.html
  2. Change line 68 to call the method in question

// canvasData = cropper.getCanvasData();
to this
croppedCanvas= cropper.getCroppedCanvas();

  1. Open cropper-in-modal.html with Firefox Dev and ckick 'Launch Demo'

  2. Close the modal and see the error in the inspector

The severity field is not set for this bug.
:lsalzman, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(lsalzman)

My best guess here is that invalid argument types are being supplied to fillRect(), as otherwise fillRect() is not specified to throw anything. Thus, the only remaining case this could arise is that either the context is invalid or fillRect() received invalid arguments.

Flags: needinfo?(lsalzman)
Severity: -- → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: