Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors trying to paste/open an SVG file #337

Open
1j01 opened this issue Mar 26, 2024 · 0 comments
Open

Errors trying to paste/open an SVG file #337

1j01 opened this issue Mar 26, 2024 · 0 comments
Labels

Comments

@1j01
Copy link
Owner

1j01 commented Mar 26, 2024

Trying to paste an SVG image I copied to the clipboard (the uBlock Origin logo), I got an error:

InvalidStateError: CanvasRenderingContext2D.drawImage: Passed-in canvas is empty

make_canvas/new_ctx.copy@https://jspaint.app/src/helpers.js:175:13
make_canvas@https://jspaint.app/src/helpers.js:187:12
instantiate@https://jspaint.app/src/OnCanvasSelection.js:50:19
instantiate@https://jspaint.app/src/OnCanvasSelection.js:145:3
OnCanvasSelection@https://jspaint.app/src/OnCanvasSelection.js:22:8
paste/do_the_paste/<@https://jspaint.app/src/functions.js:1669:16
undoable@https://jspaint.app/src/functions.js:1910:14
do_the_paste@https://jspaint.app/src/functions.js:1664:11
paste/<@https://jspaint.app/src/functions.js:1641:5

Saving it and trying to open it instead, I got a different error:

IndexSizeError: Index or size is negative or greater than the allowed amount

canvas_has_any_apparent_image_data@https://jspaint.app/src/sessions.js:23:19
handle_data_loss@https://jspaint.app/src/sessions.js:89:8
LocalSession/this.save_image_to_storage_immediately@https://jspaint.app/src/sessions.js:111:25
later@https://jspaint.app/src/helpers.js:51:11

(replace https://jspaint.app/ with https://github.com/1j01/jspaint/blob/a0abbb3e367b864c0b157c1eefe6e7e1b4112849/ in stack traces for permalinks)

@1j01 1j01 added the bug label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant