found this while messing around with the new costume block.
when you run this block:
nothing noticeable happens but the the console starts to spit out this error about every second
but if you try to report or something similar the editor freezes and the console really starts to hammer down on the idea that something may be wrong
reloading the window (without saving) seems to be the only way out of this.
i wonder if theres a way to save through the console when the editors frozen? ive tried .save() but no dice
Although Snap! mostly tries to avoid spitting out errors and carry on - it's not really it's fault if it doesn't handle garbage in from time to time
Only report bugs if your input is valid and you get errors
It's because it can't draw a costume with a width and height of 0. I guess a fix would be just to check the width an height before rendering it, then if the width and height is 0, it will just report nothing, or even better, throw an error (not in the console)
Edit: actually, I think that it already does the check when drawing costumes, but I guess it doesn't when drawing objects (sprites)?
This is a valid bug because it's actually something that is super easy to stumble upon. Also, the values are technically valid.
There's many wrong, simple things that users can do
I do them all the time
I don't report a bug when its my fault
Are they? I don't think they are
This bug in particular, freezes snap, which is a big deal.
I mean, they're the default values.
I encounter many things which cause problems (I make a lot of mistakes!)
99.9% of time, just before I go to report a bug - I see the error made (in this case - supplying an invalid list) and fix my code
I'm trying to tell you, this bug crashes snap. It's also super easy to reproduce, heck, I can do it in less than 5 seconds. A bug this easy to do and this fatal needs to be fixed.
Actually, I think remember, snap 5 actually threw an error when trying to make a costume with a width and height of 0. Wonder why that was removed.
Lets agree to disagree on this one - Jens will decide if it is an issue that needs to be fixed or not
I created a block that crashes snap using this bug.
Hopefully now you'll understand why this bug needs to be fixed.
No, I don't agree, not if the result is Snap! freezing. I think you're right that if you abuse a block and you get a result that isn't what you hoped for, that isn't our problem. But kids are going to try clicking on things, and it's undesirable for them to lose their project as a result. I think it's entirely right for @cameron8299 to have reported this. Even if Jens decides it's not worth fixing, that's for him to decide, whereas if it's not reported he doesn't get to decide!
in the File menu to restore an unsaved project, but it's not very reliable imho.
It never, never worked for me...
You can still use it if you move the blocks around then move (a) variable lol.
I know how to make it not crash. I made the project to demonstrate how to make snap crash with this bug.